Skip to main content
POST
Afriex SDK
Supported channels include bank accounts, mobile money, SWIFT, UPI, Interac, WeChat, and Alipay.
Cards are not created here. CARD is a hosted-checkout channel only, available through Create Checkout Session; this endpoint does not accept it.
Please note that fields without values are not included in the response. This includes fields with empty strings, null values, and undefined values.
accountName character rules. For every channel except WE_CHAT and ALIPAY, the account holder’s name must use Latin-script letters (A-Z / a-z, including accented forms such as é, ñ, ü, ç) or Chinese (Han) characters, digits (0-9), spaces, and the characters &, (, ), +, ,, -, ., /, :, ?, and apostrophe ('). At least one letter is required. Names in other scripts (e.g. Arabic, Cyrillic) or containing other symbols are rejected. For WE_CHAT and ALIPAY payouts, submit the beneficiary’s local-script name (e.g. Chinese characters) as it appears on their wallet. For ALIPAY, and for WE_CHAT payouts in CNY, separate the first and last name with a space, for example Wei Zhang or 张 伟.

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. Manage your keys and their permissions under Developer → API keys in the dashboard.

A request whose key does not carry the permission the target endpoint requires is rejected with 401 Unauthorized, the same response an unrecognised, malformed, revoked or disabled key returns. The API does not distinguish the two cases on the wire.

See the Permissions reference for the permission each endpoint requires.

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. The only supported version is 2026-05-18, which is also the default when the header is omitted. Any other value is rejected with a 400 Bad Request.

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
countryCode
string
required

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

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
accountName
string

The name of the account holder. Must use Latin-script letters (A-Z / a-z, including accented forms such as é, ñ, ü, ç) or Chinese (Han) characters, digits (0-9), spaces and the characters & ( ) + , - . / : ? and apostrophe; it must contain at least one letter. Names in other scripts (e.g. Arabic, Cyrillic) or containing other symbols are rejected. Exception: China-facing payouts on the WE_CHAT and ALIPAY channels accept the beneficiary's local-script (e.g. Chinese) name. On ALIPAY, and on WE_CHAT with currency CNY, the name must be split into first and last name with a space (e.g. "张 伟" or "Wei Zhang").

accountNumber
string

The account number. For a BANK_ACCOUNT in NG it must be exactly 10 digits. For a BANK_ACCOUNT in a country that uses IBANs (e.g. EUR) it must be a valid IBAN. For MOBILE_MONEY send digits only, with no leading + (country code plus national number); the length is checked for some countries and the number must be a valid phone number for countryCode.

institution
object

The destination institution. For USD (SWIFT) payout payment methods, correspondentBankName and correspondentBankAccountNumber are mandatory. A BANK_ACCOUNT in CNY also needs institutionBranch and institutionCode. WE_CHAT and ALIPAY take no institution, because the channel names the wallet. Any institution you send for them is ignored.

recipient
object

On a payment method, only recipientEmail, recipientPhone, recipientAddress and recipientName are returned. The other fields are accepted when you create one but are not returned on it.

sender
object

Optional details of the sender, stored with the payment method and not returned on it. Takes the same fields as recipient.

transaction
object
meta
object

Optional meta data to attach to the payment method. It is stored as sent and returned as meta on the payment method.

walletTag
string

Optional. Tags the payment method to one of your wallets (DEPOSIT, WITHDRAW or FEE). Stored as sent and not returned on the payment method.

amount

Optional. An amount to store with the payment method, returned as amount.

Required range: x > 0
Example:

"100.50"

wechatId
string

Optional WeChat ID, sent alongside the phone number in accountNumber. Only used on the WE_CHAT channel; ignored on every other channel.

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.