Skip to main content

Invoice Status

An invoice is a document you send to your client after they purchase goods or services from you. It serves two main purposes: to record the sale and to request payment. For comprehensive information about PayTabs invoices, please refer to our articleWhat is PayTabs Invoice?

If you need to check the status of an invoice, you can use the query invoice status endpoint. In this manual, we’ll guide you on how to use and manage this endpoint. We strongly recommend that you and your team read theInvoices | Payment Workflowmanual first to grasp the business logic underlying this integration type



In this tutorial, we will rely on the PayTabs Status Transaction API Endpoint, mentioned on the PayTabs API endpoints postman collection, which you can access fromhere. The endpoint will need to be accessed with a POST request on the below-mentioned URL

POST{{domain}}/payment/invoice/{{invoice_id}}/status
Be Aware Of

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.

https://secure.paytabs.sa/payment/invoice/{{invoice_id}}/status

The Minimum Required Parameters

To initiate a query invoice 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 query type:

In the GET invoice status, we simply use a GET request passing only the {invoice_id} as a param in the endpoint URL to get the status. As shown in the below sample request.


Sample Request Payloads

As mention before, for get request, you only need to pass the invoice it and the server key to API key.

Alt text

Sample Response Payloads

When an invoice is paid, it results in creating a new transaction, and you will receive the transaction details in the status response.

{
"invoice_status": "paid",
"tran_ref": "TST2104500076080",
"tran_status": "A",
"tran_status_msg": "Authorised"
}

Otherwise, it will return the invoice status only, as shown below:

{
"invoice_status": "pending"
}

We are glad to be always in help. We aim to serve you better each time. As such, please spare a minute to share feedback about your recent experience with PayTabs Developers , on Trustpilot, or Google Reviews.