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"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.afriex.com/llms.txt

Use this file to discover all available pages before exploring further.

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 from the dashboard

Body

application/json
channel
enum<string>
required

The payment method channel

Available options:
BANK_ACCOUNT,
SWIFT,
MOBILE_MONEY,
UPI,
INTERAC,
WE_CHAT,
ALIPAY,
PAYBILL_TILL
customerId
string
required

The unique identifier of the customer.

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

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