Creating Customer
INFO
This documentation is work in progress and subject to change. If you have any questions or feedback, please reach out to us via Support.
To start funding request flow for your customer, you will need to first create a new Customer as shown in example below:
INFO
Refer to Customers resource for a detailed description of each property on the request and response body.
POST /v1/customers HTTP/1.1
Host: api.zetl.com
Content-Type: application/json
Authorization: Bearer <your-private-key>
Idempotency-Key: 88a3db9c-0f14-4a58-b1f6-8b2c43f8e2a1
{
"external_customer_id": "f849111b-c6c8-4774-be27-a4b4615429a3",
"contact_email": "foo@example.com",
"contact_name": "Foo Bar",
"contact_phone": "+85224141219",
"contact_country": "HK",
"company_name": "Foo Bar",
"company_country": "HK",
"company_sector": "Recruitment"
}
curl --request POST \
--url 'https://app.zetl.com/v1/customers' \
--header 'Authorization: Bearer <your-private-key>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 88a3db9c-0f14-4a58-b1f6-8b2c43f8e2a1' \
--data '{
"external_customer_id": "f849111b-c6c8-4774-be27-a4b4615429a3",
"contact_email": "foo@example.com",
"contact_name": "Foo Bar",
"contact_phone": "+85224141219",
"contact_country": "HK",
"company_name": "Foo Bar",
"company_country": "HK",
"company_sector": "Recruitment"
}'
Example above also showcase the use of Request Idempotency to prevent duplicate requests and the ability to safely retry requests.
Successful API call will return the following response body in JSON format:
{
"customer_id": "b8a1dfe0-c575-4d5c-9840-2fca96b5d96a",
"external_customer_id": "f849111b-c6c8-4774-be27-a4b4615429a3",
"contact_email": "foo@example.com",
"contact_name": "Foo Bar",
"contact_phone": "+85224141219",
"contact_country": "HK",
"company_name": "Foo Bar",
"company_country": "HK",
"company_sector": "Recruitment",
"created_at": "2023-12-01T00:00:00Z",
"updated_at": "2023-12-01T00:00:00Z"
}
You should store the customer_id
value as this will be used as primary identified for this Customer record in subsequent API requests.
Each Customer resource will always create relevant KYC resource based on its company_country
value. See our page on KYC Information for details.