How create a customer
Create a customer
To create a new customer use the following endpoint: customer (**POST** https://api.calypso.finance/api/v1/customer-purse/customer/create
)
You can find the detailed description of all the parameters in the documentation:
Here we consider the most important ones.
To create a new user, you need to pass this parameter in the request:
- account (required) - your product/service account id.
- timestamp (required) - Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future
- payload (required) - Request data for creating a new Customer
- description
So to create new customer you just have to send request:
curl --request POST \
--url https://api.calypso.finance/api/v1/customer-purse/customer/create \
--header 'accept: */*' \
--header 'content-type: application/json' \
--data '
{
"account": "string",
"timestamp": 0,
"payload": {
"email": "string",
"description": "string"
}
}
If the creation was successful you receive the response:
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"email": "string",
"description": "string",
"blocked": false
}
Update a customer
To update a customer use the following endpoint: customer (**POST** https://api.calypso.finance/api/v1/customer-purse/customer/update
)
You can find the detailed description of all the parameters in the documentation:
Here we consider the most important ones.
To create a new user, you need to pass this parameter in the request:
- account (required) - your product/service account id.
- timestamp (required) - Current unix UTC timestamp in milliseconds. Must not be less than 3 minutes in the past and not greater than 3 minutes in the future
- payload (required) - Request data for creating a new Customer
- id (required) - Customer ID
- description
So to update customer you just have to send request:
curl --request POST \
--url https://api.calypso.finance/api/v1/customer-purse/customer/update \
--header 'accept: */*' \
--header 'content-type: application/json' \
--data '
{
"account": "string",
"timestamp": 0,
"payload": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"email": "string",
"description": "string"
}
}
If the update was successful you receive the response:
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"email": "string",
"description": "string",
"blocked": false
}
Updated 2 months ago