Transaction creation
General principle
The request body for creating a transaction has the same shape for every type, but the valid values and combinations of the paymentType, sourceRequisit, and destinationRequisit fields depend on the value of the type field. Below is how to correctly build a request for each type.
Type EXCHANGE — currency exchange
How to build the request:
Set
type: "EXCHANGE".paymentTypemust always be set to"EMPTY".sourceRequisit.accountanddestinationRequisit.accountmust reference two different accounts that are in different currencies. The same account cannot be used for both source and destination.
Example of a valid request:
{
"customerId": "DHgsZkC-rvmu-0HYxwr1B65nD",
"paymentType": "EMPTY",
"type": "EXCHANGE",
"sourceRequisit": {
"account": "Usco8JZs2Nfo"
},
"destinationRequisit": {
"account": "EOdGnNNGgjbd"
},
"amount": {
"units": "1",
"nanos": 0
}
}Type TRANSFER — transfer between own accounts
How to build the request:
Set
type: "TRANSFER".paymentTypemust always be set to"EMPTY".sourceRequisit.accountanddestinationRequisit.accountmust reference two different accounts that are in the same currency.Both accounts must belong to the same
customerId.
Example of a valid request:
Type WITHDRAW — withdrawal to a beneficiary
How to build the request:
Set
type: "WITHDRAW".paymentTypecannot be"EMPTY"— it must be set to the value matching the support rail (payment system) of the beneficiary's account, for example"SWIFT".destinationRequisitmust always be described via thebeneficiarfield (notaccount) — it holds the recipient's account.
Example of a valid request:
Last updated

