Skip to main content
POST
/
api
/
canary
/
customers
Create Customer
curl --request POST \
  --url http://localhost:3000/api/canary/customers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "metadata": {
    "customField": "value",
    "orderId": "12345"
  }
}
'
{
  "id": "customer_789",
  "merchantId": "merchant_456",
  "email": "[email protected]",
  "name": "John Doe",
  "metadata": {
    "source": "web",
    "referralCode": "FRIEND123"
  },
  "createdAt": "2025-01-15T10:30:00.000Z",
  "updatedAt": "2025-01-15T10:30:00.000Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Customer details

email
string
required

The email address of the customer

metadata
object
required

Optional custom metadata

Example:
{
"customField": "value",
"orderId": "12345"
}
merchantId
string

The ID of the merchant whose balance is being requested. If omitted, defaults to the authenticated merchant.

name
string

The full name of the customer

Response

Customer created successfully

id
string
required

Unique identifier

createdAt
string<date-time>
required
updatedAt
string<date-time>
required
merchantId
string
required
email
string
required
metadata
object
required
Example:
{ "customField": "value" }
deletedAt
string<date-time>
name
string