Getting Started

Welcome to the Trustly SDK! You can use our SDK, in conjunction with our API, to integrate Online Banking into your application.

We have language bindings for JavaScript, iOS, and Android. If you require any assistance, please contact your Trustly Integration Team or email us at [email protected].

Endpoints

Trustly provides a sandbox and a production environment. To switch between the different environments, use the different endpoint URLs. The authentication credentials for both environments are the same. When you are ready to go live, change your endpoint to the production URL.

  • Production: https://trustly.one/start
  • Sandbox: https://sandbox.trustly.one/start

📘

Deprecated

The following endpoints have been deprecated, but are supported until further notice:

  • Production: https://paywithmybank.com/start
  • Sandbox: https://sandbox.paywithmybank.com/start

Initialize the SDK

Use this code to initialize the SDK:

<script src="{endpoint}/scripts/trustly.js?accessId={accessId}"></script>

Make sure to replace accessId with the Access ID provided by Trustly and endpoint with the URL for the environment you are using.

Initialize the SDK by loading it onto your page, providing your accessId.

Configuration Options

Example Configuration Options

<script>
var TrustlyOptions = {
  hideCloseButton: true,
  dragAndDrop: true,
  widgetContainerId: "widget-id" //Page element container for the widget
};
</script>

You can specify the following Trustly Configuration Options in your request:

ParameterDescription
hideBackIf specified and true, the Trustly Lightbox will hide the button ('<') that allows the User to go back from the Lightbox at any time. If false, the '<' button will be present. The default value is false.
hideCloseButtonIf specified and true, the Trustly Lightbox will hide the close button ('x') that allows the User to close the Lightbox at any time. If false, the 'x' button will be present. The default value is false.
hideSelectBankBackIf specified and true, the Trustly Lightbox will hide the button ('<') that allows the User to go back from the Lightbox only on the Select Bank UI. If false, the '<' button will be present. The default value is false.
dragAndDropIf specified and true, the user can drag the Trustly Lightbox. The default value is true.
widgetContainerIdFor the selectBankWidget function, this will determine which page element is used to display the Trustly Widget. If the value is not set or is null, the Widget will be displayed inside the body element. The default value is null.

Did this page help you?