Skip to content
  • Auto
  • Light
  • Dark
Get started
View as Markdown
Copy Markdown

Open in Claude
Open in ChatGPT

Lookup a customer

customers.get(id, **kwargs) -> CustomerV1 { data, meta, response_type }
get/v1/customers/{id}

Retrieves the details of an existing customer. Supply the unique customer ID that was returned from your 'create customer' request, and Straddle will return the corresponding customer information.

ParametersExpand Collapse
id: String
correlation_id: String
request_id: String
straddle_account_id: String
ReturnsExpand Collapse
class CustomerV1 { data, meta, response_type }
data: { id, created_at, email, 11 more}
id: String

Unique identifier for the customer.

formatuuid
created_at: Time

Timestamp of when the customer record was created.

formatdate-time
email: String

The customer's email address.

formatemail
name: String

Full name of the individual or business name.

phone: String

The customer's phone number in E.164 format.

status: :pending | :review | :verified | 2 more
Accepts one of the following:
:pending
:review
:verified
:inactive
:rejected
type: :individual | :business
Accepts one of the following:
:individual
:business
updated_at: Time

Timestamp of the most recent update to the customer record.

formatdate-time
address: CustomerAddressV1 { address1, city, state, 2 more }

An object containing the customer's address. This is optional, but if provided, all required fields must be present.

address1: String

Primary address line (e.g., street, PO Box).

maxLength100
city: String

City, district, suburb, town, or village.

maxLength100
state: String

Two-letter state code.

zip: String

Zip or postal code.

address2: String

Secondary address line (e.g., apartment, suite, unit, or building).

maxLength100
compliance_profile: { dob, ssn} | { ein, legal_business_name, representatives, website}

PII required to trigger Patriot Act compliant KYC verification.

Accepts one of the following:
class IndividualComplianceProfile { dob, ssn }

PII required to trigger Patriot Act compliant KYC verification.

dob: Date

Masked date of birth in ****-- format.

formatdate
ssn: String

Masked Social Security Number in the format --***.

class BusinessComplianceProfile { ein, legal_business_name, representatives, website }

Business registration data required to trigger Patriot Act compliant KYB verification.

ein: String

Masked Employer Identification Number in the format -*****

The official registered name of the business. This name should be correlated with the ein value.

representatives: Array[{ name, email, phone}]

A list of people related to the company. Only valid where customer type is 'business'.

name: String
email: String
phone: String
website: String

Official business website URL. Optional but recommended for enhanced KYB.

formaturi
config: { processing_method, sandbox_outcome}
processing_method: :inline | :background | :skip
Accepts one of the following:
:inline
:background
:skip
sandbox_outcome: :standard | :verified | :rejected | :review
Accepts one of the following:
:standard
:verified
:rejected
:review
device: { ip_address}
ip_address: String

The customer's IP address at the time of profile creation. Use 0.0.0.0 to represent an offline customer registration.

minLength1
formatipv4
external_id: String

Unique identifier for the customer in your database, used for cross-referencing between Straddle and your systems.

metadata: Hash[Symbol, String]

Up to 20 additional user-defined key-value pairs. Useful for storing additional information about the customer in a structured format.

meta: ResponseMetadata { api_request_id, api_request_timestamp }

Metadata about the API request, including an identifier and timestamp.

api_request_id: String

Unique identifier for this API request, useful for troubleshooting.

formatuuid
api_request_timestamp: Time

Timestamp for this API request, useful for troubleshooting.

formatdate-time
response_type: :object | :array | :error | :none

Indicates the structure of the returned content.

  • "object" means the data field contains a single JSON object.
  • "array" means the data field contains an array of objects.
  • "error" means the data field contains an error object with details of the issue.
  • "none" means no data is returned.
Accepts one of the following:
:object
:array
:error
:none
Lookup a customer
require "straddle"

straddle = Straddle::Client.new(
  api_key: "My API Key",
  environment: "production" # defaults to "sandbox"
)

customer_v1 = straddle.customers.get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")

puts(customer_v1)
{
  "data": {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "created_at": "2019-12-27T18:11:19.117Z",
    "email": "ron.swanson@pawnee.com",
    "name": "Ron Swanson",
    "phone": "+12128675309",
    "status": "pending",
    "type": "individual",
    "updated_at": "2019-12-27T18:11:19.117Z",
    "address": {
      "address1": "123 Main St",
      "city": "Anytown",
      "state": "CA",
      "zip": "12345",
      "address2": "Apt 1"
    },
    "compliance_profile": {
      "dob": "2019-12-27",
      "ssn": "***-**-****"
    },
    "config": {
      "processing_method": "inline",
      "sandbox_outcome": "standard"
    },
    "device": {
      "ip_address": "192.168.1.1"
    },
    "external_id": "external_id",
    "metadata": {
      "foo": "string"
    }
  },
  "meta": {
    "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "api_request_timestamp": "2019-12-27T18:11:19.117Z"
  },
  "response_type": "object"
}
Returns Examples
{
  "data": {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "created_at": "2019-12-27T18:11:19.117Z",
    "email": "ron.swanson@pawnee.com",
    "name": "Ron Swanson",
    "phone": "+12128675309",
    "status": "pending",
    "type": "individual",
    "updated_at": "2019-12-27T18:11:19.117Z",
    "address": {
      "address1": "123 Main St",
      "city": "Anytown",
      "state": "CA",
      "zip": "12345",
      "address2": "Apt 1"
    },
    "compliance_profile": {
      "dob": "2019-12-27",
      "ssn": "***-**-****"
    },
    "config": {
      "processing_method": "inline",
      "sandbox_outcome": "standard"
    },
    "device": {
      "ip_address": "192.168.1.1"
    },
    "external_id": "external_id",
    "metadata": {
      "foo": "string"
    }
  },
  "meta": {
    "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "api_request_timestamp": "2019-12-27T18:11:19.117Z"
  },
  "response_type": "object"
}