To make deposits from a user via M-Pesa, initiate a deposit by transferring funds from the user's M-Pesa account to your merchant's wallet using the Transaction/MPesaDeposit endpoint.
Once you've called the "MpesaDeposit" endpoint, a payment request is sent to the M-Pesa network and the user will then confirm the transaction on their phone. A pending transaction is also generated, and Xprizo will continuously monitor the M-Pesa network until a confirmation or failure is received.
Merchants will receive updates on the transaction status via callbacks. To enable callbacks, you'll need to configure this on your account (the profile used to create the transaction). You can accomplish this by navigating to the settings/preferences in Xprizo and configuring the "Approval Webhook" to point to a URL of your choice. Alternatively, you can achieve the same using the Preference/SetApprovalWebhook endpoint.
A callback will be sent when
It is not strictly necessary to use callbacks, you have the option to periodically check the status of the transaction. However, it's not recommended as it would require to poll the server continuously to check the status. However, it's advisable to verify the status after receiving a callback to ensure that the transaction was completed successfully.
** 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.