On this page, you can find additional configuration for adding Trustly to your Components integration.
Before you begin
This page assumes you have already:
- For Web Components v6, import the Component that you need for Trustly:
import { AdyenCheckout, Trustly } from '@adyen/adyen-web'
API reference
You do not need to send additional fields for Trustly. To see optional fields that you can send for all payment methods, choose the endpoint you integrated:
- /sessions: This is the default with Components v5.0.0 or later.
- /payments: If you implemented an additional use case.
Component configuration
Step 1: Create a DOM element
Create a DOM element on your checkout page, placing it where you want the payment method form to be rendered:
<div id="trustly-container"></div>
Step 2: Create an instance of the Component
v6.0.0 or later
Create an instance of the Component, passing:
- Your instance of
AdyenCheckout
.
const trustly = new Trustly(checkout).mount('#trustly-container');
v5.x.x or earlier
Use the create
method of your AdyenCheckout
instance, in this case checkout
, to create the Component:
const trustlyComponent = checkout.create('trustly').mount('#trustly-container');
Chargebacks
It is possible that you do not receive the funds even after receiving a successful AUTHORISATION webhook. The successful AUTHORISATION webhook means that the payment has passed the verifications that the issuer and Trustly run on the shopper account, and that the bank transfer was initiated successfully. However, the payment can still fail for the following reasons:
- The shopper cancelled the transaction. Banks in some countries/regions (including Germany) allow shoppers to cancel bank transfers until midnight of the day of the transaction.
- Some banks process transactions with a delay and do not block the funds for an authorized Trustly payment. For example, if the shopper completes a Trustly payment on a Saturday, the bank might only process it on Monday. If the shopper has withdrawn sufficient funds in the meantime, the payment will fail.
In these cases, Adyen is not informed that the transaction failed. We also do not know whether the bank might still process it later.
On our side, the status of the payment is SentForSettle until we receive the funds. You can check the status of the payment in your Customer Area.
If we have not received the funds after 8 calendar days, the status of the payment becomes Settled, then Chargeback, and you receive a CHARGEBACK webhook.
You cannot defend Trustly chargebacks.
In case we receive the money after this point, you receive a CHARGEBACK_REVERSED webhook.
Test and go live
Trustly provides a simulated bank environment to complete your testing end to end. Follow the instructions provided in their documentation. You can check the status of Trustly test payments in your Customer Area > Transactions > Payments.
Before you can accept live Trustly payments, you need to submit a request for Trustly in your live Customer Area.