Verify a payment

How to get a Notch Pay payment status

To verify a transaction, you make a GET request to the Verify Transaction API endpoint from your server using your transaction reference. The method you used to initialize the transaction determines the process:

  • From Popup or Mobile SDKs:
    • Send the reference to your server.
    • From your server, call the verify endpoint.
  • From the Redirect API:
    • Initiate the request from your callback URL.
    • The transaction reference is returned as a query parameter to your callback URL.

Here's a code sample for verifying transactions:

curl https://api.notchpay.co/payments/:reference
-H "Authorization: YOUR_PUBLIC_KEY"
-X GET
The API response includes a status key, response.status, indicating the status of the API call. However, it's important to note that this does not reflect the status of the payment. The transaction status is located within the payment object in the verify API response, specifically response.payment.status. To learn more about the Notch Pay API format, refer to their documentation.

Copyright © 2024 Notch Pay