Order is initiated by making an API call where all the details of the order are passed as a JSON payload.
The Trustly backend will respond with the checkout URL.
Please refer to our documentation on how the JSON-RPC works and how an order is initiated.
The JSON payload must contain a ReturnToAppURL
parameter in the order initiation API call for orders originating from a native application.
This parameter value should be a deep link (Universal/Application link or URL scheme) to your native application and should be unique. We use this value to automatically redirect back to your native application if a third party application or website needs to be launched during the order flow.
For transactions being initiated on other platforms such as on desktop/standalone browsers (that is, not originating from your native app) the ReturnToAppURL
attribute should not be included in the API call.
In the next step you will use the checkout URL to present the Trustly checkout in your native applications.
{
...
"params": {
...
"Data": {
...
"Attributes": {
...
"ReturnToAppURL": "myapp://"
...