Skip to Content
Docs
Customers

Retrieve a customer

GET/customers/{reference_id}

Retrieves the details of a customer by reference.

Headers

AuthorizationstringRequired
HTTP Basic auth: your API key as the password, with an empty username. See Authentication.

Path parameters

reference_idstringRequired

Your unique identifier for the customer.

Returns

Returns the customer object.

idstring

Unique identifier for the Customer resource.

resourcestring

String representing the object's type.

createdstring

Time at which the object was created, in ISO 8601 format.

default_sourcestring or null

Unique identifier of the Customer's default Payment Method.

emailstring or null

The customer's email address.

metadataobject

Set of key-value pairs attached to the object.

namestring or null

The customer's full name.

phonestring or null

The customer's phone number, if set.

Show 7 more attributesShow fewer attributes
reference_idstring

Your unique identifier for the customer, used to retrieve and manage saved payment methods.

addressobject or null

The customer's billing address, if set.

Show 2 child attributesHide child attributes
Option 1object

Address details.

Show 6 child attributesHide child attributes
citystring

City, district, suburb, town, or village.

countrystring

Two-letter country code (ISO 3166-1 alpha-2).

line1string

Address line 1 (for example, street, PO Box, or company name).

line2string or null

Address line 2 (for example, apartment, suite, unit, or building). Responses return null when not set.

postal_codestring

ZIP or postal code.

statestring or null

State, county, province, or region. Null is accepted and returned when not set.

Option 2null
shippingobject or null

The customer's shipping information, if set.

Show 2 child attributesHide child attributes
Option 1object

Shipping information for the payment.

Show 3 child attributesHide child attributes
addressobject

Address details.

Show 6 child attributesHide child attributes
citystring

City, district, suburb, town, or village.

countrystring

Two-letter country code (ISO 3166-1 alpha-2).

line1string

Address line 1 (for example, street, PO Box, or company name).

line2string or null

Address line 2 (for example, apartment, suite, unit, or building). Responses return null when not set.

postal_codestring

ZIP or postal code.

statestring or null

State, county, province, or region. Null is accepted and returned when not set.

namestring

Full name of the recipient.

phonestring

Phone number of the recipient, preferably in E.164 format. The leading + is optional.

Option 2null
test_modeboolean

Whether the customer was created in the sandbox.

dobstring or null

The customer's date of birth in YYYY-MM-DD format, if set.

national_identification_numberstring or null

The customer's national identification number.

underlying_identifiersobject

Provider-specific customer identifiers, keyed by provider and then by a provider-side account or MID. Only present when the underlying identifiers map feature is enabled for your account; otherwise the field is omitted.

Errors

400
Invalid request parameters.
401
The API key or access token is missing, unknown or no longer works (invalid_key, invalid_token, legacy_keys_ended, legacy_keys_off or permission_denied).
403
The request was refused: the API key may not make it (for example resource_not_allowed, key_disabled, network_not_allowed, pci_required or merchant_required), or this resource isn't enabled for your account (permission_denied). code says why.
404
Customer not found.
500
Internal server error.
503
Service unavailable. Retry after the number of seconds in Retry-After, or after a few seconds when there's none.
Was this page helpful?