For AI agents: a documentation index is available at the root level at /llms.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Cancels an existing transaction that has not yet been processed. A cancellation should be issued as soon as you know the transaction will not be completed.
A Deferred or Instant payment transaction can only be canceled before the payment processing cut-off time. If the Cancel request returns an error, a Refund call should be executed instead.
Additionally, this endpoint can be used to cancel a Bank Authorization when a user revokes access to their bank from your application. If the bank authorization transaction is voided, further `/capture` or `/deposit` requests using the canceled transaction will not be permitted. Any outstanding transactions with a `pending` status related to the bank authorization will remain unchanged and must be canceled individually if necessary.
Authentication
AuthorizationBasic
Path parameters
transactionIdstringRequired
Authorization Transaction ID retrieved from a Trustly Deferred or Recurring transaction.
Request
merchantReferencestringOptional
A specific merchant reference for this cancellation. For example, this could be a merchant order number or the same merchant reference value used in the original establish call.
messagestringOptional
An optional message describing the reason for the cancellation. (maximum of 40 characters)
reasondoubleOptional
A specific reason code for this cancellation.
signaturestringOptional
A specific signature for this cancellation.
Response
OK
transactionIdstring>=1 character
A unique transaction identifier generated by Trustly (15 character max).
3-letter ISO Currency Code. Currently only USD is supported.
Allowed values:
amountstring>=1 character
The amount of the transaction. (10 characters with support for 2 decimal places)
pendingstring>=1 character
The total amount that is still pending completion. (10 characters with support for 2 decimal places)
paidstring>=1 character
The total amount that was already paid. (10 characters with support for 2 decimal places)
refundedstring>=1 character
The total amount that was refunded. (10 characters with support for 2 decimal places)
reversedstring>=1 character
The total amount that was reversed. (10 characters with support for 2 decimal places)
balancestring>=1 character
The balance of the amount paid, minus the amount reversed and/or refunded. (10 characters with support for 2 decimal places)
paymentProviderTransactionobject
Payment Provider Transaction
statusenum
Status code of the Payment Provider Transaction record. See Transaction Types
statusMessagestring>=1 character
A descriptive status message. (120 characters)
ipstring>=1 character
The client IP address in IPv4 or IPv6 format.
createdAtinteger
The date and time the transaction was created as a UNIX timestamp.
processedAtinteger
The date and time the transaction was processed as a UNIX timestamp.
completedAtinteger
The date and time the transaction was completed as a UNIX timestamp.
updatedAtinteger
The date and time the transaction was last updated as a UNIX timestamp.
merchantReferencestring>=1 character
Merchants internal reference id for the transaction.
recordVersiondouble
The current record version.
ppTrxIdstringOptional>=1 character
internal use only
expiredAtintegerOptional
The date and time the preauthorization will expire as a UNIX timestamp.
originalTransactionIdstringOptional
feestringOptional
timeZonestringOptional
representmentScheduledAtdoubleOptional
paymentProcessorTypestringOptional
statusCodestringOptional
preAuthorizedbooleanOptional
Cancels an existing transaction that has not yet been processed. A cancellation should be issued as soon as you know the transaction will not be completed.
A Deferred or Instant payment transaction can only be canceled before the payment processing cut-off time. If the Cancel request returns an error, a Refund call should be executed instead.
Additionally, this endpoint can be used to cancel a Bank Authorization when a user revokes access to their bank from your application. If the bank authorization transaction is voided, further /capture or /deposit requests using the canceled transaction will not be permitted. Any outstanding transactions with a pending status related to the bank authorization will remain unchanged and must be canceled individually if necessary.