The Validation API allows clients to validate payment instructions based on country and currency-specific requirements. This ensures that the payment data complies with the necessary rules and formats for processing payments in different countries and currencies.

You can use this API to check you payment instructions for any errors before submitting the payment instructions for a trade. If there are no errors with the payment data, the API will return status as 'Complete'. If there are any errors with the payment data, then the response will contain the details of missing or invalid values.


Request Body

The request body will be the same as Instruct API as should include payment instruction details for a particular country and currency combination.

The structure will depend on the currency specific rules. Check the Currency Requirements API to confirm all the rules for any given currency/country combination.

Example Request

{
"fxId": 12345,
  
"clientReference": "TestPayment",
"creditor": {
    "name": "Raushan Singh",
    "address": {
      "buildingNo": "123",
      "buildingName": "DLF",
      "floor": "13",
      "street": "MG Road",
      "city": "New Delhi",
      "district": "New Delhi",
      "postalCode": "110096",
      "state": "New Delhi",
      "countryCode": "IN"
    },
 
    "countryOfResidence": "IN"
 
  },
    "creditorAccountNumber": "123456789012",
    "creditorAccountName": "Raushan Singh",
    "creditorCountryCode": "IN",
    "clientBuyCurrency": "INR",
  
    "creditorAgent": {
    "routingCode": "ICIC0000985"
  }
}

Response Body

If all validation rules for the given country and currency are met, the API will return status as 'Complete' and invalidRules object will be empty.


Success Example

{
    "status": "Complete",
    "invalidRules": []
}

If there are validation errors, the API returns an array of objects invalidRules , which contains the details of any missing or invalid payment data for that country/currency combinations. Each object in the array denoted one rule.

Failure Example 1

In this example, the request contains an account number which is too long.

{
    "status": "Incomplete",
    "invalidRules": [
        {
            "fieldLabelIdentifier": "BeneficiaryAccountNumber",
            "fieldName": "Account Number",
            "ruleName": "MAX LENGTH",
            "fieldValue": "122345678911111111111111113456789012",
            "errorMessage": "Beneficiary Account Number cannot be greater than 35 characters.",
            "validationStatus": "Invalid"
        }
    ]
}

Failure Example 2

In this example, the request contains a Bank Code which is not a valid Swift BIC.

{
    "status": "Incomplete",
    "invalidRules": [
        {
            "fieldLabelIdentifier": "IFSCCode",
            "fieldName": "Bank Code",
            "ruleName": "FORMAT BANKCODE",
            "fieldValue": "ABCD0000985",
            "errorMessage": "IFSC Code must have a valid bank code format",
            "validationStatus": "Invalid"
        }
    ]
}
Language
URL
Click Try It! to start a request and see the response here!