Skip to main content

Documentation

Issue Virtual Account to Wallet

Issue a virtual account to an existing wallet.

Any bank can transfer money to a wallet using a virtual account number. 

A virtual account is for one or more currencies. 

There is no limit to the number of virtual accounts you can issue to a wallet. You can issue multiple virtual accounts in a single currency. 

When funds are transferred to a virtual account, the funds appear in the wallet’s currency account for the currency of the transfer. You can convert transferred funds to certain currencies.

Note

This endpoint replaces the deprecated endpoint - POST /v1/issuing/bankaccounts

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 metadata = new
                        {
                            merchant_defined = true
                        };
        
                        var requestObj = new
                        {
                            country = "DE",
                            currency = "EUR",
                            description = "Issue virtual account number to wallet",
                            ewallet = "ewallet_cfb416d9108161347d98acf17f3fd3e8",
                            merchant_reference_id = "abcd_09870987",
                            metadata
                        };
        
                        string request = JsonSerializer.Serialize(requestObj);
        
                        string result = RapydApiRequestSample.Utilities.MakeRequest("POST", "/v1/virtual_accounts", 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 = {
              currency: 'EUR',
              country: 'DE',
              description: 'Issue virtual account number to wallet',
              ewallet: 'ewallet_cfb416d9108161347d98acf17f3fd3e8',
              merchant_reference_id: 'abcd_09870987',
              metadata: {
                merchant_defined: 'true',
            }      
            };
            const result = await makeRequest('POST', '/v1/virtual_accounts', body);
        
            console.log(result);
          } catch (error) {
            console.error('Error completing request', error);
          }c
    • PHP

      • <?php
        $path = $_SERVER['DOCUMENT_ROOT'];
        $path .= "/code_race_2020/Utilities/PHP/utilities.php";
        include($path);
        $body = [
            "currency" => "EUR",
            "country" => "DE",
            "description" => "Issue virtual account number to wallet",
            "ewallet" => "ewallet_cfb416d9108161347d98acf17f3fd3e8",
            "merchant_reference_id" => "abcd_09870987",
            "metadata" => array(
                "merchant_defined" => true
            )
        ];
        
        try {
            $object = make_request('post', '/v1/virtual_accounts', $body);
            var_dump($object);
        } catch(Exception $e) {
            echo "Error: $e";
        }
        ?>
    • Python

      • from pprint import pprint
        
        from utilities import make_request
        
        body = {
            "currency": "EUR",
            "country": "DE",
            "description": "Issue virtual account number to wallet",
            "ewallet": "ewallet_cfb416d9108161347d98acf17f3fd3e8",
            "merchant_reference_id": "abcd_09870987",
            "metadata": {
                "merchant_defined": True
            }
        }
        
        results = make_request(method='post', path=f'/v1/virtual_accounts', body=body)
        pprint(results)rom pprint import pprint
        
        from utilities import make_request
        
        invoice_item = {
            "currency": "USD",
            "customer": "cus_b3b8ad0174f4c415c663b35bcf542192",
            "metadata": {
                "merchant_defined": True
            },
            "amount": 10
        }
        result = make_request(method='post', path='/v1/invoice_items', body=invoice_item)
        pprint(result)
  • /v1/virtual_accounts

  • Issue Virtual Account Number to Wallet

  • curl -X post
    https://sandboxapi.rapyd.net/v1/virtual_accounts
    -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 '{
        "currency": "EUR",
        "country": "DE",
        "description": "Issue virtual account number to wallet",
        "ewallet": "ewallet_eb221f9155cf0895c8a4e8b1ad6b844d",
        "merchant_reference_id": "5rtfgk897ter0df0m",
        "metadata": {
            "merchant_defined": true
        }
    }
    '
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "e213cb38-8a8f-4ae7-b124-2da91e6baaeb"
        },
        "data": {
            "id": "issuing_293e65543872d2a87057b48dd657dd06",
            "merchant_reference_id": "5rtfgk897ter0df0m",
            "ewallet": "ewallet_eb221f9155cf0895c8a4e8b1ad6b844d",
            "bank_account": {
                "beneficiary_name": "CashDash UK Limited",
                "address": "Northwest House, 119 Marylebone Road NW1 5PU",
                "country_iso": "DE",
                "iban": "DE07202208000092780641",
                "bic": "SXPYDEHH"
            },
            "metadata": {
                "merchant_defined": true
            },
            "status": "ACT",
            "description": "Issue test bank account",
            "funding_instructions": null,
            "currency": "EUR",
            "requested_currency": null,
            "transactions": []
        }
    }
  • Issue Virtual Account Number - Requested Currency

  • curl -X post
    https://sandboxapi.rapyd.net/v1/virtual_accounts
    -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 '{
        "currency": "USD",
        "country": "US",
        "description": "test US",
        "ewallet": "ewallet_7b202163832a9da0489960d670497426"
    }
    '
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "59079ed3-3fe7-4e52-8eb4-a3e49a3cd961"
        },
        "data": {
            "id": "issuing_ab9cc86fc203f74bdc76c002b19b0cd4",
            "merchant_reference_id": "5rtfgk8970dfbmT",
            "ewallet": "ewallet_7b202163832a9da0489960d670497426",
            "bank_account": {
                "beneficiary_name": "Rapyd Financial Technology US Inc",
                "address": "701 Villa Ave, Mountain View, CA 94041",
                "country_iso": "US",
                "country": "United States",
                "aba_routing_number": "051504597",
                "account_number": "5002001485351098"
            },
            "metadata": {
                "merchant_defined": true
            },
            "status": "ACT",
            "description": "Issue virtual account number to wallet",
            "funding_instructions": null,
            "currency": "USD",
            "requested_currency": null,
            "transactions": []
        }
    }