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",
  "name": "Alice Smith",
  "email": "alice@example.com",
  "phone": "+1 415 000 0000",
  "country": "US",
  "created_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-2 (e.g. US)

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": "alice@example.com",
    "country": "US"
  }'

List Customers

http
GET /v1/customers

Get Customer

http
GET /v1/customers/{id}

Update Customer

http
PUT /v1/customers/{id}

Send only the fields you want to change. All fields are optional.


Delete Customer

http
DELETE /v1/customers/{id}

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

DPT Merchant API