Quickstart

Check the Status of a Payment

4min

Finding Your Transaction Id

If you created the payment link through the API you were given a transaction link as well as an identifier. The identifier is what we use to identify a transaction, which is also contained in the last section of the link.

JSON


If you did not save the identifier or link, transaction identifiers can be found on the Payment page on your Jetpay dashboard.

Simply click on the payment in the Payments table to see all transaction details, including the ID.

Document image


Creating the Query

Now that you have an API token and a payment identifier, you are ready to query a transaction's status.

See the API docs for the Transaction Status for more details and additional languages. If you have followed the steps in Getting your API Key, you can call the endpoint with the parameters we've gathered.

If you want to test this without setting up a client, you can do this by using CURL.

  • Replace <your api token here> and {identifier} with the API token and identifier you just found.
Shell


Using the Response

If you have done everything correctly, you will receive a HTTP 200 response from the API indicating that the request status was retrieved.



On the right is a sample response. The "state" is the most important; this is the current state of the transaction.



There are many potential states, but the most important ones are: "initiated", "failed", and "completed". If the state shows "failed", additional information about why the transaction failed is included in the form of the "fail_reason" and "fail_direction".

JSON


For more information about the states, the failure reasons, and the failure direction, see the API Docs.