Skip to main content
POST
/
api
/
canary
/
customers
Creates a new customer object. This also provisions their “cash balance” feature (starting at 0).

Request Body

email
string
required
The customer’s email address
name
string
required
The customer’s full name
metadata
object
Custom metadata to attach to the customer (e.g., user source, referral code)

Response

Customer Created
id
string
Unique identifier for the customer
merchantId
string
The merchant’s unique identifier
email
string
The customer’s email address
name
string
The customer’s full name
metadata
object
Custom metadata attached to the customer
createdAt
string
ISO 8601 timestamp when the customer was created
updatedAt
string
ISO 8601 timestamp when the customer was last updated

Example Request

{
  "email": "[email protected]",
  "name": "John Doe",
  "metadata": {
    "source": "web",
    "referralCode": "FRIEND123"
  }
}

Example Response

{
  "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"
}

Error Responses

Bad Request
Invalid request body
Unauthorized
Invalid or missing authentication token
Conflict
Customer with this email already exists
Internal Server Error
An unexpected error occurred on the server

Authentication

This endpoint requires Bearer token authentication.