Skip to main content

Transaction Confirmation

The confirmation endpoint is used to finalize a wallet top-up transaction after customer confirmation.

info

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

Authentication Required

All API calls require a valid authentication token. Invalid or expired tokens will result in a 401 Unauthorized response.

Request Specification

Request Body (Json)

ParameterTypeRequiredDescription
transaction_referencestringYesThe 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 OK

A 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

FieldTypeDescription
transaction_referencestringUnique identifier for the completed transaction
amountnumberThe amount credited to the wallet
currencystringCurrency code for the amount
timestampstringISO 8601 formatted date and time when the transaction was processed
customerobjectInformation about the customer whose wallet was credited
customer.namestringPartially masked customer name
customer.country_codestringCountry code (or "LY" if not set)
customer.phonestringCustomer 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

Common Errors
HTTP StatusError TypeExample MessageWhen it Occurs / Resolution
404Transaction not found{"message": "Transaction reference not found"}The transaction reference does not exist or is not pending.
500Internal server error{"message": "Transaction processing failed"}Unexpected server error. Try again or contact support.

Implementation Tips

Best Practices
  • 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_reference for future reference and reconciliation

Next Steps

After confirming a transaction, you can:

  1. Verify the transaction status using the Transaction Info endpoint
  2. Provide confirmation to your customer
  3. Record the transaction in your internal systems for reconciliation