---
agentTools:
  projectIndex: https://unipayment.readme.io/llms.txt
---

# Payment Method Object

# PaymentMethod

The `PaymentMethod ` object is a  object that represents a payment method. It contains common properties that all payment methods share, such as the transfer method and the title. We can use different details to represent different payment methods, currently supporting Crypto, Bank, and Internal. Refer to the following definitions for the specific structure.

| Field            | Type   | Description                                                                                                                                                                                        |
| ---------------- | ------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| title            | string | The title or name of the payment method. This is typically a user-friendly name that helps identify the payment method.                                                                            |
| transfer\_method | string | The method of transfer for the payment. This could be via **CRYPTO**, **BANK**, or **INTERNAL** methods. See [Supported Transfer Methods](https://unipayment.readme.io/reference/transfer-method). |
| detail           | object | The detail of the payment method. This could be a crypto address, bank account, or internal customer.                                                                                              |

# BankPaymentMethodDetail

The `BankPaymentMethodDetail` class is used to represent the details of a bank payment method. Depending on the network that the bank operates on, different fields within this class are utilized.

* For the SEPA (Single Euro Payments Area) network, the `iban` and `bic` fields are used. The `iban` field represents the International Bank Account Number, a standard numbering system developed to identify overseas bank accounts. The `bic` field represents the Bank Identifier Code (also known as SWIFT code), which is used to identify banks worldwide.

* For the Fedwire network, which is a real-time gross settlement funds transfer system operated by the United States Federal Reserve Banks, the `account_number` and `routing_number` fields are used. The `account_number` is the unique identifier of the individual account at the bank, and the `routing_number` is a nine-digit code used to identify the financial institution in a transaction.

* For the Swift network, for numeric accounts, the account\_number and bic fields are used, for IBAN accounts, the iban and bic fields are used.

This object provides a flexible way to handle different bank payment methods by using different combinations of fields based on the specific requirements of the bank network.

| Field                         | Type   | Description                                                                                                                                                                          |
| ----------------------------- | ------ | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| network                       | string | The network on which the bank operates. This could be BANK\_SEPA, BANK\_SWIFT, etc. See [Supported Bank Networks](https://unipayment.readme.io/reference/bank-network).              |
| asset\_type                   | string | The type of currency for the bank payment. This could be USD, EUR, GBP, etc. See [Supported Currencies](https://unipayment.readme.io/reference/currency).                            |
| account\_number               | string | The account number of the bank account.                                                                                                                                              |
| iban                          | string | The International Bank Account Number (IBAN) of the bank account.                                                                                                                    |
| bic                           | string | The Bank Identifier Code (BIC) or SWIFT code of the bank.                                                                                                                            |
| routing\_number               | string | The routing number of the bank.                                                                                                                                                      |
| bank\_identifier              | string | The bank\_identifier is a universal banking code used to store various regional bank identifiers.  For example, it can be used to store the UK sort code or the Australian BSB code. |
| reference                     | string | The reference for the bank payment.                                                                                                                                                  |
| bank\_name                    | string | The name of the bank.                                                                                                                                                                |
| bank\_address                 | string | The address of the bank.                                                                                                                                                             |
| bank\_country                 | string | The country code of the bank.                                                                                                                                                        |
| intermediary\_bank\_name      | string | The name of the intermediary bank, if any.                                                                                                                                           |
| intermediary\_account\_number | string | The account number of the intermediary bank, if any.                                                                                                                                 |
| intermediary\_bic             | string | The BIC or SWIFT code of the intermediary bank, if any.                                                                                                                              |

**EUR-SEPA**

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/b2ab2591bc77c12c59260aa497cbe28ec6af791b83d278d11fdafa44139140f0-image_10.png",
        "",
        ""
      ],
      "align": "center"
    }
  ]
}
[/block]

**USD-Fedwire**

![](https://files.readme.io/7d49220469ad83d2b6f2b417062ceb9c08906c86fec7322d9db6e9754a54d07e-image.png)

**USD-Swifit**

![](https://files.readme.io/d961e064211fec7b6c10ff8def70b0b9ac328a273e1d877d1ef8dbc69fc053a6-image.png)

<br />

# CryptoPaymentMethodDetail

The `CryptoPaymentMethodDetail` object is used to handle cryptocurrency payment methods by providing necessary details such as the network, asset type, and the wallet address.

| Field       | Type   | Description                                                                                                                                                                                           |
| ----------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| network     | string | Represents the network on which the cryptocurrency operates. This could be `NETWORK_BTC`, `NETWORK_ETH`, etc. See [Supported Crypto Networks](https://unipayment.readme.io/reference/crypto-network). |
| asset\_type | string | Represents the type of cryptocurrency asset. This could be `BTC`, `ETH`, `USDT`, `USDC`, etc. See [Supported Currencies](https://unipayment.readme.io/reference/currency) .                           |
| address     | string | Represents the address of the cryptocurrency wallet. This is where the funds will be sent.                                                                                                            |

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/574973c78cc17a2d73e290840fae915cfa432d534bb989758ce3a62c09ed34ba-image_9.png",
        "",
        ""
      ],
      "align": "center"
    }
  ]
}
[/block]

# InternalPaymentMethodDetail

The `InternalPaymentMethodDetail` class is used to handle internal payment methods by providing necessary details such as the asset type and the UID.

| Field       | Type   | Description                                                                                                 |
| ----------- | ------ | ----------------------------------------------------------------------------------------------------------- |
| asset\_type | string | Represents the type of asset. See [Supported Currencies](https://unipayment.readme.io/reference/currency) . |
| uid         | string | UID is the numerical identifier of the customer.                                                            |