Retrieve Invoice Details
An invoice is a document you provide to your client after they purchase goods or services from you. It serves to both record the sale and request payment. For detailed information about PayTabs invoices, please refer to our articleWhat is PayTabs Invoice?
In this manual, we outlines the proper method for retrieving complete invoice details using the designated API endpoint. Prior to proceeding with this integration, it is strongly recommended that you and your technical team review the Invoices | Payment Workflowmanual first to grasp the business logic behind this integration type.
The Endpoint and Related Postman Collection
In this tutorial, we will rely on the PayTabs retrieve invoice details Transaction API Endpoint, mentioned on the PayTabs API endpoints postman collection, which you can access fromhere.
- Via GET Request
- Via POST Request
The endpoint will need to be accessed with a GET request on the below-mentioned URL
GET | {{domain}}/payment/invoice/{invoice_id}/details |
---|
Please note that not using the proper endpoint URL {domain} will lead to authentication issues within your responses. To find the your proper domain you can read ourWhat is my (Region)/(endpoint URL)?tutorial article.
- KSA
- UAE
- Egypt
- Oman
- Jordan
- Kuwait
- Global
https://secure.paytabs.sa/payment/invoice/{invoice_id}/details
https://secure.paytabs.com/payment/invoice/{invoice_id}/details
https://secure-egypt.paytabs.com/payment/invoice/{invoice_id}/details
https://secure-oman.paytabs.com/payment/invoice/{invoice_id}/details
https://secure-jordan.paytabs.com/payment/invoice/{invoice_id}/details
https://secure-kuwait.paytabs.com/payment/invoice/{invoice_id}/details
https://secure-global.paytabs.com/payment/invoice/{invoice_id}/details
The endpoint will need to be accessed with a POST request on the below-mentioned URL
POST | {{domain}}/payment/invoice/details |
---|
Please note that not using the proper endpoint URL {domain} will lead to authentication issues within your responses. To find the your proper domain you can read ourWhat is my (Region)/(endpoint URL)?tutorial article.
- KSA
- UAE
- Egypt
- Oman
- Jordan
- Kuwait
- Global
https://secure.paytabs.sa/payment/invoice/details
https://secure.paytabs.com/payment/invoice/details
https://secure-egypt.paytabs.com/payment/invoice/details
https://secure-oman.paytabs.com/payment/invoice/details
https://secure-jordan.paytabs.com/payment/invoice/details
https://secure-kuwait.paytabs.com/payment/invoice/details
https://secure-global.paytabs.com/payment/invoice/details
How It Works?
After your invoice is initiated and exist, and regardless of it statuses: "paid," "pending," or "canceled." For more information on invoice statuses, please refer to our invoice status manual. This article specifically outlines the proper method for fetching the full invoice details using the Invoice details request.
The Minimum Required Parameters
To make a retrieve invoice details request, there are minimum required parameters that need to be passed with valid information. The specification of these required parameters is clarified below according to the request type:
- Via GET Request
- Via Post Request
In the GET request type, you can fetch the full invoice details by sending a GET request with only the { invoice_id } as a parameter in the URL. Below is a sample request that demonstrates how to retrieve an invoice's details with the ID "3248035".

In the POST request type, you simply use a POST request with only the invoice_id
and profile_id
as payload parameters to retrieve the invoice details. As shown below
Parameter | Data Type | Min | Max | Required |
---|---|---|---|---|
| INT | Accept only valid profile number. | ✔ | |
The merchant Profile ID you can get from your PayTabs dashboard. For more information please check our How to get your account information from PT2 Dashboard? solution article. To know more about this parameter please click here. | ||||
|
Parameter | Data Type | Min | Max | Required |
---|---|---|---|---|
| INT | 1 | 9999999999 | ✘ |
invoice_id is one of the parameters that received from our side in the payload. | ||||
|

Sample Request Payloads
- Via GET Request
- Via Post Request
As we mentioned before, you can retrieve the invoice details by sending a GET request with only the { invoice_id } as a parameter in the URL. Below is a sample request that demonstrates how to fetch an invoice with the ID "3248035."

For post request, you need to set as usual the Invoice ID and the profile ID in the request as shown below:
{
"profile_id": {{profile_id}},
"invoice_id": {{invoice_id}}
}
Sample Response Payloads
Retrieves the complete details associated with the specified invoice_id. If the invoice status is paid, the response payload will include an additional parameters transaction-specific metadata: tran_ref (transaction reference), tran_status (transaction status code), and tran_status_msg (transaction status message), providing further context about the completed payment.
{
"invoice_details": {
"id": 3248030,
"lang": "en",
"shipping_charges": "0.00",
"extra_charges": "0.00",
"extra_discount": "0.00",
"total": "109.50",
"activation_date": 0,
"expiry_date": 1758965580,
"due_date": 1758875760,
"issue_date": 1750851435,
"line_items": [
{
"sku": "sku",
"description": "product/service description",
"url": "https://www.your-store-domain.com/product-path",
"unit_cost": "109.50",
"quantity": "1",
"net_total": "109.50",
"discount_rate": "0",
"discount_amount": "0.00",
"tax_rate": "0",
"tax_total": "0.00",
"total": "109.50"
}
]
},
"invoice_status": "pending", // "cancelled" or "paid"
// if the status is "paid" the following parameters will return within the payload
"tran_ref": "TST2517602100955",
"tran_status": "A",
"tran_status_msg": "Authorised"
}
Please check the following possible HTTPs error responses:
- 404 Not Found
- 429 Too Many Requests
- 401 Unauthorized
If an invalid or not existing invoice ID has been provided, the API will respond with a 404 Not Found, indicating that this invoice ID not exist.
{
"code": 2,
"message": "Invoice not found",
"trace": "PMNT0401.685BF3BB.0000B10E"
}
If you sent 60 request per minute trying to retrieve an invoice details, the error 429 Too Many Requests will occurs.
{
"code": 5,
"message": "Too many requests, try again later.",
"trace": "PMNT0401.685BEC48.0000A2E6"
}
If an invalid profile_id or incorrect authorization server key is provided in the request header, the API will respond with a 401 Unauthorized, indicating authentication failure.
{
"code": 1,
"message": "Authentication failed. Check authentication header.",
"trace": "PMNT0402.685BF22C.0000AD86"
}