Skip to main content

GET /v1/orders

List orders for the organization the API key belongs to. Results are paginated and can be filtered by status, product, provider, and date range.

Request

curl "https://merchant-api-prod.anyway.sh/v1/orders?page=1&size=20&status=Paid" \
  -H "X-API-Key: ak_YOUR_API_KEY"

Query Parameters

ParamTypeDefaultDescription
pageinteger1Page number
sizeinteger20Page size (max 100)
statusstringFilter by display status (e.g. Paid, Pending, Refunded) — matches the displayStatus field, not status
product_idstringFilter to a single product
providerstringFilter by payment provider: STRIPE or CRYPTO
from_addressstringFilter crypto orders by buyer wallet address
merchant_referencestringFilter by your correlation ID (contains-match)
date_fromintegerUnix timestamp lower bound for createdAt
date_tointegerUnix timestamp upper bound for createdAt

Response

{
  "success": true,
  "message": "Orders retrieved",
  "data": {
    "records": [
      {
        "id": "ORD25A7BK3NX9QRZ4",
        "status": "PAID",
        "displayStatus": "Paid",
        "amountCents": 1000,
        "currency": "USDC",
        "customerId": "CRYPTO_PAYER",
        "productId": "PRD25XWPQ8TN2VHK6",
        "productName": "API Credits — Starter",
        "disputed": false,
        "refunded": false,
        "txHash": "0xabc123def456abc123def456abc123def456abc123def456abc123def456abc1",
        "fromAddress": "0x1234567890abcdef1234567890abcdef12345678",
        "chain": "base",
        "paymentLinkId": "PL25GHI789RST345",
        "merchantReference": "cart_8842",
        "createdAt": "2026-05-12T10:00:00Z"
      }
    ],
    "total": 1,
    "page": 1,
    "size": 20,
    "pages": 1
  }
}

Response Fields

FieldTypeDescription
idstringOrder ID — ORD + 2-digit year + 12 uppercase chars.
statusstringCanonical status: PENDING, PAID, FAILED, CANCELED, or REFUNDED.
displayStatusstringHuman-facing status: Pending, Paid, Processing, Failed, Canceled, Disputed, Refunded, Partially Refunded, Action Required, Authorized, Incomplete. The status query parameter filters on this value.
amountCentsintegerAmount in minor units (cents). 1000 = 10.00 USDC.
currencystringSettlement currency, e.g. USDC.
customerIdstringCustomer ID, or CRYPTO_PAYER / X402_PAYER / CREDITS_PAYER for crypto, on-chain x402, and credit-funded orders.
customerEmailstring?Buyer email when known; omitted otherwise.
productIdstring?Product ID (PRD…); omitted when unset.
productNamestring?Product name; omitted when unset.
disputedbooleanWhether the order is under dispute.
refundedbooleanWhether the order was refunded.
amountRefundedintegerRefunded amount in cents; omitted when 0.
txHash, fromAddress, chainstring?On-chain settlement details; populated only for crypto / x402 orders, omitted otherwise.
paymentLinkIdstring?Originating payment link (PL…); omitted when unset.
merchantReferencestring?Your correlation ID, set when the order was created. Filterable via merchant_reference.
createdAtstringRFC 3339 UTC timestamp.
List records do not include provider, providerPaymentId, or providerStatus — fetch a single order to get those.

GET /v1/orders/:id

Get a single order, including the underlying provider payment details.

Request

curl https://merchant-api-prod.anyway.sh/v1/orders/ORD25A7BK3NX9QRZ4 \
  -H "X-API-Key: ak_YOUR_API_KEY"

Path Parameters

ParamTypeDescription
idstringThe order ID to retrieve

Response

{
  "success": true,
  "message": "Order retrieved",
  "data": {
    "id": "ORD25A7BK3NX9QRZ4",
    "status": "PAID",
    "displayStatus": "Paid",
    "amountCents": 1000,
    "currency": "USDC",
    "customerId": "CRYPTO_PAYER",
    "productId": "PRD25XWPQ8TN2VHK6",
    "productName": "API Credits — Starter",
    "disputed": false,
    "refunded": false,
    "txHash": "0xabc123def456abc123def456abc123def456abc123def456abc123def456abc1",
    "fromAddress": "0x1234567890abcdef1234567890abcdef12345678",
    "chain": "base",
    "paymentLinkId": "PL25GHI789RST345",
    "merchantReference": "cart_8842",
    "createdAt": "2026-05-12T10:00:00Z",
    "provider": "CRYPTO",
    "providerStatus": "confirmed"
  }
}
A single order returns every list field plus the upstream payment-provider details:
FieldTypeDescription
providerstringPayment provider: STRIPE, CRYPTO, X402, or CREDITS.
providerPaymentIdstring?Upstream payment ID (e.g. Stripe PaymentIntent); omitted for on-chain orders.
providerStatusstring?Upstream status — Stripe PaymentIntent status, or chain settlement status for crypto orders.

Errors

StatusDescription
401API key missing or invalid.
404Order does not exist or does not belong to your organization.