Skip to content

Validation

POST
/api/fx/payments/validate
Code sample: Shell / cURL
curl --request POST \
--url https://api.ztlpay.io/api/fx/payments/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "metadata": { "organizationCountryCode": "NO", "organizationNumber": 920970931, "endToEndId": "73300aef-d849-4872-b0c6-f44e07a841f3" }, "from": { "bban": 12341212345, "bic": "DNBANOKK", "contactInformation": { "name": "ZTL Payment Solution AS", "address": { "streetName": "Kristian IVs gate", "buildingNumber": 15, "city": "Oslo", "postCode": "0164", "country": "NO" } }, "currency": "NOK", "country": "NO" }, "to": { "account": { "iban": "SE7250000000012341212345", "bban": 12341212345, "bic": "ESSESESS", "clearingCode": 1234 }, "contactInformation": { "name": "ZTL Payment Solution AS", "address": { "streetName": "Eriksbergsgatan", "buildingNumber": 10, "city": "Sweden", "postCode": 11430, "country": "SE" } }, "currency": "SEK" }, "amount": { "amount": "1000.50", "currency": "SEK" }, "dueDate": "2023-01-15", "remittanceInformation": { "unstructured": "Payment for consulting services", "additionalInformation": [ { "type": "TaxCode", "value": "example" } ] }, "purposeCode": "S1008" }'

International payment validation request. It is strongly recommended to use country-specific requirements endpoint before forming a validation/initiation request to provide a good user experience.

Media typeapplication/json
object
metadata
required

Metadata for quote request

object
organizationCountryCode
required

Country

string format: ISO 3166-1
Example
NO
organizationNumber
required

The organization number of the company initiating the payment

string
Example
920970931
endToEndId
required

An ID that can be used to identify the payment

string
Example
73300aef-d849-4872-b0c6-f44e07a841f3
from
required

Information about the debtor

object
bban
required

Basic Bank Account Number

string
Example
12341212345
bic
required

Bank Identification Code

string
Example
DNBANOKK
contactInformation
required

Debtor contact information

object
name
required

The name of the organization making the payment

string
Example
ZTL Payment Solution AS
address
required

The address of the organization making the payment

object
streetName
required

Street name

string
Example
Kristian IVs gate
buildingNumber
required

Building number

string
Example
15
city
required

City or town name

string
Example
Oslo
postCode
required

Post code

string
Example
0164
country
required

Country

string format: ISO 3166-1
Example
NO
currency
required

The base(funding) currency for the payment

string
Example
NOK
country
required

The country that the payment is being initiated from

string format: ISO 3166-1
Example
NO
to
required

Information about the creditor

object
account
required

Account information for creditor. Required fields depend on creditorCountry, but bban or iban should always be present.

object
iban

International Bank Account Number

string
Example
SE7250000000012341212345
bban

Basic Bank Account Number

string
Example
12341212345
bic
required

Bank Identification Code

string
Example
ESSESESS
clearingCode

Code required for payments to certain countries

string
Example
1234
contactInformation
required

Creditor contact information

object
name
required

The name of the organization making the payment

string
Example
ZTL Payment Solution AS
address
required

The address of the organization making the payment

object
streetName
required

Street name

string
Example
Eriksbergsgatan
buildingNumber
required

Building number

string
Example
10
city
required

City or town name

string
Example
Sweden
postCode
required

Post code

string
Example
11430
country
required

Country

string format: ISO 3166-1
Example
SE
currency

The payout currency for the payment (only used for SELL deal type)

string
Example
SEK
amount
required

The amount and currency for the quote

object
amount
required

The amount to get a quote for

string
Example
1000.50
currency
required

The currency the amount is specified in

string
Example
SEK
dueDate
required

The due date for the payment. NOTE: there are limitations on due date in the further

string format: date, ISO-8601
Example
2023-01-15
remittanceInformation
required

Remittance information

object
unstructured
required

Message for receiver

string
Example
Payment for consulting services
additionalInformation
Array<object>
object
type
required

Type of additional information. Must be compliant with receiving country rules

  • Reason Text to describe the reason for payment
  • Purpose A valid PurposeCode of the payment
  • TaxCode Receiver Tax code
string
Allowed values: TaxCode Reason Purpose
Example
Reason
value
required

Value of the property

string
purposeCode

A code stating the purpose of the payment. (Required by some countries). Deprecated - use Information.RemittanceInformation.AdditionalInformation (type - Purpose) instead

string
Example
S1008

Successfully validated request

Bad request

Media typeapplication/json
object
code

The parsing error type

string
reason

The underlying reason for the error

string
path

Path to the related input param with parsing error

string
Example
{
"code": "InvalidJsonRequest",
"reason": "Malformed request body",
"path": ".from.bban"
}

Forbidden

Media typetext/plain
string
Example
Company is not onboarded

Validation failed

Media typeapplication/json
Array<object>
object
code

The validation error code.

Possible values:

  • InvalidCreationTime: Payment initiation is not supported during weekends/bank holidays
  • InvalidDueDate: Available due date range is dependent on initiation time
  • InvalidFromAccount: Sender’s and recipient’s account numbers cannot have the same value
  • InvalidFromCountry: Provided sender’s country does not match provided sender’s BIC
  • InvalidToAddress: One of the recipient’s address fields are invalid (specified in the reason field)
  • InvalidToAccount: IBAN and BBAN values cannot be equal
  • InvalidBbanOrIban: Either IBAN or BBAN must be provided for the recipient account
  • InvalidIban: IBAN is either missing or invalid
  • IbanBicMismatch: The IBAN does not match the provided BIC
  • InvalidBIC: BIC is either missing or invalid
  • InvalidBeneficiaryCountry: Recipient’s country is not supported
  • InvalidAmount: Requested amount exceeds the limit amount of the currency for the chosen due date
  • InvalidQuoteCurrencyScale: Invalid scale for requested currency
  • InvalidCurrency: Given currency is not accepted by the recipient’s country
  • CurrencyPairMismatch: Funding currency and requested currency cannot be the same
  • InvalidRecipientInfo: Recipient country specific payment requirements are not met (check /api/country/{country}/paymentrequirement for specifics)
  • InvalidRemittanceInformation: (Additional) remittance information is missing or invalid
string
Allowed values: InvalidCreationTime InvalidDueDate InvalidFromAccount InvalidFromCountry InvalidToAddress InvalidToAccount InvalidBbanOrIban InvalidIban IbanBicMismatch InvalidBIC InvalidBeneficiaryCountry InvalidAmount InvalidQuoteCurrencyScale InvalidCurrency CurrencyPairMismatch InvalidRecipientInfo InvalidRemittanceInformation
reason

The underlying reason for the error

string
path

Path to the related input param with validation error

string
Example
[
{
"code": "InvalidCreationTime",
"reason": "InvalidToAccount",
"path": ".from.bban"
}
]