Create an account-to-account transfer

  • Creates an account-to-account transfer.
  • Business-rule rejections (for example, insufficient funds) are returned as 201 with status REJECTED and failure_reason populated, not as a 4xx error.
Body Params

Account-to-account transfer request.

Both source_amount and destination_amount are required objects, each carrying its own
currency. Exactly one must supply amount; the server computes the other using
exchange_rate (rounding the result down to the nearest minor unit).

When source_amount.currency == destination_amount.currency, exchange_rate must be absent
or "1". When currencies differ, exchange_rate is required and follows the convention
destination_amount.amount = source_amount.amount × exchange_rate.

string
required
length between 1 and 50

Source account identifier

string
required
length between 1 and 50

Destination account identifier

source_amount
object
required

A monetary amount with currency. amount is in minor units (positive integer string).

  • On a transfer request, both source_amount and destination_amount are present and each
    carries its currency. Exactly one must supply amount — the server computes the other
    and populates both on the stored record.
  • On a deposit request (destination_amount) and a withdrawal request (source_amount),
    both amount and currency are always required.
  • On every response (Create or Get), all Money objects are fully populated (amount + currency).
destination_amount
object
required

A monetary amount with currency. amount is in minor units (positive integer string).

  • On a transfer request, both source_amount and destination_amount are present and each
    carries its currency. Exactly one must supply amount — the server computes the other
    and populates both on the stored record.
  • On a deposit request (destination_amount) and a withdrawal request (source_amount),
    both amount and currency are always required.
  • On every response (Create or Get), all Money objects are fully populated (amount + currency).
string
length ≤ 20

Exchange rate applied when computing the missing amount. Required when
source_amount.currency != destination_amount.currency; absent or "1" otherwise.

fee
object

Fee on an account-to-account transfer. The fee is additive to the principal:

  • Fee on source: source account is debited source_amount.amount + fee.amount.
  • Fee on destination: destination account is credited destination_amount.amount - fee.amount.
    fee.currency must match the currency of the side the fee is charged to.
string
required
length between 1 and 100
^\S+$

Client-provided unique transaction reference (idempotency key). Must not
contain whitespace.

string
length between 1 and 255

Human-readable description

Responses

403

Access token rejected by the API gateway (for example, expired).

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json