Payment Initiation
curl --request POST \ --url https://api.ztlpay.io/api/fx/payments \ --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 quote request
We request that when a fx payment is initiated and due date is today or tomorrow (if initiated after 16:00) that you give user a warning if balance is less than value of the payment before calling confirm. Reason for this warning is to remind those who are lacking funds that they do not have funds and to avoid the payment being delayed or in worst case cancelled.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
Metadata for quote request
object
Country
Example
NOThe organization number of the company initiating the payment
Example
920970931An ID that can be used to identify the payment
Example
73300aef-d849-4872-b0c6-f44e07a841f3Information about the debtor
object
Basic Bank Account Number
Example
12341212345Bank Identification Code
Example
DNBANOKKDebtor contact information
object
The name of the organization making the payment
Example
ZTL Payment Solution ASThe address of the organization making the payment
object
Street name
Example
Kristian IVs gateBuilding number
Example
15City or town name
Example
OsloPost code
Example
0164Country
Example
NOThe base(funding) currency for the payment
Example
NOKThe country that the payment is being initiated from
Example
NOInformation about the creditor
object
Account information for creditor. Required fields depend on creditorCountry, but bban or iban should always be present.
object
International Bank Account Number
Example
SE7250000000012341212345Basic Bank Account Number
Example
12341212345Bank Identification Code
Example
ESSESESSCode required for payments to certain countries
Example
1234Creditor contact information
object
The name of the organization making the payment
Example
ZTL Payment Solution ASThe address of the organization making the payment
object
Street name
Example
EriksbergsgatanBuilding number
Example
10City or town name
Example
SwedenPost code
Example
11430Country
Example
SEThe payout currency for the payment (only used for SELL deal type)
Example
SEKThe amount and currency for the quote
object
The amount to get a quote for
Example
1000.50The currency the amount is specified in
Example
SEKThe due date for the payment. NOTE: there are limitations on due date in the further
Example
2023-01-15Remittance information
object
Message for receiver
Example
Payment for consulting servicesobject
Type of additional information. Must be compliant with receiving country rules
ReasonText to describe the reason for paymentPurposeA valid PurposeCode of the paymentTaxCodeReceiver Tax code
Example
ReasonValue of the property
A code stating the purpose of the payment. (Required by some countries). Deprecated - use Information.RemittanceInformation.AdditionalInformation (type - Purpose) instead
Example
S1008Responses
Section titled “Responses”Successfully acquired foreign exchange quote
object
The quote ID to use for booking
An ID that can be used to identify the payment
The amount and currency that will be paid out
object
The amount to get a quote for
The currency the amount is specified in
The amount and currency of the resulting cost (funding) for the quote
object
The amount it will cost to buy the requested / quoted amount
The currency the amount is specified in
The exchange rate per single unit
The reference code to add to the payment’s unstructured remittance info
The account to deposit funding amount to when initiating payment
object
Account information for funding client account
object
International Bank Account Number
Basic Bank Account Number
Bank Identification Code
Creditor contact information
object
The name of the organization making the payment
The address of the organization making the payment
object
Street name
Building number
City or town name
Post code
Country
Example
{ "quoteId": "d6f06bfe-4830-4358-b483-c24c66cfb431", "endToEndId": "7c628b2e-9094-4bf8-af23-1d517c6fc4f5", "requestedAmount": { "amount": "1000.50", "currency": "SEK" }, "costAmount": { "amount": 1034.62, "currency": "NOK" }, "exchangeRate": 1.0346, "quoteExpiryTime": "2023-01-15T09:32:00+01:00", "referenceCode": "ZTL-d6f06bfe", "intermediaryAccount": { "account": { "iban": "SE7250000000012341212345", "bban": 12341212345, "bic": "CITIXXXX" }, "contactInformation": { "name": "ZTL Payment Solution AS", "address": { "streetName": "Eriksbergsgatan", "buildingNumber": 10, "city": "Sweden", "postCode": 11430, "country": "SE" } } }}Bad request
object
The parsing error type
The underlying reason for the error
Path to the related input param with parsing error
Example
{ "code": "InvalidJsonRequest", "reason": "Malformed request body", "path": ".from.bban"}Forbidden
Example
Company is not onboardedValidation failed
object
The validation error code.
Possible values:
InvalidCreationTime: Payment initiation is not supported during weekends/bank holidaysInvalidDueDate: Available due date range is dependent on initiation timeInvalidFromAccount: Sender’s and recipient’s account numbers cannot have the same valueInvalidFromCountry: Provided sender’s country does not match provided sender’s BICInvalidToAddress: One of the recipient’s address fields are invalid (specified in the reason field)InvalidToAccount: IBAN and BBAN values cannot be equalInvalidBbanOrIban: Either IBAN or BBAN must be provided for the recipient accountInvalidIban: IBAN is either missing or invalidIbanBicMismatch: The IBAN does not match the provided BICInvalidBIC: BIC is either missing or invalidInvalidBeneficiaryCountry: Recipient’s country is not supportedInvalidAmount: Requested amount exceeds the limit amount of the currency for the chosen due dateInvalidQuoteCurrencyScale: Invalid scale for requested currencyInvalidCurrency: Given currency is not accepted by the recipient’s countryCurrencyPairMismatch: Funding currency and requested currency cannot be the sameInvalidRecipientInfo: Recipient country specific payment requirements are not met (check /api/country/{country}/paymentrequirement for specifics)InvalidRemittanceInformation: (Additional) remittance information is missing or invalid
The underlying reason for the error
Path to the related input param with validation error
Example
[ { "code": "InvalidCreationTime", "reason": "InvalidToAccount", "path": ".from.bban" }]