Verify Transaction
The Verify Transaction endpoint allows you to verify the status and details of a data purchase transaction made through the DiscountData API. By utilizing this endpoint, you can ensure the integrity of the transaction and retrieve the relevant information to update your systems or provide accurate notifications to your users.
Verify A Transaction Details
GET
https://app.discountdata.ng/public/api/transaction/{reference_id}
Replace {reference_id} with an actual transaction reference.
Headers
Authorization*
Bearer
Your API Bearer Token
In the example above, a successful verification request for the transaction with reference ID "ABCD1234" returns the details of the verified transaction. The response includes the transaction ID, status ("completed" in this case), mobile number, data plan, purchase date, and expiry date.
Please note that the actual response may contain additional fields or information depending on the specific transaction and its associated details.
Handling Verify Transaction Responses
When you receive a response from the Verify Transaction endpoint, you can utilize the provided transaction details to update your systems, perform necessary validations, or trigger appropriate actions based on the transaction status.
For example, you can:
Update user profiles or data usage statistics based on the verified transaction.
Provide accurate notifications to users regarding the status or expiry date of their purchased data plan.
Synchronize the verified transaction details with external systems or databases.
Make sure to handle the responses securely and perform any necessary validations to ensure the integrity and authenticity of the received data.
Error Handling
In case of an invalid or non-existent reference ID, the Verify Transaction endpoint will return an appropriate error response. It is essential to handle such error responses and provide meaningful feedback to users or log the error for further investigation and troubleshooting.
Now that you understand the purpose and usage of the Verify Transaction endpoint, you can leverage this functionality to verify and process data purchase transactions effectively.
If you have any further questions or require assistance regarding the Verify Transaction endpoint or any other aspect of the DiscountData API, please don't hesitate to contact our support team.
Let's continue exploring the other endpoints and functionalities provided by the DiscountData API!
Last updated