Introduction
Endpoints
- Accounts
- Fees
- Invoices
- Meters
- Plans
- Subscriptions
- Credit grants
- Products
- Orders
- Payments
Orders
List orders
Retrieves a list of orders.
GET
/
orders
Copy
curl --request GET \
--url https://sandbox-api.billingrails.com/v1/orders \
--header 'Authorization: Bearer <token>'
Copy
{
"orders": [
{
"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
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Response
200 - application/json
Success
The response is of type object
.
Copy
curl --request GET \
--url https://sandbox-api.billingrails.com/v1/orders \
--header 'Authorization: Bearer <token>'
Copy
{
"orders": [
{
"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
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.