Skip to main content

Verify Transaction

This is an endpoint that allows you to query the status of a particular transaction using the unique transaction reference attached to the transaction.

RESPONSE

The API responses returns a status code and a data object

Response Status Code

The response when this endpoint is queried returns a status code of 200 0r 400.

Status Code 200

A status code of 200 is returned for a valid transaction ref.

Status Code 400

A status code of 400 is returned for an invalid transaction ref

Response Data Object

The data object returned in the response is null when the status code is 400 and populated when the status code is 200.

The data object contains a parameter known as the transaction_status which differentiates the transaction type.

Transaction status can either be Success, Failed, Abandoned or Pending

caution

Authorization Any request made without the authorization key (secret key) will fail with a 401 (Unauthorized) response code.

info

The authorization key is sent via the request header as Bearer Token Authorization

Example:

Authorization: Bearer sandbox_sk_94f2b798466408ef4d19e848ee1a4d1a3e93f104046f

GET
https://sandbox-api-d.squadco.com/transaction/verify/{{transaction_ref}}

This verifies a transaction

To verify the validity of a transaction, kindly query the endpoint above by replacing {{transaction_ref}} with the unique transaction_ref of the transaction you want to verify

Parameters

Query

transaction_ref*

String

Unique transaction reference that identifies each transaction

Responses

200:OK
Valid Transaction Reference
{
"status": 200,
"success": true,
"message": "Success",
"data": {
"transaction_amount": 5000,
"transaction_ref": "SQCHIZ3634573076082",
"email": "ayo@gmail.com",
"transaction_status": "Success",
"transaction_currency_id": "NGN",
"created_at": "0001-01-01T00:00:00",
"transaction_type": "VirtualAccount",
"merchant_name": "CHIZOBA ANTHONY",
"merchant_business_name": null,
"gateway_transaction_ref": "SQCHIZ3634573076082",
"recurring": null,
"merchant_email": "okoyeanthonychizoba@gmail.com",
"plan_code": null
}
}
400:Bad Request
Invalid Transaction Reference
{
"status": 400,
"success": false,
"message": "Invalid transaction reference",
"data": {}
}
401:Unauthorized
Unauthorized Request
{
"success": false,
"message": "",
"data": {}
}
403:Forbidden
Invalid API Key
{
"success": false,
"message": "API key is invalid. Key must start with sandbox_sk_",
"data": {}
}

Go Live

If you are using the verify transaction endpoint, kindly change the base URL to https://api-d.squadco.com