Rules API
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/BankAccountThe 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.
| Property | Description |
|---|---|
Field | Identifies the system-defined field. This property is omitted for custom fields defined in the Extra object. Use FieldName and Path to identify those fields. |
FieldName | The human-readable field name. |
FieldType | The validation type applied to the field. |
MinimumLength | The minimum number of characters required. |
MaximumLength | The maximum number of characters permitted. |
Options | The requirement level: Mandatory, Optional, or Conditional. |
Path | Identifies where to place the field in the transaction request payload. |
ConditionCode | A code that identifies additional conditional validation. |
Conditions | Additional 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
Path valueThe 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.
| Code | Description |
|---|---|
X01 | Provide an amount between 10 and 45,000 RMB. |
X02 | Provide either an IBAN and SWIFT code, or a branch code and account number. |
X03 | Provide either an IBAN and SWIFT code, or a sort code and account number. |
X04 | Set BankAccountType to 0 (checking account / cuenta corriente) or 1 (savings / ahorro). |
X05 | Set BankAccountType to PC (personal checking) or PS (personal savings). |
X06 | Provide either a NUBAN or an account number. |
X07 | Provide either an IBAN or an account number. |
X08 | Provide BankAddress when the SWIFT code contains 8 characters. |
X09 | Not currently enforced. Provide the recipient name and address in Cyrillic when sending payments to Russia. |
X10 | Not currently enforced. If TaxId contains 10 characters, provide a 9-character KppCode. |
X11 | For 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. |
X12 | Provide either an IBAN, or a branch code and account number. |
X13 | Set 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. |
X14 | For 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. |
X15 | For Swedish BankGiro and PlusGiro payments, provide either a recipient reference or an OCR reference number, but not both. |
X16 | For 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. |
X17 | Provide one of TaxId, ResidenceNumber, or RegistrationNumber. |
X18 | For 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. |
X19 | Provide a branch code. If the branch code identifies a supported bank branch, you may omit the SWIFT code; otherwise, also provide a SWIFT code. |
X20 | For PIX payments in BRL, provide TaxId. Select only one PIX account type (PixPhoneNumber, EmailAddress, PixAccountNumber, or PixTaxId) and provide only the corresponding beneficiary field. |
X21 | Set BankAccountType to 0 (checking) or 1 (savings), and provide one beneficiary identifier (NationalId, ForeignId, or TaxId). |
X22 | Set BankAccountType to 0 (checking), 1 (savings), or 3 (vista account). |
X23 | Provide one beneficiary identifier: NationalId, ForeignId, or TaxId. |
X24 | Set BankAccountType to 0 (checking) or 1 (savings), and provide either NationalId or TaxId. |
X25 | Provide either NationalId or TaxId, but not both. |
X26 | For 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 code | Bank name | BankAccountType | Minimum length | Maximum length | Valid prefixes | Notes |
|---|---|---|---|---|---|---|
001 | Banco do Brasil S.A. | 0 | 8 | 9 | — | — |
001 | Banco do Brasil S.A. | 1 | 9 | 10 | 00, 01, 51, 02, 52, 91, 92, 96, 97 | — |
033 | Banco Santander Brasil S.A. | 0 | 9 | 9 | 01, 02, 03, 05, 09, 13, 92 | — |
033 | Banco Santander Brasil S.A. | 1 | 9 | 9 | 60 | — |
104 | Caixa Economica Federal (CEF) | 0 | 8 | 9 | — | Provide either 8–9 digits, or 11–12 digits with a valid prefix. |
104 | Caixa Economica Federal (CEF) | 0 | 11 | 12 | 001, 010, 003, 023 | Provide either 8–9 digits, or 11–12 digits with a valid prefix. |
104 | Caixa Economica Federal (CEF) | 1 | 8 | 9 | — | Provide either 8–9 digits, or 11–12 digits with a valid prefix. |
104 | Caixa Economica Federal (CEF) | 1 | 11 | 12 | 013, 022 | Provide either 8–9 digits, or 11–12 digits with a valid prefix. |
237 | Banco Bradesco S.A. | 0 | 7 | 8 | — | — |
237 | Banco Bradesco S.A. | 1 | 7 | 8 | — | — |
341 | Itau Unibanco S.A. | 0 | 6 | 6 | — | — |
341 | Itau Unibanco S.A. | 1 | 6 | 6 | — | — |
399 | HSBC Bank Brasil S.A. | 0 | 7 | 7 | — | — |
399 | HSBC Bank Brasil S.A. | 1 | 7 | 7 | — | — |
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.
Updated 26 days ago