Transaction Confirmation
The confirmation endpoint is used to finalize a wallet top-up transaction after customer confirmation.
This endpoint should only be called after a successful call to the Wallet Top-Up Initialization endpoint and customer approval.
Overview
The wallet confirmation endpoint completes the top-up process by crediting the customer's Presto wallet with the specified amount. This is the final step in the wallet top-up flow and should only be called after customer verification and approval.
Endpoint Details
Method: POST
URL: /api/institutions/v1/wallet/confirm
Purpose: Credit a customer's Presto wallet after verification and approval
All API calls require a valid authentication token. Invalid or expired tokens will result in a 401 Unauthorized response.
Request Specification
Request Body (Json)
| Parameter | Type | Required | Description |
|---|---|---|---|
| transaction_reference | string | Yes | The transaction reference received from the init call |
Example Request
// Headers:
// Authorization: Bearer {token}
// Content-Type: application/json
{
"transaction_reference": "123FNS2Wsdsd3D"
}
Response Specification
Success Response
200 OKA successful response indicates that the wallet has been credited with the specified amount.
{
"data": {
"transaction_reference": "TRX987654321",
"amount": 200.000,
"currency": "LYD",
"timestamp": "2025-04-13T14:30:45Z",
"customer": {
"name": "MOH… OK…",
"country_code": "LY",
"phone": "928569313"
}
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
transaction_reference | string | Unique identifier for the completed transaction |
amount | number | The amount credited to the wallet |
currency | string | Currency code for the amount |
timestamp | string | ISO 8601 formatted date and time when the transaction was processed |
customer | object | Information about the customer whose wallet was credited |
customer.name | string | Partially masked customer name |
customer.country_code | string | Country code (or "LY" if not set) |
customer.phone | string | Customer phone number |
Error Responses
404 Not Found - Transaction not found
{
"message": "Transaction reference not found"
}
500 Internal Server Error - Unexpected server error
{
"message": "Transaction processing failed"
}
Error Handling
| HTTP Status | Error Type | Example Message | When it Occurs / Resolution |
|---|---|---|---|
| 404 | Transaction not found | {"message": "Transaction reference not found"} | The transaction reference does not exist or is not pending. |
| 500 | Internal server error | {"message": "Transaction processing failed"} | Unexpected server error. Try again or contact support. |
Implementation Tips
- After a successful confirmation, store the transaction details in your system for reconciliation
- Implement proper error handling to provide clear feedback to your users
- Consider implementing a retry mechanism with exponential backoff for 500 errors
- Display a success message to your customers when the transaction completes
Important Notes
- Store the
transaction_referencefor future reference and reconciliation
Next Steps
After confirming a transaction, you can:
- Verify the transaction status using the Transaction Info endpoint
- Provide confirmation to your customer
- Record the transaction in your internal systems for reconciliation