Pending Transactions
The pendingTransactions
API allows merchants to retrieve a list of pending transactions associated with their websites. These transactions are token-based and must be linked to a successful payment to be considered pending.
Endpoint Details
URL:
/api/transactions/pending
Method:
POST
Content-Type:
application/json
Request Parameters
When making a request to this API, include the following parameter in the request body:
Parameter
Type
Required
Description
merchant_id
string
Yes
The unique identifier assigned to a merchant’s website.
Example Request
{
"merchant_id": "your_merchant_id"
}
Response Structure
The API responds with a JSON object containing the status, a message, and the list of pending transactions.
Success Response
Status Code: 200
{
"status": "success",
"message": "Pending transactions retrieved successfully.",
"data": [
{
"token": "abc123",
"payment_id": "pay_456",
"amount": 100.50,
"currency": "USD",
"hash": "txn_hash_here",
"status": "success",
"date": "2024-03-10T12:34:56Z"
}
]
}
Error Responses
Invalid Merchant ID
Status Code: 422
{
"status": "error",
"message": "The given data was invalid.",
"errors": {
"merchant_id": ["The selected merchant_id is invalid."]
}
}
Inactive Website
Status Code: 403
{
"status": "error",
"message": "The website is not active.",
"data": []
}
Usage Guidelines
Ensure the
merchant_id
provided exists and is linked to an active website.Transactions will only be returned if they are unused and associated with a successful payment.
If a website is inactive, no transactions will be retrieved.
The API should be accessed using a secure and authenticated request mechanism.
Notes
This API is designed for merchants to track pending transactions awaiting further processing.
Ensure the API is integrated into a secure system to protect sensitive transaction data.
For further assistance, contact the API support team.
Last updated