Set Transfer Response
Respond to a transfer of funds between wallets.
The transferee uses this method to accept or decline the transfer.
The sender can use this method to cancel the transfer, unless Rapyd Protect is reviewing the transfer.
This method triggers Transfer Funds Between Wallets Response Webhook.
Note
This method can be used only one time per transfer transaction, and must be used before the expiration date set in the request to create the transfer.
This endpoint replaces the deprecated endpoint -
POST /v1/account/transfer/responseRapyd continues to support the deprecated endpoint. No sunset date has been set.
The code samples include successful requests (200) and bad requests (400).
For error messages that appear due to bad requests (400), see:
For information about unauthorized request (401) and other authentication errors, see Troubleshooting Authentication and Authorization Errors.
id
ID of the transfer transaction, from the
idfield in thedataobject of the response. UUID.
status
Determines how to handle the transfer. One of the following values:
accept
decline
cancel
Note
You cannot cancel a transfer that is being reviewed.
Code Samples
.NET
using System; using System.Text.Json; namespace RapydApiRequestSample { class Program { static void Main(string[] args) { try { var metadata = new { merchant_defined = "accepted" }; var requestObj = new { id = "5ecd1c11-6f42-11ea-833c-02e199f7f6f5", metadata, status = "accept", }; string request = JsonSerializer.Serialize(requestObj); string result = RapydApiRequestSample.Utilities.MakeRequest("POST", "/v1/ewallets/transfer/response", request); Console.WriteLine(result); } catch (Exception e) { Console.WriteLine("Error completing request: " + e.Message); } } } }
JavaScript
const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest; async function main() { try { const body = { id: '590d4d32-b07d-11ea-833c-02e199f7f6f5', metadata: { merchant_defined: "accepted" }, status: 'accept' }; const result = await makeRequest('POST', '/v1/ewallets/transfer/response', body); console.log(result); } catch (error) { console.error('Error completing request', error); } }
PHP
<?php $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/<path-to-your-utility-file>/utilities.php"; include($path); $body = [ 'id' => 'b8fe12a9-b09d-11ea-833c-02e199f7f6f5', 'metadata' => [ 'merchant_defined' => 'accepted' ], 'status' => 'accept' ]; try { $object = make_request('post', '/v1/ewallets/transfer/response', $body); var_dump($object); } catch(Exception $e) { echo "Error: $e"; } ?>
Python
from pprint import pprint from utilities import make_request body = { "id": '86dfc58c-b0a4-11ea-833c-02e199f7f6f5', "metadata": { "merchant_defined": "accepted" }, "status": "accept" } results = make_request(method='post', path='/v1/ewallets/transfer/response', body=body) pprint(results)
/v1/ewallets/transfer/response
Accept
curl -X post 'https://sandboxapi.rapyd.net/v1/ewallets/transfer/response' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'idempotency: your-idempotency-parameter-here' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here' \ --data-raw '{ "id": "89a72f09-24b7-4eb4-9d49-9864f1d2abaf", "status": "accept" }'{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "bcf6aeca-616b-4d6b-9c5b-5791efb31b0a" }, "data": { "id": "89a72f09-24b7-4eb4-9d49-9864f1d2abaf", "status": "CLO", "amount": 50, "currency_code": "USD", "destination_phone_number": "", "destination_ewallet_id": "ewallet_b5320c566cc4aa01fe77440ad08693f7", "destination_transaction_id": "wt_164b36175995fdd464326a1f3b9f2ef7", "source_ewallet_id": "ewallet_c1943cfeda5f98247ab117e5d2648861", "source_transaction_id": "wt_eca5edf2b42bd86e66d3e1cd4fdb694c", "transfer_response_at": 1764834186, "created_at": 1764834155, "metadata": {}, "response_metadata": {}, "expiration": 1766043755 } }
Decline
curl -X post 'https://sandboxapi.rapyd.net/v1/ewallets/transfer/response' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'idempotency: your-idempotency-parameter-here' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here' \ --data-raw '{ "id": "cd76daac-90e8-4b52-bdb8-42126b532fb5", "status": "decline" }'{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "68104161-5bd3-4d9f-a56c-c1b0fc4d4605" }, "data": { "id": "cd76daac-90e8-4b52-bdb8-42126b532fb5", "status": "DEC", "amount": 50.21, "currency_code": "USD", "destination_phone_number": "", "destination_ewallet_id": "ewallet_b5320c566cc4aa01fe77440ad08693f7", "destination_transaction_id": "", "source_ewallet_id": "ewallet_c1943cfeda5f98247ab117e5d2648861", "source_transaction_id": "wt_e3ad25d6cb48c9c284786734c9b69969", "transfer_response_at": 1764837694, "created_at": 1764837669, "metadata": {}, "response_metadata": {}, "expiration": 1766047269 } }
Cancel by sender
curl -X post 'https://sandboxapi.rapyd.net/v1/ewallets/transfer/response' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'idempotency: your-idempotency-parameter-here' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here' \ --data-raw '{ "id": "1a61f54d-bd2c-4075-9ec4-33c8599e9f39", "status": "cancel" }'{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "d758ed6c-aec6-4b74-b0cd-4c9b0337b781" }, "data": { "id": "1a61f54d-bd2c-4075-9ec4-33c8599e9f39", "status": "CAN", "amount": 50.22, "currency_code": "USD", "destination_phone_number": "", "destination_ewallet_id": "ewallet_b5320c566cc4aa01fe77440ad08693f7", "destination_transaction_id": "", "source_ewallet_id": "ewallet_c1943cfeda5f98247ab117e5d2648861", "source_transaction_id": "wt_d75d7aebccda8dc7bb9a6230a1fa67e0", "transfer_response_at": 1764837748, "created_at": 1764837734, "metadata": {}, "response_metadata": {}, "expiration": 1766047334 } }
Bad Request - Transaction Expired
curl -X post 'https://sandboxapi.rapyd.net/v1/ewallets/transfer/response' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'idempotency: your-idempotency-parameter-here' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here' \ --data-raw '{ "id": "89a72f09-24b7-4eb4-9d49-9864f1d2abaf", "status": "accept" }'{ "status": { "error_code": "WALLET_TO_WALLET_TRANSFER_EXPIRED", "status": "ERROR", "message": "The request tried to respond to a wallet-to-wallet transfer, but the transaction had already expired. The request was rejected. Corrective action: Create a new wallet-to-wallet transfer.", "response_code": "WALLET_TO_WALLET_TRANSFER_EXPIRED", "operation_id": "e238b867-78db-4268-bd33-2846dfda3001" } }
Bad Request - Transaction Already Closed
curl -X post 'https://sandboxapi.rapyd.net/v1/ewallets/transfer/response' \ -H 'access_key: your-access-key-here' \ -H 'Content-Type: application/json' \ -H 'idempotency: your-idempotency-parameter-here' \ -H 'salt: your-random-string-here' \ -H 'signature: your-calculated-signature-here' \ -H 'timestamp: your-unix-timestamp-here' \ --data-raw '{ "id": "204e83ec-e5f4-4a96-8879-46b977ad01c8", "status": "accept" }'{ "status": { "error_code": "INVALID_TRANSFER_DETAILS", "status": "ERROR", "message": "The request tried to transfer funds from a wallet to another wallet, but the input parameters were not valid. The request was rejected. Corrective action: For 'currency', use the ISO 4217 code. For 'source_ewallet' and 'destination_ewallet', use the IDs of valid wallets.", "response_code": "ERROR_TRANSFER_RESPONSE_INVALID_DETAILS", "operation_id": "ce2ebeb7-d1fd-4f54-903f-680565ed37ed" } }