Create Transaction

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 when fixedSide is omitted): amount is in the source account currency, and Toqio quotes the amount the beneficiary receives in beneficiaryAssetType.
  • fixedSide = BENEFICIARY: amount is in beneficiaryAssetType, 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:

  • total and currency are the amount the beneficiary receives and the beneficiary currency.
  • baseTotal and baseCurrency are the amount debited and the source account currency.
  • beneficiaryCurrencyAmount is the amount the beneficiary receives.
  • fxRate is the rate applied (units of the beneficiary currency per 1 unit of the source account currency), and fixedSide echoes the fixed side.
  • paymentProviderDetails.rate and paymentProviderDetails.conversionId are 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

  • triggerType omitted 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 send transferConfig.repeatCount.
  • RECURRING: transferConfig.startDate and frequency are REQUIRED. With frequency CUSTOM, the interval is given by transferConfig.timeInterval and transferConfig.unit. Use transferConfig.endDate to end the series on a given date. transferConfig.repeatCount limits the number of executions and is supported only with frequency CUSTOM, DAILY, WEEKLY, EVERY_OTHER_WEEK or MONTHLY; with LAST_DAY_OF_MONTH, use endDate instead.

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 Request and error_invalid_request_parameter), tx_fee_not_set, error_invalid_payment_scheme and error_empty_payment_scheme.
  • 401, and 403 with code ACCESS_DENIED.
  • 404 beneficiary_not_found.
  • 417 account_not_found, source account not ACTIVATED (message Source account cannot be <status>), error_same_account and fx_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 and status is FAILED.
  • A 403 with a code other than ACCESS_DENIED usually 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 date may 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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Read more about Create Transaction

Path Params
string
required

customerId

Body Params

issuePayment

string

If the payment is related to an advanced invoice, the id of it.

double
required

Amount of the payment, in the currency of the fixed side. For same-currency payments, the amount in currency. For FX payments with fixedSide SENDER (the default), the amount debited, in the source account currency; with fixedSide BENEFICIARY, the amount the beneficiary receives, in beneficiaryAssetType.

string
enum

Optional for every provider. If it is omitted, Toqio resolves it from the schemes available for the source/beneficiary pair and uses the only one available; the request is rejected with 400 error_invalid_payment_scheme if several are available (except transfers between the client's own accounts on some providers, where SWIFT is used), and with 400 error_empty_payment_scheme if none are. Accepted codes vary by provider and currency; call GET /customers/{customerId}/clients/{clientId}/provider/{provider}/transactions/bankPaymentSchemes to obtain the schemes available for a given source/beneficiary pair.

beneficiaryAccount
object

This object is REQUIRED if beneficiaryAccountId is empty

string

This field is REQUIRED if beneficiaryAccount object is empty.

string

Currency the beneficiary receives (e.g. EUR). When it is set and differs from currency (case-insensitive), the payment is an FX payment. Omit it, or send the same value as currency, for a same-currency payment.

boolean
Defaults to false

Indicates if a payment is a billing fee

string
enum

This field is REQUIRED if beneficiaryAccountId is empty.

Allowed:
string
required

Client ID assigned by TOQIO system

string
required
^[ -/]*(?:[a-zA-Z0-9][ -/]*){6,18}$

Reference to be used for the Payment. It must contain between 6 and 18 letters (a-z, A-Z) or digits. Spaces and the characters ! " # $ % & ' ( ) * + , - . / are also allowed and are not counted. Any other character (for example _, @ or accented letters) is rejected with 400.

string

Currency of the source account (e.g. GBP). It is compared with beneficiaryAssetType to decide whether the payment is an FX payment. If it is omitted on an FX payment, it is inferred from the source account; we recommend always sending it.

string

list of emails separated by comma

string
enum

For FX payments, the side whose amount is given in amount. SENDER: amount is in the source account currency and Toqio quotes the amount the beneficiary receives. BENEFICIARY: amount is in beneficiaryAssetType and Toqio quotes the amount debited from the source account. Defaults to SENDER when omitted on an FX payment.

Allowed:
string
enum

REQUIRED when triggerType is RECURRING. CUSTOM: every transferConfig.timeInterval transferConfig.unit. DAILY: every day. WEEKLY: every week. EVERY_OTHER_WEEK: every two weeks. MONTHLY: every month. LAST_DAY_OF_MONTH: on the last day of each month.

Allowed:
meta
object

Key/value metadata stored with the payment. At most 10 keys, and each value up to 50 characters.

string

Free-text reason for the payment, passed to the bank provider where the provider supports it.

string

Free-text reference for the payment, for any payment type (not only FX payments). It is stored with the transaction, returned as reference in the transaction details, and passed to the payment provider where the provider supports it.

string
required

Toqio ID of the account to debit. The account must be in ACTIVATED status; otherwise the request is rejected with 417.

transferConfig
object

Scheduling of the payment. REQUIRED when triggerType is ONCE_FUTURE_DATE or RECURRING.

string
enum

When the payment is executed. IMMEDIATELY (the default when omitted): straight away. ONCE_FUTURE_DATE: once, on transferConfig.startDate, which is REQUIRED. RECURRING: repeatedly according to frequency, starting on transferConfig.startDate; both are REQUIRED.

Allowed:
double

Fee charged for the payment. Defaults to 0 when omitted. When fees are enabled for the client, a null value is rejected with 400 tx_fee_not_set.

string

ID of the user on whose behalf the payment is made.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

401

Unauthorized. The access token is missing, invalid or expired. The payment was not created; obtain a valid token and send the request again.

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