Get transaction info
Retrieve a single transaction by its ID or reference. You must provide at least one of transactionId or reference.
GET https://api.tagpay.ng/v1/transaction/info
Query parameters
The UUID of the transaction. Takes precedence over reference when both are provided.
The unique reference string assigned to the transaction.
You must supply either transactionId or reference. Requests that omit both will receive a 400 error.
Response
true when the request succeeded.
The matching transaction record. Unique transaction identifier (UUID).
Transaction reference string.
success, pending, or failed.
Transaction amount in kobo.
Total deducted amount including fee and VAT.
Source account or wallet.
Destination account or wallet.
Wallet balance before the transaction.
Wallet balance after the transaction.
Arbitrary metadata attached to the transaction.
ISO 8601 creation timestamp.
ISO 8601 last-updated timestamp.
cURL (by reference)
cURL (by ID)
curl --request GET \
--url "https://api.tagpay.ng/v1/transaction/info?reference=TXN-20240401-001" \
--header "Authorization: Bearer <token>"
{
"status" : true ,
"transaction" : {
"id" : "a1b2c3d4-e5f6-7890-abcd-ef1234567890" ,
"reference" : "TXN-20240401-001" ,
"type" : "DEBIT" ,
"status" : "success" ,
"amount" : 500000 ,
"fee" : 1000 ,
"vat" : 75 ,
"total" : 501075 ,
"currency" : "NGN" ,
"category" : "BANK_TRANSFER" ,
"description" : "Transfer to Access Bank" ,
"source" : "wallet_001" ,
"destination" : "0123456789" ,
"balance_before" : 1000000 ,
"balance_after" : 498925 ,
"metadata" : {},
"createdAt" : "2024-04-01T10:30:00.000Z" ,
"updatedAt" : "2024-04-01T10:30:05.000Z"
}
}
Get batch transaction details
Retrieve the details of a single batch transaction by its reference.
GET https://api.tagpay.ng/v1/transaction/batch/:reference
Path parameters
The reference of the batch transaction.
Response
true when the request succeeded.
The batch transaction record. Internal fields mode and merchantId are excluded.
curl --request GET \
--url "https://api.tagpay.ng/v1/transaction/batch/BATCH-20240401-001" \
--header "Authorization: Bearer <token>"
{
"status" : true ,
"data" : {
"id" : "d4e5f6a7-b8c9-0123-defa-234567890123" ,
"reference" : "BATCH-20240401-001" ,
"type" : "DEBIT" ,
"status" : "success" ,
"totalAmount" : 5000000 ,
"totalCount" : 10 ,
"category" : "BATCH_BANK_TRANSFER" ,
"createdAt" : "2024-04-01T14:00:00.000Z" ,
"updatedAt" : "2024-04-01T14:05:30.000Z"
}
}
Approve a pending transaction
Approve a pending transaction that is at or above your user’s configured approval limit. You cannot approve a transaction you initiated unless you are the merchant account owner.
POST https://api.tagpay.ng/v1/transaction/approve
Request body
The UUID of the pending transaction to approve.
Response
true when the approval succeeded.
Confirmation message: "Transaction successfully approved.".
This action is irreversible once the underlying transfer has been processed. Ensure you have verified the transaction details before approving.
curl --request POST \
--url "https://api.tagpay.ng/v1/transaction/approve" \
--header "Authorization: Bearer <token>" \
--header "Content-Type: application/json" \
--data '{
"transactionId": "c3d4e5f6-a7b8-9012-cdef-123456789012"
}'
{
"status" : true ,
"message" : "Transaction successfully approved."
}
Reverse a transaction
Reverse a completed transaction and credit the originating wallet. This endpoint is restricted to admin users only.
POST https://api.tagpay.ng/v1/transaction/reverse
This endpoint requires admin-level access. Merchant tokens will receive a 403 Forbidden response. Only transactions in a pending state can be reversed.
Request body
The reference string of the transaction to reverse. Provide either this or transactionId.
The UUID of the transaction to reverse. Takes precedence when both fields are present.
Response
true when the reversal succeeded.
Confirmation message: "Transaction successfully reversed".
The reversal creates a corresponding CREDIT transaction with reference prefixed r- (e.g. r-TXN-20240401-001) and marks the original transaction as failed.
curl --request POST \
--url "https://api.tagpay.ng/v1/transaction/reverse" \
--header "Authorization: Bearer <admin-token>" \
--header "Content-Type: application/json" \
--data '{
"reference": "TXN-20240401-001"
}'
{
"status" : true ,
"message" : "Transaction successfully reversed"
}
Remove a pending transaction
Cancel and remove a pending transaction. The transaction status is set to CANCELLED.
DELETE https://api.tagpay.ng/v1/transaction/:transactionId
Path parameters
The UUID of the pending transaction to cancel.
Response
true when the cancellation succeeded.
Confirmation message: "Transaction successfully declined.".
curl --request DELETE \
--url "https://api.tagpay.ng/v1/transaction/c3d4e5f6-a7b8-9012-cdef-123456789012" \
--header "Authorization: Bearer <token>"
{
"status" : true ,
"message" : "Transaction successfully declined."
}