# 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 **<span style="color: #3598db;">[Transaction/RequestPayment](https://admin-uat.cryr.com/#/pages/CRS/CRYR/document/ref_doc_verification)</span>** endpoint.

<div class="w-full pt-2 md:pt-0 dark:border-white/20 md:border-transparent md:dark:border-transparent md:w-[calc(100%-.5rem)]" id="bkmrk-4.1-flow-this-is-an-"><div class="w-full pt-2 md:pt-0 dark:border-white/20 md:border-transparent md:dark:border-transparent md:w-[calc(100%-.5rem)]"><form class="stretch mx-2 flex flex-row gap-3 last:mb-2 md:mx-4 md:last:mb-6 lg:mx-auto lg:max-w-2xl xl:max-w-3xl">#### **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 **<span style="color: #3598db;">[Wallet/Info](https://books.xprizo.com/link/32#bkmrk-update-approval-webh)</span>** endpoint. <div class="w-full pt-2 md:pt-0 dark:border-white/20 md:border-transparent md:dark:border-transparent md:w-[calc(100%-.5rem)]">  
        </div>
    - Find the merchant's wallet with the same currency using the **<span style="color: #3598db;">[Wallet/Info](https://books.xprizo.com/link/32#bkmrk-update-approval-webh)</span>** endpoint.
    - Create transaction using **<span style="color: #3598db;">[Transaction/RequestPayment](https://books.xprizo.com/link/22#bkmrk-create-payment-reque)</span>**
    - Wait for the callback.
    - Check the status of the transaction **<span style="color: #3598db;">[Transaction/Status](https://books.xprizo.com/link/22#bkmrk-transaction-status-c)</span>** endpoint. <div class="w-full pt-2 md:pt-0 dark:border-white/20 md:border-transparent md:dark:border-transparent md:w-[calc(100%-.5rem)]">  
        </div>
- *(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](https://books.xprizo.com/uploads/images/gallery/2024-02/scaled-1680-/user-journey-mapping-21.jpg)

<div class="relative flex h-full flex-1 items-stretch md:flex-col"><div class="flex w-full items-center">  
</div></div>#### **Steps**[​](https://xprizo-doc.azurewebsites.net/docs/merchants/deposits#steps "Direct link to heading")

<div class="relative flex h-full flex-1 items-stretch md:flex-col"><div class="relative flex h-full flex-1 items-stretch md:flex-col"><div class="flex w-full items-center">- Create a payment Request
- Wait for callback
- Check Status

</div></div></div>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 **<span style="color: #3598db;">[Transaction/Status](https://books.xprizo.com/link/22#bkmrk-transaction-status-c)</span>**<span style="color: #3598db;"><span style="color: #000000;">.</span></span>

<div class="relative flex h-full flex-1 items-stretch md:flex-col"><div class="flex w-full items-center">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 **<span style="color: #3598db;">[Preference/SetApprovalWebhook](https://books.xprizo.com/link/31#bkmrk-update-approval-webh)</span>** endpoint.</div></div><div class="flex w-full items-center">  
</div><p class="callout info">**\*\* You should, however, check the status, after you get a callback to confirm that the transaction was completed successfully. You can use <span style="color: #3598db;">[Transaction/Status](https://books.xprizo.com/link/22#bkmrk-transaction-status-c)</span> endpoint to check the status.**</p>

</form></div></div>