Skip to main content
POST
/
api
/
v1
/
payment-method
curl --request POST \
  --url https://sandbox.api.afriex.com/api/v1/payment-method \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "customerId": "69528240ba52c13b669fb239",
  "type": "WITHDRAW",
  "channel": "BANK_ACCOUNT",
  "accountName": "John Doe",
  "accountNumber": "0123456789",
  "countryCode": "NG",
  "institution": {
    "institutionCode": "058",
    "institutionName": "GTBank"
  }
}
'
{
  "data": {
    "paymentMethodId": "69d6002579101baa20f63816",
    "channel": "BANK_ACCOUNT",
    "customerId": "69d60024ab82306f11b03325",
    "institution": {
      "institutionCode": "000013",
      "institutionName": "GTBank"
    },
    "accountName": "John Doe",
    "accountNumber": "0123456789",
    "countryCode": "NG"
  }
}
Create a new payment method for a customer. Supported channels include bank accounts, mobile money, SWIFT, UPI, Interac, and WeChat.
Please note that fields without values are not included in the response. This includes fields with empty strings, null values, and undefined values.

Authorizations

x-api-key
string
header
required

Static business API key issued from the dashboard. A business can provision multiple API keys, each scoped to a configurable set of permissions (e.g. read transactions, create deposits, etc). Permissions are chosen per key at creation time in the dashboard and may be revoked by deleting the key. Requests made with a key that does not include the permission required by the target endpoint will be rejected with a 403 Forbidden response; an unrecognised, malformed or revoked key returns 401 Unauthorized. Manage your keys and their permissions under Developer → API keys in the dashboard.

Headers

x-api-signature
string

Signature of the request payload, used for request authentication where payload signing is enabled for your business.

x-api-version
string

API version in ISO 8601 format (e.g. 2025-12-28). Defaults to latest stable.

Body

application/json
channel
enum<string>
required

The payment method channel

Available options:
BANK_ACCOUNT,
MOBILE_MONEY,
VIRTUAL_BANK_ACCOUNT,
ACH_BANK_ACCOUNT,
INTERAC,
UPI,
SWIFT,
WE_CHAT,
ALIPAY,
PAYBILL_TILL
accountName
string
required

The name of the account holder

accountNumber
string
required

The account number

countryCode
string
required

The ISO 3166-1 alpha-2 country code. This has to be one of the countries we support

institution
object
required

Transaction capabilities

customerId
string

Optional. The customer to attach this payment method to. When omitted, it is attached to the business owner.

type
enum<string>

The capability of this payment method. DEPOSIT means funds can be pulled from this method (e.g. charge/collect from the customer). WITHDRAW means funds can be sent to this method (e.g. pay out to the customer). If omitted, defaults to WITHDRAW.

Available options:
DEPOSIT,
WITHDRAW
recipient
object
transaction
object

Response

Payment method created successfully.

data
object

A payment method. Empty fields are omitted. Account-shaped channels (BANK_ACCOUNT, MOBILE_MONEY, SWIFT, etc.) populate accountName, accountNumber, and institution; the CARD channel instead populates last4, brand, expiration, and cardName.