Skip to main content

Documentation

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/bankaccounttransfertobankaccount

Rapyd will continue to support the deprecated endpoint until December 31, 2024.

Prerequisites:

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_acounts/transactions

  • Simulate a Bank Transfer to a Wallet

  • 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'
    -d '{ 
        "issued_bank_account": "issuing_36feaa027745f08b4691636d8d3fd07e",
        "amount": "10",
        "currency": "USD"
    }
    '
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "47d52564-525e-449c-8199-b29999af3f56"
        },
        "data": {
            "id": "issuing_36feaa027745f08b4691636d8d3fd07e",
            "merchant_reference_id": "issuing_36feaa027745f08b4691636d8d3fd07e",
            "ewallet": "ewallet_5c148fcf040282f80907026f6030cce9",
            "bank_account": {
                "beneficiary_name": "Rapyd Holdings Pte Ltd",
                "address": "G/F, The Center, 99 Queen's Road Central, Central, Hong Kong",
                "country_iso": "HK",
                "bank": "DBS Bank (Hong Kong) Limited",
                "country": "Hong Kong",
                "bank_code": "016",
                "account_id": "7981397317776192",
                "account_id_type": "",
                "local_bank_code_type": "",
                "swift_bic": "DHBKHKHH",
                "branch_code": "478"
            },
            "metadata": {},
            "status": "ACT",
            "description": "K DBS HK",
            "funding_instructions": null,
            "currency": "HKD",
            "requested_currency": "USD",
            "transactions": [
                {
                    "id": "isutran_1dced11bb8a6592a6261e945fd2267bc",
                    "amount": 10,
                    "currency": "USD",
                    "original_amount": 10,
                    "original_currency": "USD",
                    "fx_rate": 1,
                    "created_at": 1703848792
                }
            ]
        }
    }
  • Simulate a Bank Transfer with FX to a Wallet

  • 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'
    -d '{
        "issued_bank_account": "issuing_f8059a980c5c3c7f671949de1f3cd002",
        "amount": "101",
        "currency": "HKD"
    }
    '
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "c91fcb17-fda7-448d-b64b-1aeac1751f56"
        },
        "data": {
            "id": "issuing_f8059a980c5c3c7f671949de1f3cd002",
            "merchant_reference_id": "John_Doe_Hong_Kong",
            "ewallet": "ewallet_e333ad108df8f8cf33356c9c8ce52ced",
            "bank_account": {
                "beneficiary_name": "John Doe",
                "address": "99 Main Street, Hong Kong",
                "country_iso": "HK",
                "bank": "DBS Bank (Hong Kong) Limited",
                "country": "Hong Kong",
                "bank_code": "016",
                "account_number": "7981310380410491",
                "bic": "DHBKHKHH"
            },
            "metadata": {
                "merchant_defined": true
            },
            "status": "ACT",
            "description": "Issue virtual account to wallet - activated",
            "funding_instructions": null,
            "currency": "HKD",
            "requested_currency": "EUR",
            "transactions": [
                {
                    "id": "isutran_b7101b9f1f9574919c1f3fb9697d8f7c",
                    "amount": 11.46,
                    "currency": "EUR",
                    "original_amount": 101,
                    "original_currency": "HKD",
                    "fx_rate": 0.11348612,
                    "created_at": 1693481056
                }
            ]
        }
    }
  • Simulate a Bank Transfer with Remitter Information to a Wallet

  • 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'
    -d '{
        "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": "dba70ab1-e4b2-447a-8249-ce7edc3b2c73"
        },
        "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": "",
            "funding_instructions": null,
            "currency": "IDR",
            "transactions": [
                {
                    "id": "isutran_5ac346053c6b65b3bdcf4baa7aad67c0",
                    "amount": 1,
                    "currency": "IDR",
                    "created_at": 1677495859
                }
            ]
        }
    }