Redirect URLs

When a user completes or cancels the Trustly UI workflow, the SDK will redirect to the return or cancelUrl , respectively. Several pieces of information will be provided to the redirect URL by query parameters. This information may be used to call the Trustly APIs or prompt the user to select another payment method.

Receiving the Redirect

Trustly returns the user to your cancelUrl or returnUrl with a GET request, appending a number of fields to the provided URL. You can then pass this data to your backend for further processing.

To prevent tampering of the redirect URL when handling the redirect make sure that:

Example Redirect Request

https://merchant.com/Trustly/return?transactionId=1002633191&transactionType=1&merchantReference=123123&status=2&payment.paymentType=2&payment.paymentProvider.type=1&payment.account.verified=false&panel=1&requestSignature=b7yr%2F3qOupPa1B7VeI32PhGQ7C8%3D

Parameters

ParameterDefinition
transactionIdA unique Trustly transaction identifier. (15 characters)
transactionTypeSee Transaction Types for a complete list of values and their definitions.
merchantReferenceA specific merchant reference for this cancellation. For example, this could be your order number or session id.
statusSee Transaction Status Values for a complete list of values and their definitions.
payment.paymentTypeSee Payment Types for a complete list of values and their definitions.
payment.paymentProvider.typeSee Payment Provider Types
payment.account.verified...
panelInteger value representing the Trustly screen the user exited the flow on. Refer to Panel Values for a complete list of values and their definitions.
payment.paymentProviderTransaction.statusInteger value representing the Payment Provider Transaction Status of the transaction. Refer to Payment Provider Transaction Status for a complete list of values and their definitions.
requestSignatureThis is a signature that you can calculate to ensure the request you receive is coming from Trustly. See Verifying the Redirect Request for more information.