No momento, esta página não está disponível em português
Payment-method icon

Web Component

Add Swish to your Components integration.

How you add Swish depends on your integration.

Choose the server-side flow that your integration uses:

Sessions flow
Advanced flow

Start integrating with Sessions flow Component

Choose your version
6.5.1

Requirements

Requirement Description
Integration type Make sure that you have an existing Sessions flow Web Components integration.
Checkout API Make sure that you use Checkout API v68 or later.
Setup steps Before you begin, add Swish in your Customer Area.

Add additional parameters to your /sessions request

You do not need to add any parameters when you create a payment session.

Import Swish

When you import Adyen Web, include Swish.

Import
Expand view
Copy link to code block
Copy code
Copy code
import { AdyenCheckout, Swish } from '@adyen/adyen-web';

Add additional configuration for Swish

You do not need to add any configuration parameters for Swish.

Initialize the Component for Swish

To initialize Swish, use the Swish class.

Initialize the Component
Expand view
Copy link to code block
Copy code
Copy code
const swishComponent = newSwish(checkout,
{
// The configuration object for Swish that you created.
// Mount the Component to a container.
} ).mount('#swish-container')

Test and go live

When you make a Swish payment in the test environment, the payment is authorised within 15 seconds. You can simulate different refusal scenarios, as outlined in the Merchant Swish Simulator, by adding the error code to the shopperStatement property. For example, "shopperStatement": "FF08".

Check the status of Swish test payments in your Customer Area > Transactions > Payments.

To accept live Swish payments, you must submit a request for Swish in your live Customer Area.