Integration Flow

Learn how to integrate with the APIs you need, to transfer money from a virtual account to a beneficiary.

The figure below shows the steps involved in making a transfer from a virtual account.

371

Transfer from VIrtual Accounts Integration Flow

Follow the below steps to transfer money from a virtual account.

  1. [Prerequisite] Create a beneficiary

  2. Create a transfer

1. [Prerequisite] Create a Beneficiary

To transfer money to an individual or an entity, account holders must add them to their account as a beneficiary.

Currently, we support 2 types of beneficiaries:

  • Bank account beneficiary
  • VPA beneficiary

Learn how to create a beneficiary.

2. Create Transfer

After adding a beneficiary’ the account holder can transfer money to them as and when required.

Use the below endpoint to create a transfer.

POST: https://api.zwitch.io/v1/transfers

Below is a sample request and response for the Create Transfer API.

{
  "type": "account_number",
  "debit_account_id": "va_Q6USeYXbx38cKa3NbBpoHDViW",
  "beneficiary_id": "vab_BlNAXPqU4RifKb44hc1Yl40Vb",
  "amount": 1,
  "payment_mode": "imps",
  "async": true,
  "currency_code": "inr",
  "payment_remark": "Haircut and beard styling",
  "merchant_reference_id": "12345678901",
  "metadata": {
    "key_1": "DD",
    "key_2": "XOF"
  }
}
{
  "id": "tr_89s66ugi77ihI4JKfeHXXHaIc",
  "object": "transfer",
  "type": "account_number",
  "amount": 1,
  "debit_account_id": "va_Q6USeYXbx38cKa3NbBpoHDViW",
  "beneficiary_id": "vab_BlNAXPqU4RifKb44hc1Yl40Vb",
  "status": "initiated",
  "bank_reference_number": "485187050996789",
  "currency_code": "inr",
  "payment_mode": "imps",
  "payment_remark": "Haircut and beard styling",
  "paid_to": "123456789012",
  "otp_attempts": 0,
  "metadata": {
    "key_1": "DD",
    "key_2": "XOF"
  },
  "merchant_reference_id": "1000204",
  "transacted_at": 1656933820,
  "is_sandbox": true,
  "created_at": 1656933820
}

Learn more about the Create Transfer API.