Skip to main content
POST
/
api
/
v1
/
payment-method
Create a payment method
curl --request POST \
  --url https://staging.afx-server.com/api/v1/payment-method \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "channel": "BANK_ACCOUNT",
  "customerId": "<string>",
  "accountName": "<string>",
  "accountNumber": "<string>",
  "countryCode": "<string>",
  "institution": {
    "institutionId": "<string>",
    "institutionName": "<string>",
    "institutionCode": "<string>",
    "institutionAddress": "<string>"
  },
  "recipient": {
    "recipientEmail": "jsmith@example.com",
    "recipientPhone": "<string>",
    "recipientAddress": "<string>",
    "recipientName": "<string>"
  },
  "transaction": {
    "transactionInvoice": "<string>",
    "transactionNarration": "<string>"
  }
}
'
{
  "data": {
    "paymentMethodId": "<string>",
    "customerId": "<string>",
    "institution": {
      "institutionId": "<string>",
      "institutionName": "<string>",
      "institutionCode": "<string>",
      "institutionAddress": "<string>"
    },
    "transaction": {
      "transactionInvoice": "<string>",
      "transactionNarration": "<string>"
    },
    "channel": "BANK_ACCOUNT",
    "countryCode": "<string>",
    "accountName": "<string>",
    "accountNumber": "<string>",
    "meta": {}
  }
}
Create a new payment method for a customer. Supported channels include bank accounts, mobile money, SWIFT, UPI, Interac, and WeChat.

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

recipient
object
transaction
object

Response

Payment method created successfully.

data
object