Cancel a scheduled recurring payment
Please note - Trustly Direct Debit (TDD) is no longer offered to new merchants
Please see Merchant Direct Debit (MDD) instead.
Overview
For Charge requests that have a future PaymentDate, it’s possible to cancel the Charge up until 18.00 on the day before the PaymentDate.
A Charge request that doesn’t have any PaymentDate specified cannot be canceled. It’s also not possible to cancel a Charge request if the PaymentDate is equal to the date when Charge request was sent.
Request example
{
"method": "CancelCharge",
"params": {
"UUID": "a556f303-1d31-d902-5a7c-fab771b6c709",
"Data": {
"Username": "merchant_username",
"Password": "merchant_password",
"OrderID": "2513519555"
},
"Signature": "mLCDMsrhM5SgVVBrQI\[...\]\]pYycrXBSYpiBQ=="
},
"version": "1.1"
}
Request parameters
Parameter name | Description | Req. | Type | Example |
---|---|---|---|---|
Username | The username. | Yes | Text | merchant_username |
Password | The password. | Yes | Text | merchant_password |
OrderID | The OrderID of the Charge request that should be canceled. | Yes | Text | 9594811343 |
Response example
{
"version": "1.1",
"result": {
"data": {
"result": "1",
"rejected": null
},
"method": "CancelCharge",
"signature": "hlrqrPIf\[...\]771b6c709"
}
}
{
"result": {
"method": "CancelCharge",
"data": {
"result": "0",
"rejected": "Payment already executed"
},
"signature": "XU+T8rk6Pm\[...\]5-7641-1169bd\]4388ca"
},
"version": "1.1"
}
Response attributes
The returned result is an object with the following attributes.
Hash key | Description | Type | Example |
---|---|---|---|
result | 1 if the Charge could be canceled, and 0 otherwise. | Boolean | 1 |
rejected | If the CancelCharge was NOT accepted and result 0 is sent, a textual code describing the rejection reason will be sent here. For a successful CancelCharge, this will be null. | Text | Payment already executed |