How to check order status and retrieve codes

After creating an order, you can fetch its current status and details — including gift card codes — using the order ID returned from POST /orders.

When to use this

Use GET /orders/{id} when you need to:

  • Show the customer their order status (e.g. “Order status” or “My orders” page).
  • Retrieve or refresh gift card codes if they were not available immediately.
  • Support or dispute resolution: look up an order by ID.

Do not use POST /orders/check for this; that endpoint is for checking product stock (item_id + quantity), not order status.

Step 1: Request order details

Endpoint: GET https://api.cardpluspay.com/v1/orders/{id}

Replace {id} with the order_id from the create-order response (e.g. 123).

Example request

curl -X GET "https://api.cardpluspay.com/v1/orders/123" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Accept: application/json"

Step 2: Use the response

On success, data contains the order details, including status and codes:

{
  "success": true,
  "message": "Order details retrieved successfully",
  "data": {
    "order_id": 123,
    "order_no": "ORD-2026-001",
    "status": "completed",
    "state": "success",
    "codes": [
      { "code": "XXXX-XXXX-XXXX-XXXX", "status": "completed" }
    ],
    "amount": 5.00,
    "created_at": "..."
  }
}

Use status and state to display order state to the user. Use codes to show or send the gift card codes. If codes were not ready at creation time, polling this endpoint lets you fetch them when they become available.

Error handling

404 — Order not found. The ID may be wrong or the order may belong to another account. 401 — Invalid or missing API key.

← Create order · Integration Guide · List orders & balance →