Cancel payroll
curl --request POST \ --url https://api.ztlpay.io/api/v2/payroll/cancel \ --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 '{ "payrollId": "7c628b2e-9094-4bf8-af23-1d517c6fc4f5", "callbackUrl": "https://www.google.com" }'Cancels a payroll. May require approval.
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
Payroll id to be cancelled
Example
7c628b2e-9094-4bf8-af23-1d517c6fc4f5Callback url for redirect authentication
Example
https://www.google.comResponses
Section titled “Responses”Payroll cancellation created, check status
object
An ID that can be used to identify the cancellation attempt
object
Redirect link to redirect authorization flow.
Url to start authorization redirect flow
Status of the cancellation, note that this is not the same as payroll status. * ACCEPTED the cancellation has been successfully
REJECTEDthe cancellation was rejectedAUTHORIZATION_REQUIREDthe cancellation requires approval/signing
Latest status of the payroll after the cancellation request has been accounted for
Additional information
Example
{ "sca": { "type": "redirect", "url": "https://api.ztlpay.io/api/v2/consents/sca/redirect/start/6212d401-1785-4739-8843-55fe4eb9dad4" }, "cancellationRequestStatus": "ACCEPTED", "currentPayrollStatus": "Unsigned", "reason": null}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 bank
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