Skip to main content

Deposit Using Xprizo Wallet

To make a deposit, funds are transferred from a user's wallet to the merchant's wallet. This process is done by requesting a payment from the user through the Transaction/RequestPayment endpoint.

Flow

This is an example of the flow that should be used when integrating with Xprizo to perform deposits.

  • (on merchant) Create a new transaction.
    • Create a reference to be used for this transaction.
    • Set the transaction as pending.
  • (on Xprizo) Create the Xprizo transaction.
    • Find the user's wallet using their phone number or email or username, and the specified currency through the Wallet/Info endpoint.

    • Find the merchant's wallet with the same currency using the Wallet/Info endpoint.

    • Create transaction using Transaction/RequestPayment 
    • Wait for the callback.
    • Check the status of the transaction Transaction/Status endpoint.

  • (on merchant) Update or cancel the transaction
    • If the transaction is approved, update the transaction status in your system.
    • If the transaction is rejected, cancel the transaction on your system.

User Journey Mapping (21).jpg


Steps

  • Create a payment Request
  • Wait for callback
  • Check Status

Once you've created a payment request, wait for a callback that will be sent once the user approves the request. While it's not mandatory to utilize callbacks, it's more efficient to do so. Alternatively, you can directly call the check status endpoint, but this isn't recommended as you would need to continuously poll the server to check the status. Use this endpoint to check the status Transaction/Status.

To receive callbacks, you must set this up on your account (the profile that is used to create this transaction). You can set up the callback by accessing the settings/preferences in Xprizo. Configure the "Approval Webhook" to your desired API endpoint where you want to receive the callback. Alternatively, you can set this up using the Preference/SetApprovalWebhook endpoint.

** You should, however, check the status, after you get a callback to confirm that the transaction was completed successfully. You can use Transaction/Status endpoint to check the status.