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
Parameter | Type | in | Required | Description |
---|---|---|---|---|
firstName | string | body | NO | The name of the customer |
lastName | string | body | NO | The last name of the customer |
string | body | YES | The email of the customer | |
country | string | body | NO | The country of the customer |
address | json | body | NO | The address of the customer |
phone | string | body | NO | The phone number of the customer |
SocialNumber | string | body | NO | The social number of the customer |
liveMode | bool | body | NO | Whether the customer is live mode |
verified | bool | body | NO | Whether the customer is verified |
Taxable | bool | body | NO | Whether the customer is taxable |
balance | float | body | NO | The balance of the customer |
defaultMethod | string | body | NO | The 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"
}