Rules

Vitesse supports sending payments globally. Each country and payment method has specific formatting and data requirements.

For example, when sending a payment to the UK, you can provide either:

  • A Sort Code (6 digits) and Account Number (8 digits), or
  • An IBAN and SWIFT code

To support these variations, Vitesse uses a configurable set of Rules.

Route Types

Each payment method is classified as a route type, which determines the applicable rules and required fields.

The following route types are available:

  • Bank Account (default)
  • Electronic check (USD, US only)
  • Postal cheque (USD, US only)
  • BankGiro (Sweden)
  • PlusGiro (Sweden)
  • PIX (Brazil)
📘

You must specify the route type in API calls and batch files. If omitted, the default is Bank Account.

Rules

Rules define the required data for a payment based on its route type and destination (country and currency).

View Rules in MAS

In MAS, go to Money OutRules to view all available rules.

You can filter by:

  • Country
  • Currency
  • Route type

Each rule defines:

  • Field name
  • Data type
  • Required length
  • Requirement level (mandatory, optional, or conditional)

Some rules are conditional and complex. For example, a UK bank transfer requires either:

  • Account Number + Sort Code, or
  • IBAN + SWIFT

Field types

Supported field types include:

  • Alpha – A-Z and a-z only
  • AlphaNumeric – Allows A-Z, a-z and 0-9 only
  • ExtendedAlphaNumeric – Allows numbers, letters and spaces
  • Numeric – Allows 0-9 only
  • Any – Allows all characters for use
  • DateTime – Valid date/time format
  • Email – Valid email address

Get Rules through the API

You can also retrieve rules using the Rules API, by specifying a country and currency.

This returns

  • Available route types
  • Required fields for each route
Example

Call GET /api/rules/CA/CAD

For a response similar to the following:

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

See Rules API for more information.


Related information

In order to define custom rules see the following