Simulate a Bank Transfer to a Virtual Account
Simulate a deposit to a virtual account that was issued to a wallet.
This method is relevant only for testing in the sandbox. The currency of the transfer must be supported by the specific virtual account.
This method triggers Deposit Completed Webhook.
Note
This endpoint replaces the deprecated endpoint -
POST /v1/issuing/bankaccounts/bankaccounttransfertobankaccountRapyd no longer supports the deprecated endpoint.
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.
Prerequisites:
To simulate a transfer with FX, assign a value to
requested_currency.
Code Samples
.NET
using System; using System.Text.Json; namespace RapydApiRequestSample { class Program { static void Main(string[] args) { try { var requestObj = new { issued_bank_account = "issuing_01ce6729cf4c1a6c5bd2b16901725876", amount = 100, currency = "EUR", }; string request = JsonSerializer.Serialize(requestObj); string result = RapydApiRequestSample.Utilities.MakeRequest("POST", "/v1/virtual_accounts/transactions", request); Console.WriteLine(result); } catch (Exception e) { Console.WriteLine("Error completing request: " + e.Message); } } } }
JavaScript
const makeRequest = require('../../../../Utilities/JS/utilities').makeRequest; async function main() { try { const body = { issued_bank_account: 'issuing_01ce6729cf4c1a6c5bd2b16901725876', amount: 100, currency: 'EUR' }; const result = await makeRequest( 'POST', '/v1/virtual_accounts/transactions', body ); console.log(result); } catch (error) { console.error('Error completing request', error); } }
PHP
<?php $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/code_race_2020/Utilities/PHP/utilities.php"; include($path); $body = [ "issued_bank_account" => "issuing_01ce6729cf4c1a6c5bd2b16901725876", "amount" => "100", "currency" => "EUR" ]; try { $object = make_request('post', '/v1/virtual_accounts/transactions', $body); var_dump($object); } catch(Exception $e) { echo "Error: $e"; } ?>
Python
from pprint import pprint from utilities import make_request body = { "issued_bank_account": "issuing_b812a80aab159633335bbc64c9819091", "amount": "100", "currency": "EUR" } results = make_request(method='post', path=f'/v1/virtual_accounts/transactions', body=body) pprint(results)
/v1/virtual_accounts/transactions
Simulate a Bank Transfer to a Virtual Account
curl -X post 'https://sandboxapi.rapyd.net/v1/virtual_accounts/transactions' \ -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 '{ "issued_bank_account": "issuing_d11d404c919519c66ac61e14389f766a", "amount": "100", "currency": "EUR" }'{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "bdcfd0ef-8163-4230-ad39-9c38a3053712" }, "data": { "id": "issuing_d11d404c919519c66ac61e14389f766a", "merchant_reference_id": "issuing_d11d404c919519c66ac61e14389f766a", "ewallet": "ewallet_c1943cfeda5f98247ab117e5d2648861", "bank_account": { "beneficiary_name": "CashDash UK Limited", "address": "Northwest House, 119 Marylebone Road NW1 5PU", "country_iso": "DE", "iban": "DE07202208000092780641", "bic": "SXPYDEHH" }, "metadata": {}, "status": "ACT", "description": null, "funding_instructions": null, "currency": "EUR", "requested_currency": null, "transactions": [ { "id": "isutran_5337361d6c62f369d98c71d9e418f063", "amount": 100, "currency": "EUR", "original_amount": 100, "original_currency": "EUR", "fx_rate": 1, "created_at": 1760276114 } ] } }
Simulate a Bank Transfer to a Virtual Account with FX
curl -X post 'https://sandboxapi.rapyd.net/v1/virtual_accounts/transactions' \ -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 '{ "issued_bank_account": "issuing_f0d1d873c1c02bccf0ed42de2a609fe2", "amount": "101", "currency": "USD", "requested_currency": "EUR" }'{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "d2bb79f4-608c-48ff-81ad-0dceef5555b5" }, "data": { "id": "issuing_f0d1d873c1c02bccf0ed42de2a609fe2", "merchant_reference_id": "issuing_f0d1d873c1c02bccf0ed42de2a609fe2", "ewallet": "ewallet_31fb2dbbaf6519461ee4fbe1062220d3", "bank_account": { "beneficiary_name": "CashDash UK Limited", "address": "Northwest House, 119 Marylebone Road NW1 5PU", "country_iso": "DK", "iban": "DK4289000092780662", "bic": "SXPYDKKK" }, "metadata": {}, "status": "ACT", "description": null, "funding_instructions": null, "currency": "EUR", "requested_currency": "HKD", "transactions": [ { "id": "isutran_4c584940888bb0e727e84d4c7be55d9c", "amount": 762.67, "currency": "HKD", "original_amount": 101, "original_currency": "USD", "fx_rate": 7.5511839193, "created_at": 1760278636 } ] } }
Simulate a Bank Transfer to a Virtual Account - with Remitter Information
curl -X post 'https://sandboxapi.rapyd.net/v1/virtual_accounts/transactions' \ -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 '{ "issued_bank_account": "issuing_59fd68cb3837f632abdcb5ddaa75045b", "amount": "1", "currency": "IDR", "remitter_information": { "remitter_reference": "Simulating a bank transfer", "iban": "DK5000400440116243", "account_name": "John Doe", "sort_code": "23434", "account_number": "1234567", "bank_code": "233434", "bank_name": "U Bank" } }'{ "status": { "error_code": "", "status": "SUCCESS", "message": "", "response_code": "", "operation_id": "dd054e90-54e0-4c00-af23-9ff3fa9df157" }, "data": { "id": "issuing_59fd68cb3837f632abdcb5ddaa75045b", "merchant_reference_id": "issuing_59fd68cb3837f632abdcb5ddaa75045b", "ewallet": "ewallet_b16ab040e51deda7f6a786862bd3fe7b", "bank_account": { "beneficiary_name": "Rapyd Holdings Pte. Ltd.", "country_iso": "ID", "bank": "Bank Sahabat Sampoerna", "country": "Indonesia", "local_bank_code": "523", "account_number": "4010299991035202" }, "metadata": {}, "status": "ACT", "description": "Issue test bank account", "funding_instructions": null, "currency": "IDR", "requested_currency": null, "transactions": [ { "id": "isutran_5ac346053c6b65b3bdcf4baa7aad67c0", "amount": 1, "currency": "IDR", "original_amount": 1, "original_currency": "IDR", "fx_rate": 1, "created_at": 1677495859 }, { "id": "isutran_5fbe2b43f4aa143eea2147e3967dd2ac", "amount": 1, "currency": "IDR", "original_amount": 1, "original_currency": "IDR", "fx_rate": 1, "created_at": 1760277099 } ] } }
Bad Request - Virtual Account Not Found
curl -X post 'https://sandboxapi.rapyd.net/v1/virtual_accounts/transactions' \ -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 '{ "issued_bank_account": "issuing_d11d404c919519c66ac61e14389f766", "amount": "10", "currency": "EUR" }'{ "status": { "error_code": "ERROR_ISSUING_DEPOSIT", "status": "ERROR", "message": "The request tried to simulate a deposit to a virtual account number that was issued to a wallet in the sandbox, but the virtual account was not found. The request was rejected. Corrective action: For 'issued_bank_account', use the ID of a Virtual Account Number that was issued to a wallet, which is a string starting with 'issuing_'.", "response_code": "ERROR_ISSUING_DEPOSIT", "operation_id": "aa69b86c-b8de-4393-b844-365f63bac36e" } }
Bad Request - Currency Mismatch
curl -X post 'https://sandboxapi.rapyd.net/v1/virtual_accounts/transactions' \ -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 '{ "issued_bank_account": "issuing_d11d404c919519c66ac61e14389f766a", "amount": "10", "currency": "PHP" }'{ "status": { "error_code": "ERROR_SIMULATE_DEPOSIT_CURRENCY_MISMATCH", "status": "ERROR", "message": "The request tried to simulate a bank transfer to a virtual account, but the currency of the deposit was not the same as the currency of the virtual account. The request was rejected. Corrective action: Set 'currency' to the currency of the virtual account.", "response_code": "ERROR_SIMULATE_DEPOSIT_CURRENCY_MISMATCH", "operation_id": "08c8dde9-807e-47f6-a8eb-42c31f71ea44" } }