Issues a payment on behalf of a client. Supports internal transfers, SEPA, SWIFT, UK Faster Payments and FX payments depending on the source account provider and currency. bankPaymentScheme is optional: if it is omitted, Toqio resolves it from the schemes available for the source/beneficiary pair. Call GET /customers/{customerId}/clients/{clientId}/provider/{provider}/transactions/bankPaymentSchemes to discover which schemes are available.
FX payments
A payment is an FX payment when beneficiaryAssetType is set and differs from currency (case-insensitive). amount is expressed in the currency of the fixed side:
fixedSide=SENDER(the default whenfixedSideis omitted):amountis in the source account currency, and Toqio quotes the amount the beneficiary receives inbeneficiaryAssetType.fixedSide=BENEFICIARY:amountis inbeneficiaryAssetType, and Toqio quotes the amount debited from the source account.
There is no request field for the other side's amount; Toqio always quotes it. If currency is omitted on an FX payment, it is inferred from the source account; we recommend always sending it.
Toqio takes the quote before the payment is created, at the same rate and markup as PUT /customers/{customerId}/provider/{provider}/transactions/quote. If the payment could not be quoted (for example, the currency pair is not supported or the amount is out of range), the request fails with 417 fx_quote_not_available. Sending the same request again unchanged is not expected to succeed; if the request is valid, contact support with the requestId. If no quote can be obtained right now (for example, the quote service is temporarily unavailable, does not answer in time or limits the request rate), the request fails with 503 fx_quote_temporarily_unavailable; the same request can be sent again later, with increasing delays between attempts. In both cases no payment is created and nothing is sent to the bank. For ONCE_FUTURE_DATE and RECURRING FX payments, the rate stored when the payment is created is indicative: the rate is quoted again when each payment is executed.
In the response to an FX payment:
totalandcurrencyare the amount the beneficiary receives and the beneficiary currency.baseTotalandbaseCurrencyare the amount debited and the source account currency.beneficiaryCurrencyAmountis the amount the beneficiary receives.fxRateis the rate applied (units of the beneficiary currency per 1 unit of the source account currency), andfixedSideechoes the fixed side.paymentProviderDetails.rateandpaymentProviderDetails.conversionIdare filled in when the bank provider reports them, so they may be absent right after the payment is created.
For same-currency payments, total = baseTotal = amount.
Send currency and beneficiaryAssetType as upper-case ISO 4217 codes, and always send currency. The response echoes them as they were sent: currency in the response is the request currency on a same-currency payment (not set if it was omitted) and the request beneficiaryAssetType on an FX payment, without converting it to upper case.
Scheduled and recurring payments
triggerTypeomitted or IMMEDIATELY: the payment is executed straight away.- ONCE_FUTURE_DATE: the payment is executed once, on
transferConfig.startDate, which is REQUIRED and must be today or later. Do not sendtransferConfig.repeatCount. - RECURRING:
transferConfig.startDateandfrequencyare REQUIRED. WithfrequencyCUSTOM, the interval is given bytransferConfig.timeIntervalandtransferConfig.unit. UsetransferConfig.endDateto end the series on a given date.transferConfig.repeatCountlimits the number of executions and is supported only withfrequencyCUSTOM, DAILY, WEEKLY, EVERY_OTHER_WEEK or MONTHLY; with LAST_DAY_OF_MONTH, useendDateinstead.
A request that sends repeatCount with LAST_DAY_OF_MONTH or with ONCE_FUTURE_DATE is accepted, but the payment is never executed.
Errors and retries
Errors are returned as a RestError object; use code to identify the cause and serviceValidationErrors to find invalid fields. Sending the request again always creates a new payment.
The following errors are returned before the payment is created, so the request can be corrected and sent again:
- 400 field validation and malformed-body errors (codes
Bad Requestanderror_invalid_request_parameter),tx_fee_not_set,error_invalid_payment_schemeanderror_empty_payment_scheme. - 401, and 403 with code
ACCESS_DENIED. - 404
beneficiary_not_found. - 417
account_not_found, source account not ACTIVATED (messageSource account cannot be <status>),error_same_accountandfx_quote_not_available. - 503
fx_quote_temporarily_unavailable. Nothing was created or sent to the bank, so the same request can be sent again unchanged; wait before each attempt and increase the delay between attempts.
In other cases a transaction may already be recorded, so do not send the request again without checking:
- A 200 response always returns the transaction; check its
status. When the payment provider rejects the payment, the response is still 200 andstatusis FAILED. - A 403 with a code other than
ACCESS_DENIEDusually means the payment provider rejected the payment, and the transaction is recorded with status FAILED. It can also come from an internal service failure, before or after the transaction is recorded, so a transaction may or may not exist. - A 400 with message
startDate must be after current datemay leave a PENDING transaction, which is never executed.
After any other 5xx response, or a 403 with a code other than ACCESS_DENIED, call GET /customers/{customerId}/transactions to check whether the payment was recorded before sending the request again.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Read more about Create Transaction
401Unauthorized. The access token is missing, invalid or expired. The payment was not created; obtain a valid token and send the request again.
