Use the Rules API to retrieve the validation rules that apply to a payment destination, currency, and route type.

The response identifies the fields required for a transaction request, where to place them in the request payload, and how Vitesse validates them.

For a general introduction to rules and route types, see Rules.

Retrieve rules for a route

Retrieve the validation rules for a specific destination country, currency, and route type.

GET /api/rules/{country}/{currency}/{routeType}

Example request

GET /api/rules/CA/CAD/BankAccount

The API returns an array of rule fields.

📘

If the route type is not available for the specified country and currency combination, the API returns 404 Not Found.

Example response (truncated)

[
  {
    "Field": "SwiftCode",
    "FieldName": "Swift Code",
    "FieldType": "AlphaNumeric",
    "MaximumLength": 11,
    "MinimumLength": 8,
    "Options": "Optional",
    "Path": "request.Recipient.Account.Swift",
    "Conditions": []
  },
  {
    "Field": "AccountNumber",
    "FieldName": "Account Number",
    "FieldType": "Numeric",
    "MaximumLength": 12,
    "MinimumLength": 5,
    "Options": "Mandatory",
    "Path": "request.Recipient.Account.AccountNumber",
    "Conditions": []
  }
]

Read a rule field

Each item in the response describes one field in the transaction request.

PropertyDescription
FieldIdentifies the system-defined field. This property is omitted for custom fields defined in the Extra object. Use FieldName and Path to identify those fields.
FieldNameThe human-readable field name.
FieldTypeThe validation type applied to the field.
MinimumLengthThe minimum number of characters required.
MaximumLengthThe maximum number of characters permitted.
OptionsThe requirement level: Mandatory, Optional, or Conditional.
PathIdentifies where to place the field in the transaction request payload.
ConditionCodeA code that identifies additional conditional validation.
ConditionsAdditional validation conditions, such as Allowlist, Denylist, or BlendLookup. For more information, see Additional validations.
📘

When multiple rules apply to the same field, Vitesse applies the most restrictive validation.

Use the Path value

The Path value tells you where to place the field in the transaction request.

For example, this path:

request.Recipient.Account.PaymentPurpose

means that PaymentPurpose belongs in the Recipient.Account object:

{
  "Recipient": {
    "Account": {
      "PaymentPurpose": "Insurance claim settlement"
    }
  }
}

Do not include the request prefix in the JSON payload. It represents the HTTP request body.

Conditional rules

Some fields have an Options value of Conditional. This means you provide the field only when a specific validation condition applies.

Where a rule includes a ConditionCode, use the condition code description to determine the additional validation that applies.

Condition codes

Some validation requirements cannot be expressed using field length, data type, or requirement level alone. In these cases, the Rules API returns a ConditionCode.

The condition code identifies the additional validation that applies to the field or payment route.

CodeDescription
X01Provide an amount between 10 and 45,000 RMB.
X02Provide either an IBAN and SWIFT code, or a branch code and account number.
X03Provide either an IBAN and SWIFT code, or a sort code and account number.
X04Set BankAccountType to 0 (checking account / cuenta corriente) or 1 (savings / ahorro).
X05Set BankAccountType to PC (personal checking) or PS (personal savings).
X06Provide either a NUBAN or an account number.
X07Provide either an IBAN or an account number.
X08Provide BankAddress when the SWIFT code contains 8 characters.
X09Not currently enforced. Provide the recipient name and address in Cyrillic when sending payments to Russia.
X10Not currently enforced. If TaxId contains 10 characters, provide a 9-character KppCode.
X11For non-domestic routes where the destination currency is not the domestic currency, provide either an IBAN or an account number. Some additional fields are mandatory. Provide the recipient address unless the payment is in EUR to Bulgaria, Croatia, Czechia, Denmark, Hungary, Poland, Romania, Sweden, Iceland, Liechtenstein, Norway, Switzerland, or the UK.
X12Provide either an IBAN, or a branch code and account number.
X13Set BankAccountType to 0 (checking) or 1 (savings). Additional Brazil account number validation rules apply for certain banks. For more information, see X13 Brazil account number validations​.
X14For USD payments to the United States, provide either an ACH-capable ABA code, or both an ABA code and SWIFT code. If you provide BankAccountType, set it to Checking or Savings.
X15For Swedish BankGiro and PlusGiro payments, provide either a recipient reference or an OCR reference number, but not both.
X16For Norwegian bank account payments, provide either a recipient reference or a KID reference number, but not both. Also provide either an IBAN or an account number and branch code.
X17Provide one of TaxId, ResidenceNumber, or RegistrationNumber.
X18For Korean bank account payments, provide either a residence number (individual) or a business registration number (corporate). This rule is replaced by X26 for KRW payments to South Korea.
X19Provide a branch code. If the branch code identifies a supported bank branch, you may omit the SWIFT code; otherwise, also provide a SWIFT code.
X20For PIX payments in BRL, provide TaxId. Select only one PIX account type (PixPhoneNumber, EmailAddress, PixAccountNumber, or PixTaxId) and provide only the corresponding beneficiary field.
X21Set BankAccountType to 0 (checking) or 1 (savings), and provide one beneficiary identifier (NationalId, ForeignId, or TaxId).
X22Set BankAccountType to 0 (checking), 1 (savings), or 3 (vista account).
X23Provide one beneficiary identifier: NationalId, ForeignId, or TaxId.
X24Set BankAccountType to 0 (checking) or 1 (savings), and provide either NationalId or TaxId.
X25Provide either NationalId or TaxId, but not both.
X26For Korean bank account payments, provide either a residence number (individual) or a business registration number (corporate), but not both. Also provide the beneficiary's phone number, including the country code, without a leading +, 00, or 0. The phone number must be capable of receiving SMS verification.

X13 Brazil account number validations

Branch agency codeBank nameBankAccountTypeMinimum lengthMaximum lengthValid prefixesNotes
001Banco do Brasil S.A.089
001Banco do Brasil S.A.191000, 01, 51, 02, 52, 91, 92, 96, 97
033Banco Santander Brasil S.A.09901, 02, 03, 05, 09, 13, 92
033Banco Santander Brasil S.A.19960
104Caixa Economica Federal (CEF)089Provide either 8–9 digits, or 11–12 digits with a valid prefix.
104Caixa Economica Federal (CEF)01112001, 010, 003, 023Provide either 8–9 digits, or 11–12 digits with a valid prefix.
104Caixa Economica Federal (CEF)189Provide either 8–9 digits, or 11–12 digits with a valid prefix.
104Caixa Economica Federal (CEF)11112013, 022Provide either 8–9 digits, or 11–12 digits with a valid prefix.
237Banco Bradesco S.A.078
237Banco Bradesco S.A.178
341Itau Unibanco S.A.066
341Itau Unibanco S.A.166
399HSBC Bank Brasil S.A.077
399HSBC Bank Brasil S.A.177

Additional validations

Vitesse can configure additional validations for an account to apply more restrictive validation rules to transactions. For example, ExternalReference1 can contain a mandatory 10-digit code, or we can restrict a field to a predefined set of permitted values.

For more information, see Additional validations.


Did this page help you?