Withdrawing Cash
Receive cash at a physical location.
Rapyd makes it easy for you to enable customers to withdraw cash using a POS. The POS API provide methods for handling cash at Rapyd POS locations, such as ATMs and retail stores.
In this use case, the POS withdraws 10 GBP (Pound Sterling) from the customer’s eWallet, and then gives her 10 GBP (Pound Sterling) in cash.
For example, the customer would like to withdraw 10 GBP from their eWallet and receive it as cash from a POS. The POS withdraws 10 GBP from the customer’s eWallet and give her 10 GBP in cash.
Let’s look at the highlights of your workflow.
Step 1: Customer Gets Code
The customer runs the mobile application that you provide to your customers for managing their eWallets, and requests an OTP in order to withdraw 10 GBP (Pound Sterling) in cash at a specific POS.
The mobile application provides an authorization code to the customer.
Step 2: Opening a Session
You request to open a session.
Rapyd opens session and displays the field values necessary for withdrawal.
Step 3: Withdrawing
You create a withdrawal request with the field values that you received in the ‘opening a session’ stage.
Rapyd executes the withdrawal.
POS give 10 GBP (Pound Sterling) in cash to the customer.
Step 4: Closing a Session
You request to close the session with the field values that you received in the ‘opening a session’ stage.
Rapyd closes the session.
Let's take a quick look at how you'll use Rapyd's API to implement the workflow.
To withdraw from customer's eWallet:
Ask Rapyd to open a session.
Ask Rapyd to withdraw 10 GBP (Pound Sterling) from the customer’s eWallet.
To end a session:
Ask Rapyd to close a session.
To generate a one-time password (OTP) code, the customer uses the Rapyd SDK mobile application that you provide to your customers for managing their eWallets.
The customer runs the mobile application that you provide to your customers for managing their eWallets (the merchant app).
The customer requests an OTP code, and the app displays
876680
as the OTP code.The customer provides the OTP code at the POS.
Make sure to store the OTP code for future use.
After the OTP is displayed, it is valid for absolute 30 seconds, meaning that if the OTP is generated at 11:42:25 then this code will be valid for an additional 5 seconds until 11:42:30. If you do not open a session within absolute 30 seconds then the customer must retrieve a new OTP code.
You’ll use the Open Session method to open a session for a withdrawal with the following parameters:
Description of Header Parameters
Header Parameter | Description |
---|---|
access_key | Enter 8C6223151345345D as the access key. |
phone_number | Enter +14155559992 as the customer's phone number. |
Content-Type | Enter application/json as the type of content. |
Description of Path Parameters
Path Parameter | Description |
---|---|
pos_id | Enter z128ffb-11a5-11l9-93p5-1231a8maf28 as the ID of the point-of-sale location. The |
otp_code | Enter 876680 as the |
Opening Session Request
You ask Rapyd to open a session.
Request
// Request URL: POST https://sandboxpos.rapyd.net/v1/pos/login/z128ffb-11a5-11l9-93p5-1231a8maf28/876680 access_key: 8C6223151345345D phone_number: +14155559992 Content-Type: application/json // No message body
Opening Session Response
Let's take a look at the Open Session response.
Response
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "d1063f84-977b-48f5-a3a3-a3e4d94be47f" }, "data": { "token_id": "d9b7398f-5c2f-438c-8ac6-68e79f28c02e", "operation_id": "95e2c071-9513-48d6-a717-a480814f7df8", "accounts": [ { "account_id": "64e4a964-53b5-11e9-8495-02f0df928b", "account_currency": "GBP", "account_alias": "GBP", "account_balance": 189, "account_currency_symbol": "£" } ] } }
The data
section of the response shows that:
The customer's eWallet includes one account for the GBP currency. Its
account_id
is 64e4a964-53b5-11e9-8495-02f0df928b.The
token_id
is d9b7398f-5c2f-438c-8ac6-68e79f28c02e.The
operation_id
is 95e2c071-9513-48d6-a717-a480814f7df8.
Make sure to store these field values for future use.
You’ll use the Withdraw method to withdraw 10 GBP from the customer's eWallet. Make a withdrawal with the following parameters:
Description of Header Parameters
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 |
operation_id | Enter 95e2c071-9513-48d6-a717-a480814f7df8 as the |
phone_number | Enter +14155559992 as the customer's phone number |
Description of Path Parameters
Path Parameter | Description |
---|---|
account | Enter 64e4a964-53b5-11e9-8495-02f0df928b as the ID of the |
sum | Enter 10 as the |
Withdrawing Request
You ask Rapyd to withdraw funds from an eWallet account.
Request
// Request URL: POST https://sandboxpos.rapyd.net/v1/pos/withdraw/64e4a964-53b5-11e9-8495-02f0df928b/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
Withdraw Response
Let's take a look at the Withdraw response.
Response
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "0c211a3c-a4c4-4708-bbe9-7628ddd07437" }, "data": { "transaction_id": "4e61e815-b68f-11e9-9ffc-12c4c8fed768" } }
The data
section of this response shows that the transaction_id
is 4e61e815-b68f-11e9-9ffc-12c4c8fed768.
At this stage the POS provides 10 GBP in cash to the customer.
You’ll use the Close Session method to close a session for a withdrawal. Close a session with the following parameters:
Description of Header Parameters
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 |
operation_id | Enter 95e2c071-9513-48d6-a717-a480814f7df8 as the |
phone_number | Enter +14155559992 as the customer's phone number. |
Closing Session Request
You ask Rapyd to close the session.
Request
// Request URL: POST https://sandboxpos.rapyd.net/v1/pos/logout 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
Closing Session Response
Let's take a look at the Close Session response.
Response
{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "09666c40-77fa-49c7-be73-82ade0217c8e" } }
The data section of this response shows that the session closed successfully.