> ## Documentation Index
> Fetch the complete documentation index at: https://flutterwaveinc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Bank Transfer

> Learn how to accept payments with bank transfers.

<Info>
  We recommend checking out the [introductory
  section](/payment-api/introduction) to understand the basics of direct
  charge first. This guide assumes you've read that.
</Info>

Direct charge via bank transfer allows you to generate account details (account number and bank) on demand to receive payments from customers via bank transfer.

<Info>Bank transfer is currently only supported for NGN transactions.</Info>

### The Process

Collecting payments via bank transfer charge is straightforward:

* You call the [bank transfer charge endpoint](/api-reference/transfers/initiate-a-transfer) to create a charge and generate account details for the customer to pay into.
* The customer transfers to the generated account.
* We send you a webhook notifying you that we've received the payment.
* You verify the payment and complete the customer's order.

<img src="https://mintcdn.com/flutterwaveinc/8LJ4mpYLmd_SNb9Z/images/pwbt.png?fit=max&auto=format&n=8LJ4mpYLmd_SNb9Z&q=85&s=04ff8d34f533f2ab9c0c0581a7927a0c" alt="pwbt" width="5760" height="10452" data-path="images/pwbt.png" />

## Initiating the Charge

To initiate the charge, you'll call the [bank transfer charge endpoint](/api-reference/transfers/initiate-a-transfer), which is supported in some of our [backend SDKs](/sdk-plugins/backend-libraries/nodejs). You'll need to specify:

* `tx_ref`: A unique reference code that you'll generate for each transaction.
* `amount`: The amount to be charged for the transaction.
* `currency`: The currency to be used for the charge (currently always "NGN").
* `email`: The customer's email address.

<CodeGroup>
  ```javascript Node.js theme={null}
  // Install with: npm i flutterwave-node-v3

  const Flutterwave = require('flutterwave-node-v3');
  const flw = new Flutterwave(
  	process.env.FLW_PUBLIC_KEY,
  	process.env.FLW_SECRET_KEY
  );

  const details = {
  	tx_ref: 'UNIQUE_TRANSACTION_REFERENCE',
  	amount: '1500',
  	currency: 'NGN',
  	email: 'developers@flutterwavego.com',
  	fullname: 'Flutterwave Developers',
  	phone_number: '+2349012345678',
  };
  const response = await flw.Charge.bank_transfer(details);
  ```

  ```ruby Ruby theme={null}
  # Install with: gem install flutterwave_sdk

  require './flutterwave_sdk'

  flw = Flutterwave.new(ENV["FLW_PUBLIC_KEY"], ENV["FLW_SECRET_KEY"], ENV["FLW_ENCRYPTION_KEY"])
  charge_transfer = BankTransfer.new(flw)

  payload = {
      "tx_ref" => "UNIQUE_TRANSACTION_REFERENCE",
      "amount" => "1500",
      "currency" => "NGN",
      "email" => "developers@flutterwavego.com",
      "fullname": "Flutterwave Developers",
      "phone_number" => "+2349012345678"
  }
  response = charge_transfer.initiate_charge(payload)
  ```

  ```json cURL theme={null}
  curl --request POST \
     --url https://api.flutterwave.com/v3/charges?type=bank_transfer \
     --header 'Authorization: Bearer FLW_SECRET_KEY' \
     --header 'content-type: application/json' \
     --data '{
        "tx_ref": "UNIQUE_TRANSACTION_REFERENCE",
        "amount": "1500",
        "currency": "NGN"
        "email": "developers@flutterwavego.com",
        "fullname": "Flutterwave Developers",
        "phone_number": "+2349012345678"
      }'
  ```
</CodeGroup>

<Info>
  You can also specify a list of subaccounts to split the payment into. See
  [split payments](/other-features/split-payments) for details.
</Info>

There are more options available when initiating a bank transfer charge, such as the payment expiry, customer's `phone_number` and additional `meta`. See the [endpoint](/api-reference/transfers/initiate-a-transfer) docs for details.

<CodeGroup>
  ```json Split with Subaccounts theme={null}
  {
    "tx_ref": "UNIQUE_TRANSACTION_REFERENCE",
    "amount": "1500",
    "currency": "NGN",
    "email": "developers@flutterwavego.com",
    "fullname": "Flutterwave Developers",
    "phone_number": "+2349012345678",
    "subaccounts": [
      {
        "id": "RS_D87A9EE339AE28BFA2AE86041C6DE70E"
      }
    ]
  }
  ```

  ```json Specify Payment Expiry theme={null}
  {
  	"tx_ref": "UNIQUE_TRANSACTION_REFERENCE",
  	"amount": "1500",
  	"currency": "NGN",
  	"email": "developers@flutterwavego.com",
  	"fullname": "Flutterwave Developers",
  	"phone_number": "+2349012345678",
  	"bank_transfer_options": {
  		"expires": 3600
  	}
  }
  ```
</CodeGroup>

If the charge is created successfully, you'll get a successful response containing the generated account details.

```json Success theme={null}
{
	"status": "success",
	"message": "Charge initiated",
	"meta": {
		"authorization": {
			"transfer_reference": "N/A",
			"transfer_account": "7825397990",
			"transfer_bank": "WEMA BANK",
			"account_expiration": "N/A",
			"transfer_note": "N/A",
			"transfer_amount": 1500,
			"mode": "banktransfer"
		}
	}
}
```

## Completing the Payment

The `meta.authorization` object contains the account details for the transfer: the bank name (`transfer_bank`), account number (`transfer_account`), and amount (`transfer_amount`). Pass the details on to your customer, and they can make a transfer into the account (for instance, from their bank app).

<Info>
  **Testing Tip**

  In [Test Mode](/testing), all bank transfers will automatically be paid after a few seconds.
</Info>

## Webhooks

When payment is made, we'll send you a webhook with a payload like this:

```json theme={null}
{
	"event": "charge.completed",
	"data": {
		"id": 407347576,
		"tx_ref": "UNIQUE_TRANSACTION_REFERENCE",
		"flw_ref": "000016210415121239000082517439",
		"device_fingerprint": "N/A",
		"amount": 1500,
		"currency": "NGN",
		"charged_amount": 1500,
		"app_fee": 21,
		"merchant_fee": 0,
		"processor_response": "success",
		"auth_model": "AUTH",
		"ip": "N/A",
		"narration": "Flutterwave Developers",
		"status": "successful",
		"payment_type": "bank_transfer",
		"created_at": "2021-04-15T11:13:10.000Z",
		"account_id": 82913,
		"customer": {
			"id": 254967086,
			"fullname": "Flutterwave Developers",
			"phone_number": "2349012345678",
			"email": "developers@flutterwavego.com",
			"created_at": "2021-04-14T16:39:17.000Z"
		}
	}
}
```

Now, your webhook endpoint can handle the event and complete the customer's order. For help setting up webhooks, see our [guide to webhooks](/webhooks).

In your webhook handler, you can then verify the payment and credit your customers with whatever they paid for. See our guide to [transaction verification](/transaction-verification) for details.
