Skip to Content

Retrieve an order

Read one of your orders and its current status.

GET
/v1/orders/{orderId}

Authorization

bearer
headerAuthorizationBearer <token>

Your secret API key, cp_live_…, created in the merchant console.

Path Parameters

orderId*string

Order ID, a UUID.

Response Body

Order

application/json
  1. response
id*string

Order ID, a UUID.

slug*string

Pay link the order belongs to. It must be one of your pay links.

reference*string

The reference you sent.

amountUsdCents*integer

Amount in US cents, from 100 ($1.00) to 1000000 ($10,000.00).

Range100 <= value <= 1000000
amountSat*integer

Amount in satoshis, quoted when the order was created. The invoice is for exactly this amount.

Range1 <= value <= 9007199254740
status*string

pending until the invoice is paid or expires. paid is final. An expired order can still become paid if a late payment arrives.

Value in"pending""paid""expired"
invoice*string

BOLT11 Lightning invoice. Show it yourself or send the customer to checkoutUrl.

checkoutUrl*string

Hosted checkout page for this order.

successUrl*|

The success URL you sent, or null.

cancelUrl*|

The cancel URL you sent, or null.

createdAt*string

When the order was created. ISO 8601, UTC.

expiresAt*string

When the invoice expires, one hour after creation. ISO 8601, UTC.

paidAt*|

When the payment arrived, or null. ISO 8601, UTC.

Example Request
curl -X GET 'https://api.cashpayment.co/v1/orders/12345678-1234-4234-8234-123456789abc' \  -H 'Authorization: Bearer cp_live_xxx'
Example Response
{  "id": "12345678-1234-4234-8234-123456789abc",  "slug": "onne",  "reference": "WC-10234",  "amountUsdCents": 1500,  "amountSat": 15000,  "status": "pending",  "invoice": "lnbc150u1p5...",  "checkoutUrl": "https://www.cashpayment.co/invoice/12345678-1234-4234-8234-123456789abc",  "successUrl": "https://shop.example.com/thanks",  "cancelUrl": "https://shop.example.com/cart",  "createdAt": "2026-11-17T12:00:00.000Z",  "expiresAt": "2026-11-17T13:00:00.000Z",  "paidAt": null}