Process Payment Validation
This section describes the Pre-Validation API provided by ImPAI. It performs the same syntactic and semantic checks that ImPAI applies internally when a payment is manually submitted. This API allows client systems to validate an ISO 20022 pain.001 message before initiating a SIC IP transaction.
The validation service exposes a single endpoint:
Pre-Validation Request β verifies a full pain.001 Customer Credit Transfer Initiation message.
1οΈβ£ Pre-Validation Requestβ
The Pre-Validation API accepts a complete paymentRequest structure containing an ISO 20022 pain.001 Document.
All mandatory groups, such as identifiers and Document, must be provided.
Request Structure
The request must contain:
βΆΒ Β identifiers
Business-level references linking the payment instruction to external systems:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
externalId | String | Yes | External reference for the payment, typically provided by the initiating system. Used for matching responses and client-side tracking. | 1β36 chars |
β·Β Β Document
The Document contains the actual payment instruction CstmrCdtTrfInitn in ISO 20022 pain.001 format, including:
- Group Header (
GrpHdr): message ID, creation time, transaction count, initiating party. - Payment Information (
PmtInf): debtor, payment type, execution date, amount, creditor details, etc.
Multiple transactions per request are supported.
Example Request:
{
"paymentRequest": {
"identifiers": {
"externalId": "EXTID_4987451120"
},
"Document": {
"CstmrCdtTrfInitn": {
"GrpHdr": {
...
},
"PmtInf": [
{
...
}
]
}
}
}
}
Response Structure
π’ Success β HTTP 200
HTTP 200 β OK responses for successfully processed messages include:
| Group | Description |
|---|---|
header | A group containing responseId, originalRequestId, responseTime |
success | An object containing the actual success status |
Example(s)
{
"header": {
"responseId": "0a00f05f-c688-44db-b49a-af9aeed1a7ef",
"originalRequestId": "ReqId-419578",
"responseTime": "2025-05-30T10:45:31.002Z"
},
"success": {
"status": "Success",
}
}
π΄ Error β HTTP 400
Responses for HTTP 400 β Bad Request errors are returned if validation or logical checks fail and include:
| Group | Description |
|---|---|
header | Response metadata including responseId, originalRequestId, and responseTime. |
error | Contains the primary error message returned by the system (message). |
errors | Array of detailed validation issues, each specifying the affected field (fieldMap), the error code (reasonCode), and a human-readable description (reasonText). |
Example(s)
{
"header": {
"responseId": "0a00f05f-c688-44db-b49a-af9aeed1a7ef",
"originalRequestId": "ReqId-419578",
"responseTime": "2025-05-30T10:45:31.002Z"
},
"error": {
"message": "Validation failed"
},
"errors": [
{
"fieldMap": "CstmrCdtTrfInitn.PmtInf.CdtTrfTxInf.Amt.InstdAmt",
"reasonCode": "INVALID_FORMAT",
"reasonText": "Amount format is invalid"
}
]
}
Summary β Handling Validationβ
The Pre-Validation API allows external systems to verify a SIC Instant Payment before submitting it.
It ensures that:
- the pain.001 message is syntactically correct,
- all mandatory ISO 20022 elements are present and valid,
- ImPAI-specific rules (amounts, identifiers, structure) are respected,
- and the transaction can be safely processed by the Create API.
Use this endpoint to perform all safety checks before invoking the following operations:
- Create Swiss Payment Instruction (pain.001 β pacs.008)
This helps prevent lifecycle failures and significantly improves integration reliability.