Skip to content

Checkouts

A checkout is a payment link you send to a customer. Once paid, a checkout.paid webhook is fired.

Object

json
{
  "id": "uuid",
  "title": "Order #1234",
  "description": "Premium plan — 1 year",
  "amount": 10000000,
  "currency": "USDC",
  "method": "crypto",
  "status": "active",
  "hosted_url": "https://pay.dpt.com/c/abc123",
  "expires_at": "2026-04-01T00:00:00Z",
  "created_at": "2026-03-16T10:00:00Z"
}

Status values: active | paid | expired | cancelled


Create Checkout

http
POST /v1/checkouts

Body

FieldTypeRequiredDescription
titlestringShort label shown on the payment page
descriptionstringExtended description
amountintegerAmount in smallest unit. Omit for open-amount checkouts
currencystringUSDC, USDT, USD, etc. Default: USDC
methodstringcrypto or fiat. Default: crypto
customer_iduuidAttach an existing customer
customer_namestringCreate/attach customer inline
customer_emailstring
customer_countrystringISO 3166-1 alpha-2 (e.g. US)

Example

bash
curl -X POST https://api-test.dpt.xyz/v1/checkouts \
  -H "Authorization: Bearer dptb_..." \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Order #1234",
    "amount": 50000000,
    "currency": "USDC",
    "customer_email": "alice@example.com"
  }'

Response 200

Returns the created Checkout object.


List Checkouts

http
GET /v1/checkouts

Returns an array of checkout objects ordered by creation date (newest first).


Get Checkout

http
GET /v1/checkouts/{id}

Cancel Checkout

http
DELETE /v1/checkouts/{id}

Cancels an active checkout. Returns 204 No Content.


Refund Checkout

http
POST /v1/checkouts/{id}/refund

Body

FieldTypeRequiredDescription
amountintegerPartial refund amount. Omit to refund in full
reasonstringOptional reason memo

Returns 204 No Content.

DPT Merchant API