View Your Invoices
With the Textmagic API, you can check the invoices and transactions for your account.
Get all invoices
To view all of your invoices, use:
GET /api/v2/invoices
with the parameters:
| Name | Required? | Example | Description |
|---|---|---|---|
| page | No |
|
Fetch the specified results page. The default is 1. |
| limit | No | 25 |
The number of results per page. The default is 10. |
Only parent users and administrator sub-accounts can view invoices.
You will receive this paginated response:
| Parameter | Example | Description |
|---|---|---|
| page | 3 |
The current fetched page. |
| limit | 25 |
The number of results per page. |
| pageCount | 150 |
The total number of pages. |
| resources | Array of invoice objects | See session below for details. |
Invoice resource format
| Parameter | Example | Description |
|---|---|---|
| id | 1099 |
The invoice ID. |
| bundle | 200 |
Top up amount. |
| currency | USD |
Top up currency. |
| vat |
|
VAT charged (if any). |
| paymentMethod |
|
Payment method description. |
The next step
Now that you’ve learned how to view your invoices via the Textmagic API, you can check our Code libraries to view ready-made scripts in different languages which you can use to quickly build powerful SMS based applications.