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

# Fetch Payments Made Using Bank Transfer

> Fetch Payments made using Bank Transfer payment method.

<div style={{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.35rem 0.9rem",border:"1px solid rgba(128,128,128,0.28)",borderRadius:"0.5rem",padding:"0.45rem 0.75rem",margin:"0 0 1.25rem",fontSize:"0.875rem"}}>
  <span style={{fontWeight:600}}>Available in</span>
  <span>🇮🇳 India</span>
  <span>🇸🇬 Singapore</span>
  <span>🇺🇸 United States</span>
</div>

Use this endpoint to retrieve details of payments made using the bank transfer method.

If Razorpay does not receive the bank account information of the customer from the remitting bank, the `payer_bank_account` parameter will be set to null.

<RequestExample>
  ```bash Curl theme={null}
  curl -u [YOUR_KEY_ID]:[YOUR_KEY_SECRET] \
  -X GET \
  https://api.razorpay.com/v1/payments/pay_CmiztqmYJPtDAu/bank_transfer \
  ```

  ```java Java theme={null}
  RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");

  String paymentId = "pay_CmiztqmYJPtDAu";

  Payment payment = instance.payments.fetchBankTransfers(paymentId)
  ```

  ```php PHP theme={null}
  $api = new Api($key_id, $secret);

  $api->payment->fetch($virtualId)->bankTransfer();
  ```

  ```ruby Ruby theme={null}
  require "razorpay"
  Razorpay.setup('key_id', 'key_secret')

  paymend_id = "pay_Di5iqCqA1WEHq6"

  Razorpay::Payment.fetch(paymend_id).bank_transfer
  ```

  ```python Python theme={null}
  import razorpay
  client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET"))

  client.payment.bank_transfer(paymentId)
  ```

  ```javascript Node.js theme={null}
  var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' })

  instance.payments.bankTransfer(paymentId)
  ```

  ```go Go theme={null}
  import ( razorpay "github.com/razorpay/razorpay-go" )
  client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET")

  body, err := client.Payment.BankTransfer("<paymentID>", nil, nil)
  ```

  ```ruby Ruby theme={null}
  require "razorpay"
  Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET')

  paymend_id = "pay_Di5iqCqA1WEHq6"

  Razorpay::Razorpay::Payment.fetch(paymend_id).bank_transfer
  ```

  ```csharp .NET theme={null}
  RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]

  string paymentId = "pay_Z6t7VFTb9xHeOs";

  BankTransfer virtualaccount = client.Payment.Fetch(paymentId).BankTransfers();
  ```

  ```bash CLI theme={null}
  razorpay smart-collect fetch-by-bank-transfer pay_DlGmm7jInLudH8
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "id": "bt_Di5iqCElVyRlCb",
    "entity": "bank_transfer",
    "payment_id": "pay_Di5iqCqA1WEHq6",
    "mode": "NEFT",
    "bank_reference": "157414364471",
    "amount": 239000,
    "payer_bank_account": {
      "id": "ba_Di5iqSxtYrTzPU",
      "entity": "bank_account",
      "ifsc": "UTIB0003198",
      "bank_name": "Axis Bank",
      "name": "Acme Corp",
      "notes": [],
      "account_number": "765432123456789"
    },
    "virtual_account_id": "va_Di5gbNptcWV8fQ",
    "virtual_account": {
      "id": "va_Di5gbNptcWV8fQ",
      "name": "Acme Corp",
      "entity": "virtual_account",
      "status": "closed",
      "description": "Customer Identifier created for M/S ABC Exports",
      "amount_expected": 2300,
      "notes": {
        "material": "teakwood"
      },
      "amount_paid": 239000,
      "customer_id": "cust_DOMUFFiGdCaCUJ",
      "receivers": [
        {
          "id": "ba_Di5gbQsGn0QSz3",
          "entity": "bank_account",
          "ifsc": "RATN0VAAPIS",
          "bank_name": "RBL Bank",
          "name": "Acme Corp",
          "notes": [],
          "account_number": "1112220061746877"
        }
      ],
      "close_by": 1574427237,
      "closed_at": 1574164078,
      "created_at": 1574143517
    }
  }
  ```

  ```json Failure theme={null}
  {
    "error": {
      "code": "BAD_REQUEST_ERROR",
      "description": "The api key provided is invalid",
      "source": "NA",
      "step": "NA",
      "reason": "NA",
      "metadata": {}
    }
  }
  ```
</ResponseExample>

## Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the payment made to the Customer Identifier.
</ParamField>

## Response Parameters

<ResponseField name="id" type="string">
  The unique identifier of the bank transfer.
</ResponseField>

<ResponseField name="entity" type="string">
  The name of the entity. Here, it is `bank_transfer`.
</ResponseField>

<ResponseField name="payment_id" type="string">
  The unique identifier of the payment.
</ResponseField>

<ResponseField name="mode" type="string">
  The mode of bank transfer used. Possible values are:

  * `NEFT`
  * `RTGS`
  * `IMPS`
  * `UPI`
</ResponseField>

<ResponseField name="bank_reference" type="string">
  Unique reference number provided by the bank for the transaction.
</ResponseField>

<ResponseField name="payer_bank_account" type="object">
  The payer bank account details from which payment is received.
</ResponseField>

<ResponseField name="id" type="string">
  The unique identifier of the customer's bank account.
</ResponseField>

<ResponseField name="entity" type="string">
  The name of the entity. Here, it is `bank_account`.
</ResponseField>

<ResponseField name="ifsc" type="string">
  The IFSC associated with the bank account.
</ResponseField>

<ResponseField name="bank_name" type="string">
  The name of the bank in which the customer has an account.
</ResponseField>

<ResponseField name="notes" type="object">
  Any custom notes added to the Customer Identifier.
</ResponseField>

<ResponseField name="account_number" type="string">
  The unique account number of the customer.
</ResponseField>

<ResponseField name="virtual_account_id" type="string">
  The unique identifier of the Customer Identifier.
</ResponseField>

<ResponseField name="virtual_account" type="object">
  Details of the Customer Identifier.
</ResponseField>

<ResponseField name="id" type="string">
  The unique identifier of the Customer Identifier.
</ResponseField>

<ResponseField name="name" type="string">
  The `merchant billing label` as it appears on Dashboard.
</ResponseField>

<ResponseField name="entity" type="string">
  The name of the entity. Here, it is `virtual account`.
</ResponseField>

<ResponseField name="status" type="string">
  Indicates the status of the Customer Identifier. Possible values are:

  * `active`
  * `closed`
</ResponseField>

<ResponseField name="description" type="string">
  A brief description about the Customer Identifier.
</ResponseField>

<ResponseField name="amount_expected" type="integer">
  The amount expected by the merchant.
</ResponseField>

<ResponseField name="amount_paid" type="integer">
  The amount paid by the customer to the Customer Identifier.
</ResponseField>

<ResponseField name="notes" type="object">
  Any custom notes added during the creation of the Customer Identifier.
</ResponseField>

<ResponseField name="customer_id" type="string">
  The unique identifier of the customer the Customer Identifier is linked with. Know more about [Customers API](/docs/api/customers).
</ResponseField>

<ResponseField name="receivers" type="object">
  Configuration of desired receivers for the Customer Identifier.
</ResponseField>

<ResponseField name="id" type="string">
  The unique identifier of the Customer Identifier. For example,  `ba_Di5gbQsGn0QSz3`.
</ResponseField>

<ResponseField name="entity" type="string">
  The name of the entity. Here, it is `bank_account`.
</ResponseField>

<ResponseField name="ifsc" type="string">
  The IFSC for the Customer Identifier created. For example, `RATN0VAAPIS`.
</ResponseField>

<ResponseField name="bank_name" type="string">
  The bank associated with the Customer Identifier. For example, `RBL`.
</ResponseField>

<ResponseField name="account_number" type="string">
  The unique account number provided by the bank. For example, `1112220061746877`.
</ResponseField>

<ResponseField name="name" type="string">
  The `merchant billing label` as it appears on Dashboard.
</ResponseField>

<ResponseField name="notes" type="object">
  Any custom notes added during the creation of the Customer Identifier.
</ResponseField>

<ResponseField name="close_by" type="integer">
  UNIX timestamp at which the Customer Identifier is scheduled to be automatically closed. The time must be at least 15 minutes after current time. The date range can be set till `2147483647` in UNIX timestamp format (equivalent to Tuesday, January 19, 2038 8:44:07 AM GMT+05:30). Any request beyond `2147483647` UNIX timestamp will fail.
</ResponseField>

<ResponseField name="closed_at" type="integer">
  UNIX timestamp at which the Customer Identifier is automatically closed.
</ResponseField>

<ResponseField name="created_at" type="integer">
  UNIX timestamp at which the Customer Identifier was created.
</ResponseField>

## Errors

<AccordionGroup>
  <Accordion
    title="The API `<key/secret>
` provided is invalid."
  >
    **Code:** `4xx`

    Occurs when there is a mismatch between the API credentials passed in the API call and the API credentials generated on the dashboard.

    **Solution:** Make sure that the API keys are active and entered correctly. Also, make sure there are no whitespaces before or after the keys.
  </Accordion>
</AccordionGroup>
