Skip to main content

Customers

merge with users, keep only finance related data here

The API allows you to create, delete, and update your customers. You can retrieve individual customers as well as a list of all your customers.

endpoints

POST /v1/customers/
GET /v1/customers/:id
POST /v1/customers/:id
GET /v1/customers
DELETE /v1/customers/:id

create

Parameters

ParameterTypeinRequiredDescription
firstNamestringbodyNOThe name of the customer
lastNamestringbodyNOThe last name of the customer
emailstringbodyYESThe email of the customer
countrystringbodyNOThe country of the customer
addressjsonbodyNOThe address of the customer
phonestringbodyNOThe phone number of the customer
SocialNumberstringbodyNOThe social number of the customer
liveModeboolbodyNOWhether the customer is live mode
verifiedboolbodyNOWhether the customer is verified
TaxableboolbodyNOWhether the customer is taxable
balancefloatbodyNOThe balance of the customer
defaultMethodstringbodyNOThe default payment method for the customer

Request :

POST /v1/customers/

Response:

{
"data": {
"id": "61112889002ca6dd00c5c0a3",
"email": "example@example.com",
"firstName": null,
"lastName": null,
"address": {},
"country": null,
"balance": 0,
"verified": false,
"liveMode": false,
"createdAt": "2021-08-09T13:07:21.189Z",
"updatedAt": "2021-08-09T13:07:21.189Z",
"defaultMethod": null
}
}

get

getAll

Returns a list of your customers

GET* /v1/customers

delete

danger

Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer.

Request:

GET /v1/customers/:id

Response:

{
"id": "6111296800b881420020af12",
"deleted": true,
"message": "Customer delete successfully"
}