v1

latestOpenAPI 3.0.02026-07-24231140.6 KB
Invoices

Retrieve user invoices.

get/invoices

Query parameters

startinteger

Start index (Default: 0).

limitinteger

Maximum amount of returned records (Maximum/Default: 50).

afterstring

Start date for limiting results (Inclusive). Example: 2021-01-01 12:00:00.

beforestring

End date for limiting results (Non-Inclusive). Example: 2021-01-01 12:00:00.

Response

Success

Example response

{
  "meta": {
    "limit": 1,
    "after": "2021-10-04 00:00:00",
    "before": "2021-10-05 00:00:00",
    "_endpoint": "/invoices"
  },
  "data": [
    {
      "id": "c2b27180-610e-4132-af77-ad42fc0ac444",
      "created_time": "2021-10-04T17:12:02.142Z",
      "completed_time": "2021-10-04T17:12:11.990Z",
      "status": "not_delivered",
      "user": {
        "id": "613b62204ef8b621bdb47539",
        "email": "test@bitrefill.com"
      },
      "payment": {
        "method": "balance",
        "address": "bc1qthrlhrdtk8vv7p25cmwat87kg7ezfjglrx5xyr",
        "currency": "USD",
        "price": 10,
        "status": "unpaid",
        "commission": 0.0001
      },
      "orders": [
        {
          "id": "615b35e2f616a8092ee45aff",
          "status": "created",
          "product": {
            "id": "test-gift-card-code",
            "name": "Test Gift Card Code",
            "value": "10",
            "currency": "USD",
            "image": "https://res.cloudinary.com/bitrefill/d_operator.png/this_is_a_test",
            "_href": "https://api-bitrefill.com/2/products/test-gift-card-code"
          },
          "created_time": "2021-10-04T17:12:02.101Z",
          "delivered_time": "2021-10-04T17:12:11.990Z"
        }
      ]
    }
  ]
}