Customers
Create a customer
Customers
Create a customer
Creates a new customer.
POST
/
customers
curl --request POST \
--url https://pay.chargily.net/test/api/v2/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"address": {
"country": "<string>",
"state": "<string>",
"address": "<string>"
},
"metadata": [
{}
]
}'
{
"id": "01hj0p5s3ygy2mx1czg2wzcc4x",
"entity": "customer",
"livemode": false,
"name": "Hocine Saad",
"email": null,
"phone": null,
"address": {
"country": "Algeria",
"state": "Tizi-Ouzou",
"address": "123 Main Street"
},
"metadata": null,
"created_at": 1702977791,
"updated_at": 1702977791
}
Body parameters
The name of the customer.
The email of the customer.
The phone number of the customer.
The address of the customer
Two-letter country code (ISO 3166-1 alpha-2), eg: “dz”.
The state of the customer.
The address line of the customer.
A Set of key-value pairs that can be used to store additional information about the product.
Returns
If the request is successful, it returns a customer object.
{
"id": "01hj0p5s3ygy2mx1czg2wzcc4x",
"entity": "customer",
"livemode": false,
"name": "Hocine Saad",
"email": null,
"phone": null,
"address": {
"country": "Algeria",
"state": "Tizi-Ouzou",
"address": "123 Main Street"
},
"metadata": null,
"created_at": 1702977791,
"updated_at": 1702977791
}
curl --request POST \
--url https://pay.chargily.net/test/api/v2/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"address": {
"country": "<string>",
"state": "<string>",
"address": "<string>"
},
"metadata": [
{}
]
}'
{
"id": "01hj0p5s3ygy2mx1czg2wzcc4x",
"entity": "customer",
"livemode": false,
"name": "Hocine Saad",
"email": null,
"phone": null,
"address": {
"country": "Algeria",
"state": "Tizi-Ouzou",
"address": "123 Main Street"
},
"metadata": null,
"created_at": 1702977791,
"updated_at": 1702977791
}