Update a customer
/customers/{reference_id}Updates a customer's default payment method and, optionally, the date of birth and national identification number. default_source is required and must be one of this customer's payment methods. Other details (name, email, phone, address, shipping) cannot be changed with this call.
Headers
AuthorizationstringRequiredPath parameters
reference_idstringRequiredYour unique identifier for the customer.
Parameters
default_sourcestringRequiredUnique identifier of the Customer's default Payment Method.
dobstringThe customer's date of birth in YYYY-MM-DD format.
national_identification_numberstringThe customer's national identification number.
Returns
Returns the updated customer object.
idstringUnique identifier for the Customer resource.
resourcestringString representing the object's type.
createdstringTime at which the object was created, in ISO 8601 format.
default_sourcestring or nullUnique identifier of the Customer's default Payment Method.
emailstring or nullThe customer's email address.
metadataobjectSet of key-value pairs attached to the object.
namestring or nullThe customer's full name.
phonestring or nullThe customer's phone number, if set.
Show 7 more attributesShow fewer attributes
reference_idstringYour unique identifier for the customer, used to retrieve and manage saved payment methods.
addressobject or nullThe customer's billing address, if set.
Show 2 child attributesHide child attributes
Option 1objectAddress details.
Show 6 child attributesHide child attributes
citystringCity, district, suburb, town, or village.
countrystringTwo-letter country code (ISO 3166-1 alpha-2).
line1stringAddress line 1 (for example, street, PO Box, or company name).
line2string or nullAddress line 2 (for example, apartment, suite, unit, or building). Responses return null when not set.
postal_codestringZIP or postal code.
statestring or nullState, county, province, or region. Null is accepted and returned when not set.
Option 2nullshippingobject or nullThe customer's shipping information, if set.
Show 2 child attributesHide child attributes
Option 1objectShipping information for the payment.
Show 3 child attributesHide child attributes
addressobjectAddress details.
Show 6 child attributesHide child attributes
citystringCity, district, suburb, town, or village.
countrystringTwo-letter country code (ISO 3166-1 alpha-2).
line1stringAddress line 1 (for example, street, PO Box, or company name).
line2string or nullAddress line 2 (for example, apartment, suite, unit, or building). Responses return null when not set.
postal_codestringZIP or postal code.
statestring or nullState, county, province, or region. Null is accepted and returned when not set.
namestringFull name of the recipient.
phonestringPhone number of the recipient, preferably in E.164 format. The leading + is optional.
Option 2nulltest_modebooleanWhether the customer was created in the sandbox.
dobstring or nullThe customer's date of birth in YYYY-MM-DD format, if set.
national_identification_numberstring or nullThe customer's national identification number.
underlying_identifiersobjectProvider-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
400401invalid_key, invalid_token, legacy_keys_ended, legacy_keys_off or permission_denied).403resource_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.404500503Retry-After, or after a few seconds when there's none.