Are you looking for test card numbers?

Would you like to contact support?

Payment-method icon

SEPA Direct Debit Android Component

Add SEPA Direct Debit to an existing Components integration.

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 Android Components integration. The Android 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:

  1. Make sure that you have set up your back end implementation for making API requests.
  2. Contact our Support Team, and ask them to add SEPA Direct Debit to your account.

Show SEPA Direct Debit in your payment form

To show SEPA Direct Debit Component in your payment form, you need to:

  1. Specify in your /paymentMethods request:
  2. Deserialize the response from the /paymentMethods call and get the object with type: sepadirectdebit.
  3. Add the SEPA Direct Debit Component:

    a. Import the SEPA Direct Debit Component to your build.gradle file.

    implementation "com.adyen.checkout:sepa:<latest-version>"

    Check the latest version on GitHub.

    b. Create an sepaConfiguration object:

    val sepaConfiguration =
    SepaConfiguration.Builder(context, "YOUR_CLIENT_KEY")
        // When you're ready to accept live payments, change the value to one of our live environments.
        .setEnvironment(Environment.TEST)
        .build()

    c. Initialize the SEPA Direct Debit Component. Pass the payment method object and the sepaConfiguration object.

    val sepaComponent = SepaComponent.PROVIDER.get(this@YourActivity, paymentMethod, sepaConfiguration)

    d. Add the SEPA Direct Debit Component view to your layout.

    <com.adyen.checkout.sepa.SepaView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"/>

    e. Attach the Component to the view to start getting your shopper's payment details.

    sepaView.attach(sepaComponent, this@YourActivity)

    f. When shoppers enter their payment details, you start receiving updates. If isValid is true and the shopper proceeds to pay, pass the paymentComponentState.data.paymentMethod to your server and make a payment request.

    sepaComponent.observe(this) { paymentComponentState ->
      if (paymentComponentState?.isValid == true) {
         // When the shopper proceeds to pay, pass the `paymentComponentState.data` to your server to send a /payments request
         sendPayment(paymentComponentState.data)
      }
    }

Make a payment

When the shopper proceeds to pay, the Component returns the paymentComponentState.data.paymentMethod.

  1. Pass the paymentComponentState.data.paymentMethod to your server.
  2. From your server, make a /payments request, specifying:
    • paymentMethod.type: The paymentComponentState.data.paymentMethod from your client app.
curl https://checkout-test.adyen.com/v68/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:data.paymentMethod from 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);

            SepaDirectDebitDetails paymentMethodDetails = new SepaDirectDebitDetails();
            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 SepaDirectDebitDetails{
  Type = "sepadirectdebit",
  OwnerName = "A. Schneider",
  Iban = "DE87123456781234567890",
};
var paymentRequest = new Adyen.Model.Checkout.PaymentRequest
{
  Reference = "YOUR_ORDER_NUMBER",
  Amount = amount,
  MerchantAccount = "YOUR_MERCHANT_ACCOUNT",
  PaymentMethod = details
};

var paymentResponse = checkout.Payments(paymentRequest);
// 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: Received.
  • pspReference: Adyen's unique reference number for the payment.
/payments response
{
    "pspReference": "881572960484022G",
    "resultCode": "Received",
    "merchantReference": "YOUR_ORDER_NUMBER"
}

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

We strongly recommend that you request explicit permission from the shopper if you intend to make recurring SEPA payments. Being transparent about the payment schedule and the charged amount reduces the risk of chargebacks.

To create a token, include in your /payments request:

When the payment is settled, you receive a RECURRING_CONTRACT webhook containing:

  • eventCode: RECURRING_CONTRACT
  • originalReference: The pspReference of the initial payment.
  • pspReference: This is the token that you need to make recurring payments for this shopper.
    Make sure that your server is able to receive RECURRING_CONTRACT as part of your standard notifications. You can enable the RECURRING_CONTRACT event code in the webhook settings page.

Make recurring payment

For each recurring payment for this shopper, make a SEPA payment with a /payments call, and additionally include:

For more information about the shopperInteraction and recurringProcessingModel fields, refer to Recurring transaction types.

curl https://checkout-test.adyen.com/v68/payments \
-H "x-API-key: YOUR_X-API-KEY" \
-H "content-type: application/json" \
-d '{
       "amount":{
          "value":1000,
          "currency":"EUR"
       },
       "paymentMethod":{
          "type":"sepadirectdebit",
          "storedPaymentMethodId":"7219687191761347"
       },
       "reference":"YOUR_ORDER_NUMBER",
       "merchantAccount":"YOUR_MERCHANT_ACCOUNT",
       "shopperReference":"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
       "shopperInteraction":"ContAuth",
       "recurringProcessingModel": "Subscription"
}'
# 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",
    :storedPaymentMethodId => "7219687191761347"
  },
  :returnUrl => "https://your-company.com/checkout?shopperOrder=12xy..",
  :shopperReference => "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
  :merchantAccount => "YOUR_MERCHANT_ACCOUNT",
  :shopperInteraction => "ContAuth",
  :recurringProcessingModel => "Subscription"
})
// 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(15000L);
paymentsRequest.setAmount(amount);

SepaDirectDebitDetails paymentMethodDetails = new SepaDirectDebitDetails();
paymentMethodDetails.setStoredPaymentMethodId("7219687191761347");
paymentMethodDetails.setType("sepadirectdebit");
paymentsRequest.setPaymentMethod(paymentMethodDetails);

paymentsRequest.setReference("YOUR_ORDER_NUMBER");
paymentsRequest.setReturnUrl("https://your-company.com/checkout?shopperOrder=12xy..");
paymentsRequest.setShopperInteraction(PaymentsRequest.ShopperInteractionEnum.CONTAUTH);
paymentsRequest.setRecurringProcessingModel(PaymentsRequest.RecurringProcessingModelEnum.SUBSCRIPTION);

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",
    "storedPaymentMethodId" => "7219687191761347"
  ),
  "returnUrl" => "https://your-company.com/checkout?shopperOrder=12xy..",
  "shopperReference" => "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
  "recurringProcessingModel" => "Subscription",
  "shopperInteraction" => "ContAuth",
  "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',
      'storedPaymentMethodId': '7219687191761347'
   },
   'returnUrl': 'https://your-company.com/checkout?shopperOrder=12xy..',
   'shopperReference': 'YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j'
   'merchantAccount': 'YOUR_MERCHANT_ACCOUNT',
   'shopperInteraction':'ContAuth',
   'recurringProcessingModel': 'Subscription'
})
// 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",
  storedPaymentMethodId = "7219687191761347"
};
var paymentsRequest = new Model.Checkout.PaymentRequest
{
  Reference = "YOUR_ORDER_NUMBER",
  Amount = amount,
  ReturnUrl = @"https://your-company.com/checkout?shopperOrder=12xy..",
  MerchantAccount = "YOUR_MERCHANT_ACCOUNT",
  ShopperReference = "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
  RecurringProcessingModel = "Subscription",
  ShopperInteraction = "ContAuth",
  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',
        storedPaymentMethodId: "7219687191761347"
    },
    reference: "YOUR_ORDER_NUMBER",
    merchantAccount: config.merchantAccount,
    shopperReference: "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
    returnUrl: "https://your-company.com/checkout?shopperOrder=12xy..",
    shopperInteraction: "ContAuth",
    recurringProcessingModel: "Subscription"
}).then(res => res);

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.
You cannot defend against SEPA chargebacks. These will always result in the shopper receiving a refund.

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":{
            "additionalData":{
               "chargebackReasonCode":"AM04",
               "modificationMerchantReferences":"",
               "chargebackSchemeCode":"sepadirectdebit",
               "defensePeriodEndsAt":"2021-05-06T22:09:50+02:00",
               "defendable":"false",
               "disputeStatus":"Lost"
            },
            "amount":{
               "currency":"EUR",
               "value":1000
            },
            "eventCode":"CHARGEBACK",
            "eventDate":"2021-05-06T22:09:50+02:00",
            "merchantAccountCode":"YOUR_MERCHANT_ACCOUNT",
            "merchantReference":"YOUR_REFERENCE",
            "originalReference":"9913333333333333",
            "paymentMethod":"sepadirectdebit",
            "pspReference":"9915555555555555",
            "reason":"AM04:InsufficientFunds",
            "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 NameIBANCountry
A. KlaassenNL13TEST0123456789NL
B. KlaassenNL36TEST0236169114NL
C. KlaassenNL26TEST0336169116NL
D. KlaassenNL16TEST0436169118NL
E. KlaassenNL81TEST0536169128NL
F. KlaassenNL27TEST0636169146NL
G. KlaassenNL39TEST0736169237NL
H. KlaassenNL82TEST0836169255NL
I. KlaassenNL72TEST0936169257NL
J. KlaassenNL46TEST0136169112NL
K. KlaassenNL70TEST0736160337NL
L. KlaassenNL18TEST0736162437NL
M. KlaassenNL92TEST0736163433NL
A. SchneiderDE87123456781234567890DE
B. SchneiderDE92123456789876543210DE
C. SchneiderDE14123456780023456789DE
D. SchneiderDE36444488881234567890DE
E. SchneiderDE41444488889876543210DE
F. SchneiderDE60444488880023456789DE
G. SchneiderDE89888888881234567890DE
H. SchneiderDE94888888889876543210DE
I. SchneiderDE16888888880023456789DE
A. PaciniIT60X0542811101000000123456IT
A. GrandFR1420041010050500013M02606FR
A. MartinES9121000418450200051332ES
W. HurthAT151234512345678901AT
H. GasserCH4912345123456789012CH
R. PaulsenDK8612341234567890DK
B. DalbyNO6012341234561NO
A. BakPL20123123411234567890123456PL
A. AnderssonSE9412312345678901234561SE

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.

See also