Reversing a Withdrawal
Reverse a cash withdrawal.
Rapyd makes it easy for you to reverse a withdrawal using a point of sale. The POS API provides methods for handling cash at Rapyd POS locations, such as ATMs and retail stores.
In this use case, a 10 GBP (Pound Sterling) is returned to the customer's eWallet after a withdrawal request for 10 GBP (Pound Sterling) did not succeed due to technical reasons.
Let’s look at the highlights of your workflow.
You create a reverse withdrawal request with the field values that you received in the ‘open session’ request that you used when attempting to withdraw from the GBP account in customer eWallet.
Rapyd executes the reverse withdrawal.
10 GBP (Pound Sterling) is added to the GBP account of customer eWallet.
Let's take a quick look at how you'll use Rapyd's API to implement the workflow.
To reverse a withdrawal:
Ask Rapyd to reverse a withdrawal.
This workflow the uses values from the Open Session response of the Withdrawing cash use case.
You’ll use the reverse-withdrawal method to return 10 GBP to Jane Doe’s eWallet. Make a reverse withdrawal with the following parameters:
Header Parameter Details
Header Parameter | Description |
---|---|
Content-Type | Enter application/json as the type of content |
access_key | Enter 8C6223151345345D as the access key. |
token_id | Enter d9b7398f-5c2f-438c-8ac6-68e79f28c02e as the token ID, which was displayed in the open session response of the Withdrawing cash use case. |
operation_id | Enter 95e2c071-9513-48d6-a717-a480814f7df8 as the operation_id, which was displayed in the open session response of the Withdrawing cash use case. |
phone_number | Enter +14155559992 as Jane Doe’s phone number. |
Path Parameter Details
Path parameter | Description |
---|---|
account | Enter 64e4a964-53b5-11e9-8495-02f0df928bc0 as the ID of the account |
sum | Enter 10 as the |
You ask Rapyd to reverse a withdrawal.
Request
// Request URL: POST https://sandboxapi.rapyd.net/v1/pos/reversal/64e4a964-53b5-11e9-8495-02f0df928bc0/10 Content-Type: application/json access_key: 8C6223151345345D token_id: d9b7398f-5c2f-438c-8ac6-68e79f28c02e operation_id: 95e2c071-9513-48d6-a717-a480814f7df8 phone_number: +14155559992 // No message body
Let's take a look at the Reverse Withdrawal response.
Response
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "a83026f5-0731-4bf3-9611-1dd0af639431" }, "data": { "transaction_id": "4e61e815-b68f-11e9-9ffc-12c4c8fed768", "operation_id": "086128b5-5212-4e3b-8caa-6ecab4a868f3" } }
The data section of this response shows that the transaction_id
is 4e61e815-b68f-11e9-9ffc-12c4c8fed768. Note that this is the same transaction_id
used in the withdrawal response of the Withdrawing Cash use case since both methods were executed for the same account_id.