POST
/
orders
/
{id}
/
cancel
curl --request POST \
  --url https://sandbox-api.billingrails.com/v1/orders/{id}/cancel \
  --header 'Authorization: Bearer <token>'
{
  "order": {
    "object": "order",
    "id": "ord_IhMUl3rrZ3",
    "created_at": "2025-02-14T17:33:40.843Z",
    "number": "ORD-001",
    "status": "confirmed",
    "payment_status": "paid",
    "fulfillment_status": "pending",
    "return_status": "none",
    "currency": "NGN",
    "subtotal_amount": 5000,
    "total_amount": 5000,
    "paid_amount": 5000,
    "outstanding_amount": 0,
    "account_id": "acc_IhMUl3rrZ3",
    "line_items": [
      {
        "object": "order_line_item",
        "id": "oli_IhMUl3rrZ3",
        "product_name": "Premium Plan",
        "product_variant_name": null,
        "description": "Premium subscription plan",
        "quantity": 1,
        "unit_amount": 5000,
        "subtotal_amount": 5000,
        "total_amount": 5000,
        "product_id": "prod_IhMUl3rrZ3",
        "product_variant_id": "pv_IhMUl3rrZ3"
      }
    ],
    "metadata": null
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Response

200 - application/json

Order canceled

The response is of type object.