For non-US payments please use the Trustly Europe connector.
Sign-up
A Trustly account can be requested by contacting their sales team via the Trustly website.Credentials
When setting up Trustly in the dashboard, you will need to configure the following credentials, which can all be obtained from Trustly after your account has been created.- Access ID - The identifier that acts as a username when connecting to the Trustly API.
- Access Key - The key that acts as a password when connecting to the Trustly API.
- Merchant ID - The ID that is used to target the specific merchant account to process payments for.
Limitations
- Most API calls in Trustly are asynchronous and therefore captures and refunds will be in a pending state until we receive a notification. It’s important to set up webhooks from our environment to yours in order to be notified of these status changes.
- Partial refunds are supported. However, another refund cannot be initiated while there is an outstanding in-progress refund.
Webview integrations
For applications that use a multi-platform architecture, in which a web-based checkout experience is embedded in a mobile app via a Webview, attention must be paid to ensure Trustly is integrated successfully. In addition to the Trustly guide on this topic we have added support to pass theurlScheme
required for this integration. When passing this value, we will forward this to Trustly, as well
as the integrationContext
, allowing for your integration to listen to webhooks.
In short, the flow would be as follows.
- When creating a Trustly transaction, pass the
urlScheme = "YOUR_APP://SOME_RESOURCE"
property to our API. - In your application, load the
approval_url
provided from our API into your applications webview. - We pass your
urlScheme
as well as the rightintegrationContext
to theestablishData
as defined in the Trustly guide. - Your application listens to all the various callbacks from Trustly as defined in the Trustly guide.
- When the transaction completes, your app invokes
window.Trustly.proceedToChooseAccount();
on the webview as defined in the guide. - Our hosted page gets notified by the Trustly lightbox and completes the payment
Recurring payments
This connector supports recurring payments via the API and via Embed. If you are using Embed, we will handle most of the complexity for you, but for direct API integrations it’s important to ensure the right recurring payment flags are sent on the initial and subsequent payments.Initial payments
For an initial recurring payment, please make sure to use a suitablepayment_source
(either recurring
or card_on_file
)
and the merchant_initiated
and is_subsequent_payment
flags are set to false
. This will ensure a customer-present flow is
triggered and a payment method is created that keeps track of Trustly’s “split token”.
Recurring payments
For a subsequent recurring payment, please make sure to use the samepayment_source
(either recurring
or card_on_file
)
and the merchant_initiated
and is_subsequent_payment
flags are set to true
. This will ensure a customer-not-present flow is
triggered with the stored split token.
Renewing an expired split token
In some situations, a recurring payment may fail because the Trustly “split token” has expired.refreshSplitToken
on a new customer-present transaction. It is important in this request to
set a redirect_url
to redirect the user back to your site after they have approved the transaction.