Make a PATCH request to this endpoint to update the details on a customer. Only fields present in the request will be updated. Any changes to fields on the customer object will replace that item in its entirety. If you wish to append to an array, your PATCH request should contain the desired end state array (i.e., both the current content and the new array element to append to it). Pass a NULL value to remove the existing content.
Note that the reference_id and type on a customer cannot be updated.
API version in date semantic. Attach this parameter when calling a specific API version. List of API versions can be found here.
The sub-account user-id that you want to make this transaction for.
This header is only used if you have access to xenPlatform. See xenPlatform for more information
Patch body request
Primary or first name/s of customer. Alphanumeric. No special characters is allowed.
Last or family name of customer. Alphanumeric. No special characters is allowed.
Country code for customer nationality. ISO 3166-1 alpha-2 Country Code
City or other relevant location for the customer birth place. Alphanumeric. No special characters is allowed.
Date of birth of the customer. Format: YYYY-MM-DD
Gender of customer
Name of the employer
Industry or nature of business
Occupation or title
Name of business
Trading name
Legal entity type of the business
Free text description of the type of business this entity pursues
Registered country of the business. ISO 3166 format
Business registration date
Additional contact number of customer in E.164 format. May be a landline
FormatE.164 international standard +(country code)(subscriber number)
Mobile number of customer in E.164 format +(country code)(subscriber number)
E-mail address of customer
ISO 3166-1 alpha-2 Country Code
Line 1 of street address e.g., building name and apartment number
Line 2 of street address e.g., building name and apartment number
City, village or town of residence of customer
Province, state or region of residence of customer
ZIP/Postal Code of customer
Address type
Defaults to false. Indicates that the information provided refers to the customer’s primary address
ISO 3166-1 alpha-2 Country Code
Generic ID type
Specific ID type for IDENTITY_CARD types
Free text description of the type of document (e.g., NIB, SIUP, AKTA). Characters
alphanumeric. No special characters is allowed.
Unique alphanumeric identity document number or code. Characters
alphanumeric. No special characters is allowed.
Expiry date, if relevant
Free text to capture the full name(s) of the individual or business as defined on the document, if relevant. Characters
alphanumeric. No special characters is allowed.
Array of file ids returned from uploads to the files endpoint, representing images of the front/back of the document, in png/jpg/jpeg/pdf format
Merchant-provided description for the customer. Characters
alphanumeric. No special characters is allowed.
Business registration date
Country within which the account that the shopper had to create/sign up on the merchant’s website resides (e.g. accounts created on Shopee SG have SG
as the value for this field. ISO 3166-2 Country Code
Object of additional information related to the customer. Define the JSON properties and values as required to pass information through the APIs. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. This is only for your use and will not be used by Xendit.
Successful operation
{
"id": "cust-239c16f4-866d-43e8-9341-7badafbc019f",
"reference_id": "demo_1475801962607",
"type": "INDIVIDUAL",
"individual_detail": {
"given_names": "John",
"surname": "Doe",
"nationality": "ID",
"place_of_birth": "Jakarta",
"date_of_birth": "1980-01-01",
"gender": "MALE",
"employment": {
"employer_name": "Xendit",
"nature_of_business": "Payment Gateway",
"role_description": "Test dummy"
}
},
"business_detail": null,
"email": "customer@website.com",
"mobile_number": "+62812123456",
"phone_number": "+62812123456",
"hashed_phone_number": "+628#######56",
"addresses": [
{
"street_line1": "Panglima Polim IV",
"street_line2": "Ruko Grand Panglima Polim, Blok E",
"city": "Jakarta Selatan",
"province_state": "DKI Jakarta",
"postal_code": "993448",
"country": "ID",
"category": "HOME",
"is_primary": true
}
],
"kyc_documents": [
{
"type": "IDENTITY_CARD",
"sub_type": "NATIONAL_ID",
"country": "ID",
"document_name": "KTP",
"document_number": "12356789012456",
"expires_at": null,
"holder_name": "John Doe",
"document_images": [
"file-ec700c1c-db17-4496-b1fb-04ebe551b412"
]
}
],
"description": "My first customer",
"date_of_registration": "2020-03-30",
"domicile_of_registration": "ID",
"metadata": {
"foo": "bar"
},
"created": "2020-03-30T06:12:47.212Z",
"updated": "2020-03-30T06:12:47.212Z"
}
{
"id": "cust-239c16f4-866d-43e8-9341-7badafbc019f",
"reference_id": "demo_1475801962607",
"type": "BUSINESS",
"individual_detail": null,
"business_detail": {
"business_name": "ACME Corp",
"trading_name": null,
"business_type": "CORPORATION",
"nature_of_business": null,
"business_domicile": null,
"date_of_registration": null
},
"email": "customer@website.com",
"mobile_number": null,
"phone_number": null,
"hashed_phone_number": null,
"addresses": [],
"kyc_documents": [],
"description": null,
"date_of_registration": "2020-03-30",
"domicile_of_registration": "ID",
"metadata": {},
"created": "2020-03-30T06:12:47.212Z",
"updated": "2020-03-30T06:12:47.212Z"
}
Customer Object
Xendit unique Capture ID generated as reference for the end user
A Reference ID from merchants to identify their request.
Mobile number of customer in E.164 format +(country code)(subscriber number)
Additional contact number of customer in E.164 format. May be a landline
FormatE.164 international standard +(country code)(subscriber number)
Hashed phone number
E-mail address of customer
ISO 3166-1 alpha-2 Country Code
Line 1 of street address e.g., building name and apartment number
Line 2 of street address e.g., building name and apartment number
City, village or town of residence of customer
Province, state or region of residence of customer
ZIP/Postal Code of customer
Address type
Defaults to false. Indicates that the information provided refers to the customer’s primary address
ISO 3166-1 alpha-2 Country Code
Generic ID type
Specific ID type for IDENTITY_CARD types
Free text description of the type of document (e.g., NIB, SIUP, AKTA). Characters
alphanumeric. No special characters is allowed.
Unique alphanumeric identity document number or code. Characters
alphanumeric. No special characters is allowed.
Expiry date, if relevant
Free text to capture the full name(s) of the individual or business as defined on the document, if relevant. Characters
alphanumeric. No special characters is allowed.
Array of file ids returned from uploads to the files endpoint, representing images of the front/back of the document, in png/jpg/jpeg/pdf format
Merchant-provided description for the customer. Characters
alphanumeric. No special characters is allowed.
Date of which the account that the shopper had to create/sign up on the merchant's website
Country within which the account that the shopper had to create/sign up on the merchant’s website resides (e.g. accounts created on Shopee SG have SG
as the value for this field. ISO 3166-2 Country Code
Object of additional information related to the customer. Define the JSON properties and values as required to pass information through the APIs. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. This is only for your use and will not be used by Xendit.
The provided id
does not exist. Please review the id
and try again