Skip to Content

Checkout Status

Query the status of a single checkout or list all checkouts for your account.

Get Single Checkout

Retrieve details for a specific checkout by ID.

GET /v1/checkout/:id

Authentication

This endpoint requires API Key only (no signature required for GET requests).

HeaderRequiredDescription
blox-api-keyYesYour API key

Path Parameters

ParameterTypeDescription
idstring (UUID)The checkout ID

Example Request

curl "https://api.blox.my/v1/checkout/8f14e45f-ceea-467f-a830-5e3e3c7e2b8a" \ -H "blox-api-key: $BLOX_API_KEY"

Response

{ "id": "8f14e45f-ceea-467f-a830-5e3e3c7e2b8a", "version": 1, "addressTo": "0x742d35Cc6634C0532925a3b844Bc9e7595f8bD21", "amount": "15000", "fee": "0", "status": "COMPLETED", "metadata": { "title": "Order #123", "description": "Premium subscription - 1 month", "redirectUrl": "https://yoursite.com/success", "webhookUrl": "https://yoursite.com/webhooks/blox" }, "expiresAt": "2026-02-03T15:20:00.000Z", "token": { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "MYRC", "symbol": "MYRC" }, "tokenWithdrawal": { "id": "withdrawal-uuid-here", "status": "COMPLETED", "transaction": { "txHash": "0xabc123def456...", "confirmedAt": "2026-02-03T15:05:30.000Z" } }, "createdAt": "2026-02-03T15:00:00.000Z", "updatedAt": "2026-02-03T15:05:30.000Z" }

Response Fields

FieldTypeDescription
idstringUnique checkout identifier
addressTostringMerchant’s wallet address
amountstringPayment amount in cents
feestringTransaction fee in cents
statusstringCurrent checkout status
metadataobjectTitle, description, URLs
expiresAtstringCheckout expiration timestamp
tokenobjectToken details (id, name, symbol)
tokenWithdrawalobjectTransaction details (if payment completed)
createdAtstringCheckout creation timestamp
updatedAtstringLast update timestamp

List All Checkouts

Query all checkouts for your account with pagination and filtering.

GET /v1/checkout

Authentication

This endpoint requires API Key only (no signature required for GET requests).

Query Parameters

ParameterTypeRequiredDescription
skipintegerNoNumber of records to skip (default: 0)
takeintegerNoNumber of records to return (default: 20, max: 100)
statusstringNoFilter by status
startDtstring (ISO 8601)NoFilter by creation date (from)
endDtstring (ISO 8601)NoFilter by creation date (to)

Status Filter Values

StatusDescription
CREATEDCheckout created, awaiting customer
PENDINGCustomer selected wallet, ready to pay
PROCESSINGPayment initiated, waiting for confirmation
COMPLETEDPayment successful
FAILEDPayment failed
CANCELLEDCheckout cancelled

Example Request

# Get recent checkouts curl "https://api.blox.my/v1/checkout?take=10" \ -H "blox-api-key: $BLOX_API_KEY" # Filter by status curl "https://api.blox.my/v1/checkout?status=COMPLETED&take=50" \ -H "blox-api-key: $BLOX_API_KEY" # Filter by date range curl "https://api.blox.my/v1/checkout?startDt=2026-01-01T00:00:00Z&endDt=2026-01-31T23:59:59Z" \ -H "blox-api-key: $BLOX_API_KEY"

Response

{ "data": [ { "id": "8f14e45f-ceea-467f-a830-5e3e3c7e2b8a", "addressTo": "0x742d35Cc...", "amount": "15000", "fee": "0", "status": "COMPLETED", "metadata": { "title": "Order #123", "redirectUrl": "https://yoursite.com/success" }, "expiresAt": "2026-02-03T15:20:00.000Z", "token": { "id": "550e8400-...", "name": "MYRC", "symbol": "MYRC" }, "tokenWithdrawal": { "id": "withdrawal-uuid", "status": "COMPLETED" }, "createdAt": "2026-02-03T15:00:00.000Z" }, { "id": "another-checkout-id", "addressTo": "0x742d35Cc...", "amount": "5000", "fee": "0", "status": "PENDING", "metadata": { "title": "Order #124", "redirectUrl": "https://yoursite.com/success" }, "expiresAt": "2026-02-03T16:00:00.000Z", "token": { "id": "550e8400-...", "name": "MYRC", "symbol": "MYRC" }, "tokenWithdrawal": null, "createdAt": "2026-02-03T15:40:00.000Z" } ], "total": 42, "skip": 0, "take": 10 }

Response Fields

FieldTypeDescription
dataarrayList of checkout objects
totalintegerTotal number of matching checkouts
skipintegerNumber of records skipped
takeintegerNumber of records returned

Status Lifecycle

Checkouts progress through these statuses:

CREATED ──────► PENDING ──────► PROCESSING ──────► COMPLETED │ │ │ │ │ ├──────────► FAILED │ │ │ └───────────────┴────────────────┴──────────► CANCELLED

Status Descriptions

StatusDescriptionNext States
CREATEDCheckout link generated, customer hasn’t startedPENDING, CANCELLED
PENDINGCustomer authenticated and selected walletPROCESSING, CANCELLED
PROCESSINGPayment submitted, waiting for blockchain confirmationCOMPLETED, FAILED
COMPLETEDPayment successful, funds transferred to merchant(Final)
FAILEDPayment failed (insufficient balance, network error, etc.)(Final)
CANCELLEDCancelled by customer, timeout, or merchant(Final)

Automatic Cancellation

Checkouts are automatically cancelled if:

  • The customer doesn’t complete payment within 20 minutes
  • The checkout link expires before the customer starts

Errors

404 Not Found

Checkout doesn’t exist or doesn’t belong to your account:

{ "error": { "code": "not_found", "message": "Checkout not found" } }

Code Examples

Node.js

async function getCheckout(apiKey: string, checkoutId: string) { const response = await fetch( `https://api.blox.my/v1/checkout/${checkoutId}`, { headers: { "blox-api-key": apiKey, }, } ); return response.json(); } async function listCheckouts( apiKey: string, options?: { skip?: number; take?: number; status?: string; startDt?: string; endDt?: string; } ) { const params = new URLSearchParams(); if (options?.skip) params.set("skip", options.skip.toString()); if (options?.take) params.set("take", options.take.toString()); if (options?.status) params.set("status", options.status); if (options?.startDt) params.set("startDt", options.startDt); if (options?.endDt) params.set("endDt", options.endDt); const response = await fetch( `https://api.blox.my/v1/checkout?${params.toString()}`, { headers: { "blox-api-key": apiKey, }, } ); return response.json(); } // Usage const checkout = await getCheckout(apiKey, "8f14e45f-ceea-467f-a830-5e3e3c7e2b8a"); console.log("Status:", checkout.status); const completedCheckouts = await listCheckouts(apiKey, { status: "COMPLETED", take: 50, }); console.log("Completed:", completedCheckouts.total);

Python

import requests def get_checkout(api_key: str, checkout_id: str): response = requests.get( f"https://api.blox.my/v1/checkout/{checkout_id}", headers={"blox-api-key": api_key}, ) return response.json() def list_checkouts(api_key: str, **kwargs): params = {k: v for k, v in kwargs.items() if v is not None} response = requests.get( "https://api.blox.my/v1/checkout", headers={"blox-api-key": api_key}, params=params, ) return response.json() # Usage checkout = get_checkout(api_key, "8f14e45f-ceea-467f-a830-5e3e3c7e2b8a") print("Status:", checkout["status"]) completed = list_checkouts(api_key, status="COMPLETED", take=50) print("Completed:", completed["total"])

Polling vs Webhooks

For real-time status updates, we recommend using webhooks instead of polling.

ApproachProsCons
PollingSimple to implementDelayed updates, more API calls
WebhooksReal-time, efficientRequires public endpoint

If you must poll, we recommend:

  • Poll every 5 seconds for PROCESSING checkouts
  • Stop polling after status is COMPLETED, FAILED, or CANCELLED
  • Implement exponential backoff for rate limit errors
Last updated