Customer Information [optional]
PUT /payment/api/v1/{request_id}/customer
Request
URL Parameters
- request_id(string): Unique identifier for the sales process. This value is generated in the first API call to generate the payment link.
Payload
- customer (object, required): contains the following fields
- name (string, required): customer's first name.
- surname (string, required): customer's last name.
- phone (string, required):
- title (string, optional)
- email (string, optional): customer's email address.
- document_number (string, optional):
- document_expiration_date (string, optional):
- birth_date (string, optional):
- nationality (string, optional):
- shipping (object, required): contains the following fields
- title (string, required)
- name (string, required): customer's first name.
- surname (string, required): customer's last name.
- company_name (string, required):
- address (object, required): contains the following fields
- line_1 (string, required):
- line_2 (string, required):
- postal_code (string, required):
- city (string, required):
- country (string, required): Alpha-2 code of iso3166.
- email (string, optional): customer's email address.
- phone (string, optional):
- company_title (string, optional):
- billing (object, optional): contains the following fields. If not provided, it will be inferred from the shipping address.
- name (string, optional): customer's first name.
- surname (string, optional): customer's last name.
- email (string, optional): customer's email address.
- phone (string, optional):
- address (object, optional): contains the following fields
- line_1 (string, optional):
- line_2 (string, optional):
- postal_code (string, optional):
- city (string, optional):
- country (string, optional): Alpha-2 code of iso3166.
Response
Payload
- code (string): Response code. 0 means ok; all others should be treated as an error.
Examples
Request
{
"key": "{{key}}",
"resource": "{{resource}}",
"nonce": "{{nonce}}",
"mode": "sha256",
"payload": {
"customer": {
"title": "mr",
"name": "Jhon",
"surname": "Doe",
"email": "jhon@doe.es",
"phone": "+346123123123",
"document_number": "55593310X",
"document_expiration_date": "2024-02-27T12:00:00+01:00",
"birth_date": "1982-11-03T12:00:00+01:00",
"nationality": "ES"
},
"shipping": {
"title": "mr",
"name": "Jhon",
"surname": "Doe",
"email": "jhon@doe.es",
"phone": "+346123123123",
"company_title": "Express 24H",
"company_name": "Express",
"address": {
"line_1": "Street 123",
"line_2": "Another information",
"postal_code": "123456",
"city": "City",
"country": "ES"
}
},
"billing": {
"name": "Jhon",
"surname": "Doe",
"email": "jhon@doe.es",
"phone": "+346123123123",
"company_title": "Express 24H",
"company_name": "Express",
"address": {
"line_1": "Street 123",
"line_2": "Another information",
"postal_code": "123456",
"city": "City",
"country": "ES"
}
}
}
}
Response
{
"type": "resource.status",
"code": "0",
"detail": "Customer data successfully updated.",
"payload": {},
"request_id": "634ff63c198fd062244ec5b9",
"uuid": "634ff63c198fd062244ec5b9"
}