Integrations Guides
Verify Payment

Verify Payments

This document will go through the necessary actions taken to verify transactions after payment using Chapa’s API.

How to Verify Payments

Verifying payment is dependent on the method used when first initializing a transaction. This request is initiated from your callback URL. Using your transaction reference, a GET request is needed to be made to the Verify Transaction endpoint server.

Here is a sample code for verifying transactions:

Endpoint https://api.chapa.co/v1/transaction/verify/<tx_ref>

<tx_ref> is the tx_ref that was set when initiating a payment.

Method GET

  • Authorization : Pass your secret key as a bearer token in the request header to authorize this call.
import requests      url = "https://api.chapa.co/v1/transaction/verify/chewatatest-6669"  payload = ''  headers = {      'Authorization': 'Bearer CHASECK_TEST-XXXXXXXXXXXXXXX'  }  response = requests.get(url, headers=headers, data=payload)  data = response.text  print(data)

ℹ️
Refer to our Error Codes page for all responses for this request.