Verify Transaction

Asides from the webhooks we send, you can also verify the transaction status of your customer's payment.

Verify Transaction API

API Details

Action: Verify Transaction
Method: GET
Path: /v1/transaction/:transaction_id/status
Auth Requirement: Public or Secret Key (Bearer Auth)

Business Summary

This endpoint verifies the current status of a transaction using its unique transaction ID. It returns the latest transaction details, allowing you to check the current state of the customer's transaction.

You can use this API to:

  • Confirm Payment Success: Verify if a transaction has reached the SUCCESS status before delivering the product or service to the customer.
  • Poll for Updates: Check the real-time status of a pending transaction to update your UI, especially if webhooks are delayed or unavailable.

Request Parameters

NameTypeRequiredDefaultAllowed ValuesDescription
transaction_idstringYes--Basqet transaction ID

Request Headers

NameTypeRequiredDefaultAllowed ValuesDescription
AuthorizationstringYes--Bearer pub_... or Bearer sec_...

Request Examples

cURL

curl \--request GET \\  
     \--url <https://api.basqet.com/v1/transaction/transaction\_id/status> \\  
     \--header 'Authorization: Bearer bq\_sk\_{domain}\_s3cr3tk3y'

Response Schema

FieldTypeNullableDescription
statusstringNoStatus of the API request
dataobjectNoContains the verified transaction details
data.statusstringNoTransaction status. Values: INITIATED, PROCESSING, PENDING, SUCCESSFUL, ABANDONED, OVERPAID, UNDERPAID, FAILED
metaobjectNoAdditional configuration

Sample Response

{  
  "status": "success",  
  "data": {  
    "status": "INITIATED"  
  },  
  "meta": {}  
}

Error Reference

HTTP CodeMessageResolution
400Varies (e.g., "Invalid Key")Ensure the Authorization header contains a valid key with the correct prefix (pub or sec).
401No key providedInclude the Authorization header with a valid bearer token in your request.
403You are not permitted to carry out this actionVerify that the API key being used belongs to the same merchant that created the transaction.
404Varies (e.g., "Transaction does not exist")Confirm that the transaction_id or reference in the URL path is correct and exists in the system.
500Internal server errorAn unexpected error occurred on the server. Please wait a moment and retry your request.