Creates a new transaction for a customer.
Create a new transaction to process a payment for a customer. UseDocumentation Index
Fetch the complete documentation index at: https://docs.afriex.com/llms.txt
Use this file to discover all available pages before exploring further.
type: WITHDRAW to send funds to a destination payment method (requires destinationId), type: DEPOSIT to pull funds from a source payment method (requires sourceId), or type: SWAP to convert funds between currencies within the Afriex wallet (requires only sourceAmount, sourceCurrency, destinationCurrency, and meta. The API calculates the actual destinationAmount at the live exchange rate.).Static business API key from the dashboard
The transaction amount in the destination currency.
"100.50"
The 3-letter ISO 4217 currency code of the destination currency (e.g., USD, NGN).
"USD"
The 3-letter ISO 4217 currency code of the source currency (e.g., USD, NGN).
"NGN"
Optional meta data you can attach to the transaction.
The unique identifier of the customer. Required for DEPOSIT and WITHDRAW transactions. Not required for SWAP — if omitted, the transaction runs against the business wallet.
"69528240ba52c13b669fb239"
The type of transaction. DEPOSIT pulls funds from the customer's source payment method (requires sourceId). WITHDRAW sends funds to the customer's destination payment method (requires destinationId). SWAP converts funds between currencies within the Afriex wallet (requires only sourceAmount, sourceCurrency, destinationCurrency, and meta — the API calculates the actual destinationAmount at the live exchange rate). If omitted, defaults to WITHDRAW.
DEPOSIT, WITHDRAW, SWAP The transaction amount in the source currency.
"100.50"
Required for WITHDRAW transactions. The id of the destination payment method that money will be sent to.
"690df3281c11eea59108fcaf"
Required for DEPOSIT transactions. The id of the source payment method that money will be pulled from.
"690df3281c11eea59108fcaf"
Transaction created successfully.