- Documentation
- API Reference
- Community
- The Customer object
- POSTCreate a customer
- POSTUpdate a customer
- GETRetrieve a customer
- GETList all customers
- DELDelete a customer
- The Product object
- POSTCreate a product
- POSTUpdate a Product
- GETRetrieve a product
- GETList all products
- DELDelete a product
- GETRetrieve a products's prices
Customers
Products
Create a customer
Creates a new customer.
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
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 (
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.
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.
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
}