Validate a transaction
Validate a transaction request without creating a transaction.
Validation performs the same checks as transaction creation and returns any validation errors that would prevent the transaction from being processed.
POST /api/transactionrequests/validate
For full request and response details, see Validate transaction request.
When to validate a transaction request
We recommend validation for all integrations.
You may want to validate a transaction request when you need to:
- Verify that all required fields are present
- Confirm that the request satisfies country and payment rules
- Check that the selected route is valid
- Preview the calculated FX route and value date
Validate a transaction request
Submit the transaction request to the validation endpoint.
The request body is identical to the request used when creating a transaction.
Example request
POST https://staging-api.vitessepsp.com/api/transactionrequests/validateRequest body:
{
"SendValue": 100.00,
"SendCurrency": "EUR",
"Recipient": {
"Name": "Victoria Lau",
"RecipientReference": "Claim-51837",
"Country": "GB",
"Currency": "GBP",
"Account": {
"SortCode": "112233",
"AccountNumber": "22233445"
}
}
}Example response (truncated)
{
"Status": "Pending",
"SendCurrency": "EUR",
"SendValue": 100.00,
"Merchant": "Blue Plain Insurance",
"Recipient": {
"Country": "GB",
"Currency": "GBP",
"Name": "Victoria Lau",
"RecipientReference": "Claim-51837"
},
"Route": {
"DestinationCurrency": {
"Currency": "GBP",
"Value": 85.18
},
"ExchangeRate": 0.8518381869,
"SourceCurrency": {
"Currency": "EUR",
"Value": 100.00
}
}
}Validation errors
If validation fails, the API returns an error response describing the fields that failed validation.
Example response
{
"Code": "ArgumentInvalid",
"Message": "One or more arguments passed to the API call have an invalid value.",
"ModelState": {
"request.Recipient.RecipientReference": {
"Errors": [
{
"ErrorMessage": "This field is required."
}
]
}
}
}Understanding validation errors
The response includes:
Code– error codeMessage– summary of the validation failureModelState– collection of validation errors
Each entry in ModelState identifies the field that failed validation and includes one or more error messages.
Next steps
After validating a transaction request, you can:
- Make a transaction
- Retrieve the applicable rules
- Troubleshoot validation errors
Updated about 1 month ago