How you add Swish depends on your integration.
Choose the server-side flow that your integration uses:
Start integrating with Sessions flow Component
Choose your versionRequirements
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 { 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.
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.