List Invoice (Shop)

see list of invoice

The List Invoice (Shop) endpoint provides a paginated list of invoices, including details such as amounts, statuses, and associated shop information. Use this endpoint to retrieve multiple invoices at once and filter or sort them based on various criteria like status, creation date, and currency.

GET https://api.payhubix.com/v1/payment/shops/019242e7-d18f-788f-813e-a2c72177e172/invoices/

Note: you must insert shop_id in path param request.

Request Header:

Name
Type
Description

X-Api-Key*

string

Your API key for authentication and authorization.

Request Params:

Name

Type

Description

page

integer

Specifies the page number of the results.

per_page*

integer

Sets the number of invoices per page.

status

string

Filters invoices by their status.

created_at

string

Sorts results by creation date (e.g., asc or desc).

currency_symbol

string

Filters invoices by their Fiat symbol(e.g, USD, EUR).

Response

Name

Type

Description

page_count*

integer

Total number of pages for the current request.

page*

integer

Current page number.

previous_page*

integer

Previous page number.

next_page*

integer

Next page number.

currency_amount*

float

The total amount for the invoice in the specified currency.

remaining_currency_amount*

float

The remaining unpaid amount of the invoice.

currency_symbol*

string

The symbol of the currency for this invoice.

status*

string

The current status of the invoice.

link*

string

The unique identifier for the invoice, used to generate the payment URL.

created_at*

string

The timestamp when the invoice was created.

order_id

string

Optional ID for the order associated with this invoice.

shop.name*

string

Name of the shop.

shop.website

string

The website of the shop (if provided).

shop.shop_id*

string

The unique identifier for the shop.

shop.transfer_fee_by*

string

Specifies whether the fee for the transaction is covered by the customer or the merchant.

shop.service_fee_by*

string

Specifies who will cover the service fee.

shop.logo_url

string

URL of the shop's logo (if provided).

invoice_url

string

The URL of invoice.

Note: thecurrency_symbolfield should be IDs of Supported Fiat.

Node: The current status of the invoice. Possible values are: Created, Pending, Paid,Canceled,Partially, PartiallyExpired,Expired

An example of response:

{
    "error": false,
    "number": 0,
    "message": {
        "page_count": 2,
        "page": 1,
        "previous_page": 0,
        "next_page": 2,
        "invoices": [
            {
                "currency_amount": 1,
                "remaining_currency_amount": 0,
                "currency_symbol": "USD",
                "status": "Paid",
                "link": "INV-LUE9K66Q",
                "created_at": "2024-09-30 20:58:22.354937 +0000 UTC",
                "order_id": "#12325425",
                "shop": {
                        "name": "Amazon",
                        "website": "https://www.amazon.com/",
                        "shop_id": "019242e7-d18f-788f-813e-a2c72177e172",
                        "transfer_fee_by": "Customer",
                        "service_fee_by": "Merchant",
                        "logo_url": null
                },
                "invoice_url": "https://payhubix.com/pay/INV-LUE9K66Q"
            }
        ]
    }
}

Example codes:

curl --location 'https://api.payhubix.com/v1/payment/shops/019242e7-d18f-788f-813e-a2c72177e172/invoices/?per_page=2&page=1' \
--header 'X-Api-Key: YOUR_API_KEY'

Note: Please make sure to replace YOUR_API_KEY in the code snippets with your actual merchant API key

Last updated