Validate Transaction Request
This section contains API details for Transaction Validation.
Validates a transaction request before processing.
- URL:
/validate-request
- Method:
POST
- Auth Required: Yes
- Request Body:
{
"clientId": 12345,
"product_id": "product123",
"trans_type": "PULL",
"public_key": "GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"account_number": "256XXXXXXXXX",
"reference_id": "ref123456",
"currency": "UGX",
"amount": 10000
} - Success Response:
201 Created
{
"status": 201,
"message": "Transaction validated successfully",
"data": {
"accountName": "John Doe",
"phoneNumber": "256XXXXXXXXX",
"fee": 200,
"reference_id": "ref123456",
"validation_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"client_id": 12345,
"product_id": "product123",
"trans_type": "PULL",
"trans_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"amount": 10000,
"asset_code": "cUGX",
"fee": 200,
"currency": "UGX",
"sender_account": "GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"receiver_account": "256XXXXXXXXX",
"memo": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "pending"
}
}
Client Errors
- 400 Bad Request: The server could not understand the request due to invalid syntax.
- 401 Unauthorized: Authentication is required or has failed.
- 403 Forbidden: The client does not have access rights to the content.
- 404 Not Found: The server could not find the requested resource.
- 429 Too Many Requests: The client has sent too many requests in a given amount of time (rate limiting).
Example error response:
{
"status": 404,
"message": "Resource not found",
"data": null
}
Server Errors
- 500 Internal Server Error: The server encountered an unexpected condition that prevented it from fulfilling the request.
- 502 Bad Gateway: The server received an invalid response from the upstream server.
- 503 Service Unavailable: The server is not ready to handle the request, often due to maintenance or overload.
- 504 Gateway Timeout: The server did not receive a timely response from the upstream server.
Example server error response:
{
"status": 500,
"message": "An unexpected error occurred",
"data": null
}