Customers API
Create a customer
Request
To create a Customer you'll need to provide:
Valid
Authorization
header (see above how to create one)Valid request
Request endpoint details
path
v2/customers
This path is used for create action
method
POST
We are creating resource, hence POST
method
Request body:
merchant_customer_id
1-100
String
NO
Merchant's customer id
description
1-200
String
NO
The Customer description
1-200
String
NO
Customer’s email address.
name
1-50
String
NO
Customer’s full name or business name.
phone
1-30
String
NO
Customer's phone
metadata
predefined
Dictionary
NO
Set of key-value pairs. Useful for storing additional data about the object
zip_code
1-9
String
NO
Customer's ZIP or postal code.
city
3-30
String
NO
Customer's city, district, suburb, town, or village.
address
3-100
String
NO
Customer's address
Response
status
enum
String
approved, invalid-request or error
uuid
predefined
String
Customer's uuid - use this value for operations with customer
merchant_customer_id
100
String
Merchant's customer id
description
1-200
String
The Customer description
1-200
String
Customer’s email address.
name
1-50
String
Customer’s full name
phone
1-30
String
Customer's phone
metadata
predefined
Dictionary
Set of key-value pairs. Useful for storing additional data about the object
zip_code
1-9
String
Customer's ZIP or postal code.
city
3-30
String
Customer's city
address
3-100
String
Customer's address
deleted
predefined
Boolean
True if customer is deleted
created_at
predefined
DateTime
Created at
updated_at
predefined
DateTime
Created at
deleted_at
predefined
DateTime
Nullable, set if customer is deleted
Example of response:
Retrieve a customer
To retrieve previously created customer you'll need to provide:
Valid
Authorization
header (see above how to create one)Create resource beforehand
Provide valid resource
uuid
Request
path
/v2/customers/:uuid
uuid
of previously created resource
method
GET
Response
Response is the same as the one for create
Retrieve a customer via merchant_customer_id
To retrieve previously created customer you'll need to provide:
Valid
Authorization
header (see above how to create one)Create resource beforehand
Provide valid
merchant_customer_id
Request
path
/v2/merchants/customers/:merchant_customer_id
merchant_customer_id
of previously created resource
method
GET
Response
Response is the same as the one for create
Update a customer
To update previously created customer you'll need to provide:
Valid
Authorization
header (see above how to create one)Create resource beforehand
Provide valid resource
uuid
Request
path
/v2/customers/:uuid
uuid
of previously created resource
method
POST
We are updating resource, hence POST
method
Request body:
Updates the specified customer by setting the values of the parameters passed.
Any parameters not provided will be left unchanged.
Fields available for
create
are also available for update.Setting key to null in metadata will unset value for that key.
Response
Response is the same as the one for create
Delete a customer
To delete previously created customer you'll need to provide:
Valid
Authorization
header (see above how to create one)Create resource beforehand
Provide valid resource
uuid
Request
path
/v2/customers/:uuid
uuid
of previously created resource
method
DELETE
Response
status
enum
String
approved, invalid-request or error
id
20
String
Customer's id
deleted
predefined
Boolean
True if customer is deleted
Example of response:
List all customers
To list previously created customers you'll need to provide:
Valid
Authorization
header (see above how to create one)
Request
path
/v2/customers
uuid
of previously created resource
method
GET
We are retrieving resources, thus GET
query
limit
Limit number of objects listed, default limit is 50
. Must be valid number.
query
offset
If you need to skip values set offset to non 0 value, objects are sorted by created_at DESC
. Must be valid number.
Response
|field| length | type |description|
|status| enum | String
|approved, invalid-request or error| |data|20 |Array<Dictionary>
| An array of customers |
List all payment methods
To list previously created customers you'll need to provide:
Valid
Authorization
header (see above how to create one)
Request
path
/v2/customers/:uuid/payment-methods
uuid
of previously created resource
method
GET
We are retrieving resources, thus GET
query
limit
Limit number of objects listed, default limit is 50
. Must be valid number.
query
offset
If you need to skip values set offset to non 0 value, objects are sorted by created_at DESC
. Must be valid number.
Response
status
enum
String
approved, invalid-request or error
data
20
Array<Dictionary>
An array of customers
Last updated