Skip to main content

How to create a Customer

Overview​

Customer Purse API allows you to create and manage customer profiles that can receive deposits through customer purse addresses.

Use this guide to create a customer, update customer details, get customer information, and manage customer blocked status.

Integration flow​

  1. Create a customer by using the method - [POST] customer-purse/customer/create
  2. Save the returned customer id in your system. It is required for address generation, transaction search, block, and unblock operations.
  3. Optionally update customer data by using the method - [POST] customer-purse/customer/update
  4. Optionally get customer details by customer ID or external ID.
  5. If needed, block or unblock the customer by using the corresponding Customer Purse API methods.

Sequence​

Names of requests on the scheme indicate Customer Purse API methods.

Create customer sequence

API methods​

Create customer - [POST] customer-purse/customer/create​

Request fields​

FieldTypeRequiredDescription
accountstringYesMerchant account ID. The request will be sent for this account.
timestampnumberYesCurrent Unix UTC timestamp in milliseconds. The value must not be less than 3 minutes in the past or greater than 3 minutes in the future.
payloadobjectYesObject with customer creation data.

Payload fields​

FieldTypeRequiredDescription
emailstringNoCustomer email.
descriptionstringNoCustomer description. Maximum length: 1000 characters.
externalIdstringNoMerchant-side customer ID. Maximum length: 255 characters.

Request example​

{
"account": "0x0000000000000000000000000000000000000000",
"timestamp": 1761650432438,
"payload": {
"email": "customer@example.com",
"description": "Customer profile",
"externalId": "merchant-customer-123"
}
}

Response fields​

FieldTypeDescription
idstringCalypso customer ID.
emailstringCustomer email, if provided.
descriptionstringCustomer description, if provided.
externalIdstringMerchant-side customer ID, if provided.
blockedbooleanCustomer blocked status.

Response example 200 OK​

{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"email": "customer@example.com",
"description": "Customer profile",
"externalId": "merchant-customer-123",
"blocked": false
}

Optional methods​

MethodPurposePayload
[POST] customer-purse/customer/updateUpdate customer email or description.id, email, description
[POST] customer-purse/customer/getGet customer by Calypso customer ID.customerId
[POST] customer-purse/customer/external/getGet customers by merchant-side external ID.externalId
[POST] customer-purse/customer/blockBlock customer.customerId
[POST] customer-purse/customer/unblockUnblock customer.customerId

Blocked customer behavior​

CaseDescription
Customer is blockedThe customer receives blocked: true.
Deposits to blocked customer addressesAddresses can still receive funds. The merchant receives a webhook with customerBlocked: true.
Merchant actionDecide how to process the received funds according to the merchant's agreement with the customer.
Customer is unblockedThe customer can continue using their addresses without the blocked flag.
DocumentLink
Get customer deposit addressHow to get a deposit address for a customer
Process customer transactionsHow to process Customer transactions
Customer Purse API referenceCustomer Purse API
Customers webhooksCustomers webhooks