About this endpoint
What it does
Validates a bank code provided in the request body and returns whether it is valid, along with the detected code type and either bank details or an error object. The endpoint accepts SWIFT/BIC, IBAN, or IFSC input.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| value | String | Yes | SWIFT/BIC (8 or 11 characters), IBAN or IFSC code. Spaces are ignored. |
| country | String | No | Optional ISO 3166-1 alpha-2 code of the payout destination, case-insensitive. When omitted, the country is taken from the code itself. |
Response
Returns a JSON object with a data field. On success, data is an object containing valid, input, identifier, country_code, bank_details, and source fields; on failure, data is an object containing valid, input, identifier, and error fields.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| data | Object | Yes | Success response wrapper. Contains valid, input, identifier, country_code, bank_details, and source when the code is valid. On invalid responses, contains valid, input, identifier, and error. |
Notes
data is a polymorphic object: when valid is true, read country_code, bank_details, and source; when valid is false, read error.code, error.reason, and error.message. The bank_details object is nullable, and any of its fields may be null when that lookup data is unavailable.


