● Customers · /v1

Customers

Map your own users onto Baton customers for stored-card reuse, risk profiling and dispute evidence.

Create a customer

POST /v1/customers

Headers

Idempotency-Keyrequired string A unique string you generate (UUID/ULID recommended). Replaying the same key within 24 hours returns the original result and never creates a second payment.

Body

reference_idrequired string
email string
phone string
name string
country string

Response 201

uid string
reference_id string The user ID in your system
email string
phone string
name string
country string
created_at string<date-time>
Request
curl -X POST https://api.baton.example/v1/customers \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "Idempotency-Key: 01J8ZQ4T7M2K9F3B" \
  -H "X-Timestamp: 1763280000" -H "X-Nonce: 7f3a" -H "X-Signature: v1=..." \
  -H "Content-Type: application/json" \
  -d '{
  "reference_id": "user_90213",
  "email": "[email protected]",
  "country": "US"
}'

Retrieve a customer

GET /v1/customers/{uid}

Path parameters

uidrequired string

Response 200

uid string
reference_id string The user ID in your system
email string
phone string
name string
country string
created_at string<date-time>
Request
curl -X GET https://api.baton.example/v1/customers/{uid} \
  -H "Authorization: Bearer sk_live_xxx"

Update a customer

POST /v1/customers/{uid}/update

Path parameters

uidrequired string

Body

email string
phone string
name string
country string

Response 200

uid string
reference_id string The user ID in your system
email string
phone string
name string
country string
created_at string<date-time>
Request
curl -X POST https://api.baton.example/v1/customers/{uid}/update \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "X-Timestamp: 1763280000" -H "X-Nonce: 7f3a" -H "X-Signature: v1=..." \
  -H "Content-Type: application/json" \
  -d '{
  "email": "[email protected]"
}'