Skip to content

Customers

Customer records are reusable — attach them to checkouts and invoices instead of repeating name/email each time.

Object

json
{
  "id": "uuid",
  "merchant_id": "uuid",
  "name": "Alice Smith",
  "email": "[email protected]",
  "phone": "+1 415 000 0000",
  "country": "SGP",
  "notes": null,
  "created_at": "2026-03-16T10:00:00Z",
  "updated_at": "2026-03-16T10:00:00Z"
}

Create Customer

http
POST /v1/customers

Body

FieldTypeRequiredDescription
namestringFull name
emailstring
phonestringE.164 format recommended
countrystringISO 3166-1 alpha-3 (e.g. SGP, USA)
notesstringInternal notes
merchant_iduuidReseller only. Create this customer under another merchant. See Reseller

Example

bash
curl -X POST https://api-test.dpt.xyz/v1/customers \
  -H "Authorization: Bearer dptb_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Alice Smith",
    "email": "[email protected]",
    "country": "SGP"
  }'

List Customers

http
GET /v1/customers

Get Customer

http
GET /v1/customers/{id}

Update Customer

http
PUT /v1/customers/{id}

Body

FieldTypeRequiredDescription
namestringFull name
emailstring
phonestringE.164 format recommended
countrystringISO 3166-1 alpha-3 (e.g. SGP, USA)
notesstringInternal notes

Delete Customer

http
DELETE /v1/customers/{id}

Returns 204 No Content. Existing checkouts and invoices referencing this customer are unaffected.

DPT Merchant API