Verify Transaction

Aside from the webhooks Basqet sends, you can also verify the transaction status of your customer’s payment.

API Details

FieldValue
ActionVerify Transaction
MethodGET
Path/v1/transaction/:transaction_id/status
Auth RequirementPublic or secret key using 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 SUCCESSFUL 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

Path Parameters

NameTypeRequiredDefaultAllowed ValuesDescription
transaction_idstringYesBasqet transaction ID.

Request Headers

NameTypeRequiredDefaultAllowed ValuesDescription
AuthorizationstringYesBearer pub_... or Bearer sec_...Bearer token for authentication.

Request Example

cURL

curl --request GET \
  --url https://api.basqet.com/v1/transaction/transaction_id/status \
  --header 'Authorization: Bearer sec_live_xxxxxxxxxxxxx'

Response Schema

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

Sample Response

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

Error Reference

HTTP CodeMessageResolution
400Varies, e.g. Invalid KeyEnsure the Authorization header contains a valid key with the correct prefix, either 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 existConfirm 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. Retry the request.