Bank Accounts

Rapyd enables you to issue a bank account number to a customer's Rapyd Wallet.

The customer can top up the wallet with a bank transfer to the bank account number.

Use Case Overview

Let's consider the case of John Doe (the customer), who created a wallet as described in Creating a Rapyd Wallet. He wants his wallet to have a bank account number so that he and others can transfer money directly into the wallet. John provides information requested by your website or mobile application, and he receives a bank account number for his wallet.

Let's walk through the process to understand how to implement this use case using the Rapyd platform. First, we'll look at your high-level workflow. Then we'll explain how to implement the workflow in detail. We'll use sample code to bring the workflow to life.

Issuing a Bank Account Number to a Wallet Workflow

Let’s look at the highlights of your workflow.

  1. A customer on your website or mobile app requests a bank account number for the customer's wallet, and provides the required information.
  2. The back end asks Rapyd to issue a bank account number to the wallet.
  3. Rapyd issues the bank account number and returns a confirmation to your back end.
  4. You display the bank account number to the customer.

Implementing the Workflow

👍

Prerequisites

To run the examples of this use case, you must create the following ID in your own sandbox:

Let's take a quick look at how you'll use Rapyd's API to implement the workflow.

  1. Send Rapyd a request to issue a bank account number to the wallet.
  2. Receive a confirmation with the bank account number.

Issuing a Bank Account Number to the Wallet

You ask Rapyd to issue a bank account number to John Doe's wallet.

For that, you'll use Issue Bank Account Number to Wallet with the following parameters:

Body Parameter

Description

ewallet

Enter the wallet 'id' that you received when you created the wallet in your sandbox. For purposes of this use case lesson, we are using ewallet_45c238c0d8882467128318e6a4977eed, which is the wallet ID we created in our sandbox.

country

Enter SK as the country code for Slovakia, where John Doe lives.

currency

Enter EUR as the currency code for euros.

description

Enter Issuing bank account number to wallet as a comment.

Issue Bank Account Number to Wallet Request

You ask Rapyd to issue the bank account number to the wallet.

// Request URL: POST https://sandboxapi.rapyd.net/v1/issuing/bankaccounts

// Message body:
{
  "currency": "EUR",
  "country": "SK",
  "description": "Issuing bank account number to wallet",
  "ewallet": "ewallet_45c238c0d8882467128318e6a4977eed"
}
using System;
using System.Text.Json;

namespace RapydApiRequestSample
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                var requestObj = new
                {
                    country = "SK",
                    currency = "EUR",
                    description = "Issuing bank account number to wallet",
                    ewallet = "ewallet_45c238c0d8882467128318e6a4977eed"
                 };

                string request = JsonSerializer.Serialize(requestObj);

                string result = RapydApiRequestSample.Utilities.MakeRequest("POST", "/v1/issuing/bankaccounts", request);
                Console.WriteLine(result);
            }
            catch (Exception e)
            {
                Console.WriteLine("Error completing request: " + e.Message);
            }
        }
    }
}
const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;

async function main() {
  try {
    const body = {
      currency: 'EUR',
      country: 'SK',
      description: 'Issuing bank account number to wallet',
      ewallet: 'ewallet_45c238c0d8882467128318e6a4977eed'
    };
    const result = await makeRequest('POST', '/v1/issuing/bankaccounts', body);

    console.log(result);
  } catch (error) {
    console.error('Error completing request', error);
  }
}
<?php
$path = $_SERVER['DOCUMENT_ROOT'];
$path .= "/<path-to-your-utility-file>/utilities.php";
include($path);

$body = [
    'currency' => 'EUR',
    'country' => 'SK',
    'description' => 'Issuing bank account number to wallet',
    'ewallet' => 'ewallet_45c238c0d8882467128318e6a4977eed'
];

try {
    $object = make_request('post', '/v1/issuing/bankaccounts', $body);
    var_dump($object);
} catch (Exception $e) {
    echo "Error: $e";
}
?>
from pprint import pprint

from utilities import make_request

body = {
    "currency": "EUR",
    "country": "SK",
    "description": "Issuing bank account number to wallet",
    "ewallet": "ewallet_45c238c0d8882467128318e6a4977eed",
}

results = make_request(method='post', path=f'/v1/issuing/bankaccounts', body=body)
pprint(results)

Issue Bank Account Number to Wallet Response

Let's take a look at the response. Issued Bank Account Number Object describes the fields in the response.

{
    "status": {
        "error_code": "",
        "status": "SUCCESS",
        "message": "",
        "response_code": "",
        "operation_id": "6ccb0572-93ad-4dbf-b419-76b14876c29d"
    },
    "data": {
        "id": "issuing_64c7c4c32189fa8689ec9fe050aff3d9",
        "merchant_reference_id": "issuing_64c7c4c32189fa8689ec9fe050aff3d9",
        "ewallet": "ewallet_45c238c0d8882467128318e6a4977eed",
        "bank_account": {
            "Iban": "DE3645888045987523520112"
        },

        // ...  
          
        "status": "ACT",
        "description": "Issuing bank account number to wallet",
        "currency": "EUR",
        "transactions": []
    }
}

The data section of this response shows:

  • The Rapyd ID of the wallet's bank account number is issuing_9bbf12953cbaa15b7c2a51584e3d4145. Since the request did not specify a reference ID, this number is also used for merchant_reference_id. When you run this example in your own sandbox, you will get a different ID.
  • ewallet is the ID of John Doe's wallet.
  • The bank_account in this case has an IBAN with the number DE3376599444263666923298.
  • The currency is EUR.
  • The status is ACT. This means that the bank account number is active.

Your website shows John a confirmation and the bank account number.

Want to learn more?

📘

Looking for more in-depth technical information?

Want to see the Rapyd API methods and objects that you'll use?
Visit the Rapyd API Reference Documentation for more technical details.


Updated 5 days ago


Bank Accounts


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.