Trustly supports different cross platform frameworks for building native applications.
React Native
If you have built your app using React Native we provide a package that exposes a WebView to be used for rendering Trustly Checkout. A more in-depth description and the purpose of the package can be found here:
https://www.npmjs.com/package/trustly-react-native-webview
Xamarin Forms
If you have built your app using Xamarin Forms you can use this example implementation as a reference on how to integrate into your app:
https://github.com/trustly/cross-platform-example-apps/tree/main/TrustlyXamarinExample
Custom URL scheme
Please note that when rendering the Trustly Checkout from a native app you are required to pass your application's urlscheme via the attribute ReturnToAppURL
when creating an order initiation request. By doing so, Trustly can redirect users back to your app after using external identification apps such as Mobile BankID.
It's a straightforward process; you can follow any Tutorial on iOS/iPhone Custom urlschemes. The urlscheme can be registered using the following method:
- Include it in the
ReturnToAppURL
attribute when making an API call to Trustly. - It's important that the
ReturnToAppURL
attribute is only sent if the order is triggered by users from within the app. For any other transaction instances (ex. desktop or interaction via mobile browser directly) theReturnToAppURL
attribute must not be included.
Attribute name | Description | Type | Example |
---|---|---|---|
ReturnToAppURL | The url used to redirect users back to your app | Text | yourCustomAppURL:// |
Example:
{
...
"params": {
...
"Data": {
...
"Attributes": {
...
"ReturnToAppURL": "myapp://"
...