How to Reverse a Withdrawal with Rapyd: A Developer's Guide

Hey, fellow developer,

Have you ever had to reverse a transaction because something didn’t go as planned? Let’s dive into how you can handle such a scenario using Rapyd’s POS API, specifically for reversing a cash withdrawal at locations like ATMs and retail stores.

Imagine you attempted to withdraw 10 GBP from a customer’s eWallet but failed for technical reasons. Rapyd simplifies the reversal process to ensure the money is returned to the customer’s account seamlessly.

Step-by-Step Guide to Reverse a Withdrawal:

  1. Start by Creating a Reverse Withdrawal Request: You must use the details from the ‘open session’ request that initially attempted the withdrawal. This involves the customer’s account details and the transaction ID.
  2. Execution by Rapyd: Send your reversal request via Rapyd’s API. Ensure you include the required headers from the previous session, like Content-Type, access_key, and token_id.
  3. Confirm the Transaction: Once Rapyd processes the reversal, the amount, say 10 GBP, will be credited back to the respective GBP account of the customer’s eWallet.

Implementation Using Rapyd’s API:

To implement this, your API call would look something like this:

  • Endpoint: POST https://sandboxapi.rapyd.net/v1/pos/reversal/{account_id}/{amount}
  • Headers: Include your content type, access key, token ID from the open session, and operational ID.
  • Body: There is no need for a message body for this request.

After making the call, check the API response to ensure the reversal was successful. The response should provide you with a new transaction ID, indicating that the reversal transaction has been processed.

This workflow not only resolves issues quickly but also helps maintain your users’ trust by ensuring their funds are managed correctly. Always test your API calls in a sandbox environment before going live to ensure that everything works smoothly!

I hope this helps you handle those tricky transaction reversals more confidently!

Check out Rapyd’s detailed documentation on reversing a withdrawal for a complete guide.