Payment approval
curl --request POST \ --url https://api.ztlpay.io/api/v2/payments/approve \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'PSU-IP-Address: 192.158.1.38' \ --header 'PSU-User-Agent: Mozilla/5.0 (Windows NT 10.0; …) Gecko/20100101 Firefox/63.0' \ --header 'consent-id: 3a797348-ef0c-4f52-b821-fdfcdb98c4d9' \ --data '{ "payments": [ "175be5fc-4185-4cf1-af70-df34ead1a9ec", "4b24e1e8-f2ba-4d84-86a4-f5d5e4ae9af7" ], "callbackUrl": "https://www.google.com", "preferredScaMethod": "Redirect" }'Start approval/signing process of a list of unsigned or partlySigned transactions. Can be both domestic and cross-border transactions.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Example
3a797348-ef0c-4f52-b821-fdfcdb98c4d9A valid consentId
Example
192.158.1.38AAA IP Address of the end-user initiating the payment. DO NOT use any other IP address than what you can collect from the current user session that uses your system (don’t use something stored in your DB). This information is used by the banks to manage traffic and handle security.
The forwarded Agent header field of the HTTP request between PSU and TPP.
Example
Mozilla/5.0 (Windows NT 10.0; …) Gecko/20100101 Firefox/63.0Request Body
Section titled “Request Body”object
Example
[ "175be5fc-4185-4cf1-af70-df34ead1a9ec", "4b24e1e8-f2ba-4d84-86a4-f5d5e4ae9af7"]Sca callback url for redirect authentication
Example
https://www.google.comThe preferred way to perform authorization. There is no guarantee that bank supports the preferred method.
Responses
Section titled “Responses”Approval initiated successfully
object
An ID that can be used to identify the approval and check for statuses
There is no guarantee that the used sca approach used by bank matches the preferred sca approach from request.
redirectFor redirect, the end user must use the redirect url to start the authentication processqrThe QR image has to be presented to the end user, who has to scan the image with bank authentication app. The qr image needs to be refreshed every second, see approval status for refreshed QR image. Only used in Sweden
object
object
Redirect link to redirect authorization flow. After the redirect, the url will contain the query parameter status, with the possible values [success, rejected, cancelled]
Url to start authorization redirect flow
object
Qr image, used with bank app to scan image for authentication
Qr code which can be used to generate Qr image. Can be used to customize image. Might not be available for all banks.
Qr code as image, base64 encoded
DynamicDynamic image, valid for 1 sec. Must be refreshed by fetching updated approval status.StaticStatic image, valid for a longer period dependent on bank. Usually 30 seconds.
Example
{ "id": "7c628b2e-9094-4bf8-af23-1d517c6fc4f5", "status": "STARTED", "sca": { "type": "redirect", "url": "https://api.ztlpay.io/api/v2/consents/sca/redirect/start/6212d401-1785-4739-8843-55fe4eb9dad4" }}Bad Request
object
INVALID_CONSENTConsent is invalidAUTHENTICATION_TEMPORARY_UNAVAILABLEAuthentication service is temporary unavailable, most likely due to user already has started another concurrent authentication processUNSUPPORTED_PRODUCT_BY_BANKProduct is not supported by bankACCESS_DENIEDUser does not have sufficient permissions
Unique RequestId, please provide this Id in case of support requests
The underlying reason for the error
Example
{ "failure": "INVALID_CONSENT", "ztlRequestId": "3a797348-ef0c-4f52-b821-fdfcdb98c4d9", "message": "Invalid Bban"}Forbidden
object
Unique RequestId, please provide this Id in case of support requests
The underlying reason for the error
Example
{ "ztlRequestId": "3a797348-ef0c-4f52-b821-fdfcdb98c4d9", "message": "Invalid account"}Headers
Section titled “Headers”Unique RequestId, please provide this Id in case of support requests
Example
3a797348-ef0c-4f52-b821-fdfcdb98c4d9Not found
object
Unique RequestId, please provide this Id in case of support requests
The underlying reason for the error
Example
{ "ztlRequestId": "3a797348-ef0c-4f52-b821-fdfcdb98c4d9", "message": "Invalid account"}Headers
Section titled “Headers”Unique RequestId, please provide this Id in case of support requests
Example
3a797348-ef0c-4f52-b821-fdfcdb98c4d9Conflict
object
Unique RequestId, please provide this Id in case of support requests
The underlying reason for the error
Example
{ "ztlRequestId": "3a797348-ef0c-4f52-b821-fdfcdb98c4d9", "message": "Invalid account"}Headers
Section titled “Headers”Unique RequestId, please provide this Id in case of support requests
Example
3a797348-ef0c-4f52-b821-fdfcdb98c4d9Internal server error
object
Unique RequestId, please provide this Id in case of support requests
The underlying reason for the error
Example
{ "ztlRequestId": "3a797348-ef0c-4f52-b821-fdfcdb98c4d9", "message": "Invalid account"}Headers
Section titled “Headers”Unique RequestId, please provide this Id in case of support requests
Example
3a797348-ef0c-4f52-b821-fdfcdb98c4d9Service unavailable
object
Unique RequestId, please provide this Id in case of support requests
The underlying reason for the error
Example
{ "ztlRequestId": "3a797348-ef0c-4f52-b821-fdfcdb98c4d9", "message": "Invalid account"}Headers
Section titled “Headers”Unique RequestId, please provide this Id in case of support requests
Example
3a797348-ef0c-4f52-b821-fdfcdb98c4d9