Our SEPA Direct Debit Component renders SEPA Direct Debit in your payment form, where shoppers provide their account holder name and IBAN, and then review and confirm the payment.
Before you begin
This page explains how to add SEPA Direct Debit to your existing Web Components integration. The Web Components integration works the same way for all payment methods. If you haven't done this integration yet, refer to our Components integration guide.
Before starting your SEPA Direct Debit integration:
- Make sure that you have set up your back end implementation, and created an instance of
AdyenCheckout
. - Contact our Support Team, and ask them to add SEPA Direct Debit to your account.
Show SEPA Direct Debit in your payment form
To present the SEPA Direct Debit Component in your payment form:
-
From your server, make a POST /paymentMethods request specifying:
- countryCode: Country where SEPA Direct Debit is supported. For example, NL.
- amount.currency: EUR
-
Pass the full response from the /paymentMethods call as the
paymentMethodsResponse
object when creating an instance of theAdyenCheckout
. -
Add the SEPA Direct Debit Component:
a. Create a DOM element for SEPA, placing it where you want the form to be rendered:
<div id="sepa-container"></div>
b. Create an instance of the SEPA Component using its component name
sepadirectdebit
, and mount it.const sepaComponent = checkout.create("sepadirectdebit").mount("#sepa-container");
Make a payment
When the shopper selects to pay, the Component calls the onChange
event, which contains a state.data
.
-
If
state.isValid
is true, collect thestate.data
and pass this to your server. -
From your server, make a POST /payments request, specifying:
paymentMethod
: Thestate.data.paymentMethod
from theonChange
event from your front end.
Here is how you would make a payment request for 10 EUR.
curl https://checkout-test.adyen.com/v66/payments \ -H "x-API-key: YOUR_X-API-KEY" \ -H "content-type: application/json" \ -d '{ "merchantAccount":"YOUR_MERCHANT_ACCOUNT", "reference":"YOUR_ORDER_NUMBER", "amount":{ "currency":"EUR", "value":1000 }, "{hint:state.data.paymentMethod from onChange or onSubmit}paymentMethod{/hint}":{ "type":"sepadirectdebit", "sepa.ownerName":"A. Schneider", "sepa.ibanNumber":"DE87123456781234567890" } }'
# Set your X-API-KEY with the API key from the Customer Area. adyen = Adyen::Client.new adyen.api_key = "YOUR_X-API-KEY" response = adyen.checkout.payments({ :amount => { :currency => "EUR", :value => 1000 }, :reference => "YOUR_ORDER_NUMBER", :paymentMethod => { :type => "sepadirectdebit", :sepa.ownerName => "A. Schneider", :sepa.ibanNumber => "DE87123456781234567890" }, :merchantAccount => "YOUR_MERCHANT_ACCOUNT" })
// Set YOUR_X-API-KEY with the API key from the Customer Area. // Change to Environment.LIVE and add the Live URL prefix when you're ready to accept live payments. Client client = new Client("YOUR_X-API-KEY", Environment.TEST); Checkout checkout = new Checkout(client); PaymentsRequest paymentsRequest = new PaymentsRequest(); String merchantAccount = "YOUR_MERCHANT_ACCOUNT"; paymentsRequest.setMerchantAccount(merchantAccount); Amount amount = new Amount(); amount.setCurrency("EUR"); amount.setValue(1000L); paymentsRequest.setAmount(amount); DefaultPaymentMethodDetails paymentMethodDetails = new DefaultPaymentMethodDetails(); paymentMethodDetails.setSepaOwnerName("A. Schneider"); paymentMethodDetails.setSepaIbanNumber("DE87123456781234567890"); paymentMethodDetails.setType("sepadirectdebit"); paymentsRequest.setPaymentMethod(paymentMethodDetails); paymentsRequest.setReference("YOUR_ORDER_NUMBER"); PaymentsResponse paymentsResponse = checkout.payments(paymentsRequest);
// Set your X-API-KEY with the API key from the Customer Area. $client = new \Adyen\Client(); $client->setXApiKey("YOUR_X-API-KEY"); $service = new \Adyen\Service\Checkout($client); $params = array( "amount" => array( "currency" => "EUR", "value" => 1000 ), "reference" => "YOUR_ORDER_NUMBER", "paymentMethod" => array( "type" => "sepadirectdebit", "sepa.ownerName" => "A. Schneider", "sepa.ibanNumber" => "DE87123456781234567890" ), "merchantAccount" => "YOUR_MERCHANT_ACCOUNT" ); $result = $service->payments($params);
#Set your X-API-KEY with the API key from the Customer Area. adyen = Adyen.Adyen() adyen.client.xapikey = 'YOUR_X-API-KEY' result = adyen.checkout.payments({ 'amount': { 'value': 1000, 'currency': 'EUR' }, 'reference': 'YOUR_ORDER_NUMBER', 'paymentMethod': { 'type': 'sepadirectdebit', 'sepa.ownerName': 'A. Schneider', 'sepa.ibanNumber': 'DE87123456781234567890' }, 'merchantAccount': 'YOUR_MERCHANT_ACCOUNT' })
// Set your X-API-KEY with the API key from the Customer Area. var client = new Client ("YOUR_X-API-KEY", Environment.Test); var checkout = new Checkout(client); var amount = new Model.Checkout.Amount("EUR", 1000); var details = new Model.Checkout.DefaultPaymentMethodDetails{ Type = "sepadirectdebit", Sepa.OwnerName = "A. Schneider", Sepa.IbanNumber = "DE87123456781234567890" }; var paymentRequest = new Adyen.Model.Checkout.PaymentRequest { Reference = "YOUR_ORDER_NUMBER", Amount = amount, MerchantAccount = "YOUR_MERCHANT_ACCOUNT", PaymentMethod = details }; var paymentResponse = checkout.Payments(paymentsRequest);
// Set your X-API-KEY with the API key from the Customer Area. const {Client, Config, CheckoutAPI} = require('@adyen/api-library'); const config = new Config(); // Set your X-API-KEY with the API key from the Customer Area. config.apiKey = '[API_KEY]'; config.merchantAccount = '[YOUR_MERCHANT_ACCOUNT]'; const client = new Client({ config }); client.setEnvironment("TEST"); const checkout = new CheckoutAPI(client); checkout.payments({ amount: { currency: "EUR", value: 1000 }, paymentMethod: { type: 'sepadirectdebit', sepa.ownerName: 'A. Schneider', sepa.ibanNumber: 'DE87123456781234567890' }, reference: "YOUR_ORDER_NUMBER", merchantAccount: config.merchantAccount }).then(res => res);
The /payments response contains:
resultCode
: ReceivedpspReference
: Adyen's unique reference number for the payment.
Present the payment result
Use the resultCode that you received in the /payments response to present the payment result to your shopper.
The resultCode
values you can receive for SEPA Direct Debit are:
resultCode | Description | Action to take |
---|---|---|
Received | The payment was successfully received. | You will receive a AUTHORISATION notification when the status of the payment has been updated. If successful, you will receive the funds in 2 days. |
Authorised | The payment was successfully completed. | Inform the shopper that the payment was successful. |
Recurring payments
If you have a recurring or subscription business model we recommend tokenizing the shopper's payment details. When you create a shopper token from a SEPA payment, we store their payment details with the token. The token can be used to make recurring payments for the shopper.
You can create a shopper token and then make subsequent recurring payments with the token using the /payments endpoint.
Create shopper token
Tokenize the shopper's payment details when you make the initial SEPA payment.
-
When you call /payments to make a payment, additionally include:
-
shopperReference
: Your unique ID for this shopper. -
storePaymentMethod
: true
-
- When you receive the response (or the notification) that the payment was authorised, note the
recurringDetailReference
or thestoredPaymentMethodId
. This is the token you will need to make recurring payments for this shopper.
Make recurring payment
For each recurring payment for this shopper, make a SEPA payment with a /payments call, and additionally include:
-
recurringDetailReference
orstoredPaymentMethodId
for API v49 and above. This is therecurringDetailReference
returned in the response when you created the token. This holds the token you received back in the initial payment. -
shopperReference
: The shopper ID you provided when created the shopper token. -
shopperInteraction
: ContAuth.
{
"amount":{
"value":1000,
"currency":"EUR"
},
"paymentMethod":{
"type":"sepadirectdebit",
"storedPaymentMethodId":"7219687191761347"
},
"reference":"Your Reference Here",
"merchantAccount":"TestMerchant",
"shopperReference":"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
"shopperInteraction":"ContAuth"
}
If the payment was successfully received the response will contain a Received resultCode
and a pspReference
, which is our unique identifier for this transaction. You can track whether the payment was successful using notifications.
Chargebacks
If a shopper for some reason wants the funds from a payment returned, they can ask their bank for a refund. This is referred to as a chargeback.
For SEPA, the chargeback process gives significant consumer rights to the shopper. They have:
- Eight weeks to dispute a SEPA payment without providing a reason.
- Thirteen months to dispute an unauthorised or incorrect SEPA payment when they provide evidence to their bank.
A SEPA chargeback notification can indicate that:
- The shopper disputed the charge.
- There were insufficient funds in the shopper's bank account.
A chargeback notification contains:
-
pspReference
: Adyen's unique reference associated with the payment request. -
eventCode
: CHARGEBACK. -
reason
: Reason for the chargeback. -
success
: true.
Here is an example of a notification that indicates a SEPA chargeback because there were insufficient funds in the shopper's bank account.
{
"live":"false",
"notificationItems":[
{
"NotificationRequestItem":{
"amount":{
"value":1000,
"currency":"EUR"
},
"pspReference":"931354792477061C",
"eventCode":"CHARGEBACK",
"eventDate":"2020-01-01T01:02:01.111+02:00",
"merchantAccountCode":"YourMerchantAccount",
"merchantReference":"YourMerchantReference",
"paymentMethod":"sepadirectdebit",
"reason":"Insufficient funds",
"success":true
}
}
]
}
For more information on the chargeback process, refer to Dispute management.
Test and go live
Before making live SEPA payments, use the following Account Names and IBANs to test your integration.
Account Name | IBAN | Country |
---|---|---|
A. Klaassen | NL13TEST0123456789 | NL |
B. Klaassen | NL36TEST0236169114 | NL |
C. Klaassen | NL26TEST0336169116 | NL |
D. Klaassen | NL16TEST0436169118 | NL |
E. Klaassen | NL81TEST0536169128 | NL |
F. Klaassen | NL27TEST0636169146 | NL |
G. Klaassen | NL39TEST0736169237 | NL |
H. Klaassen | NL82TEST0836169255 | NL |
I. Klaassen | NL72TEST0936169257 | NL |
J. Klaassen | NL46TEST0136169112 | NL |
K. Klaassen | NL70TEST0736160337 | NL |
L. Klaassen | NL18TEST0736162437 | NL |
M. Klaassen | NL92TEST0736163433 | NL |
A. Schneider | DE87123456781234567890 | DE |
B. Schneider | DE92123456789876543210 | DE |
C. Schneider | DE14123456780023456789 | DE |
D. Schneider | DE36444488881234567890 | DE |
E. Schneider | DE41444488889876543210 | DE |
F. Schneider | DE60444488880023456789 | DE |
G. Schneider | DE89888888881234567890 | DE |
H. Schneider | DE94888888889876543210 | DE |
I. Schneider | DE16888888880023456789 | DE |
A. Pacini | IT60X0542811101000000123456 | IT |
A. Grand | FR1420041010050500013M02606 | FR |
A. Martin | ES9121000418450200051332 | ES |
W. Hurth | AT151234512345678901 | AT |
H. Gasser | CH4912345123456789012 | CH |
R. Paulsen | DK8612341234567890 | DK |
B. Dalby | NO6012341234561 | NO |
A. Bak | PL20123123411234567890123456 | PL |
A. Andersson | SE9412312345678901234561 | SE |
You can check the status of SEPA test payments in your Customer Area > Transactions > Payments.
Before you can accept live SEPA Direct Debit payments, you need to submit a request for SEPA Direct Debit in your live Customer Area.