Payment-method icon

SEPA Direct Debit Android Component

Add SEPA Direct Debit to an existing Components integration.

If you are using Android Components v5.0.0 or later:

This payment method requires no additional configuration.

Follow the Components integration guide and use the following module and Component names:

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.

Requirements

Requirement Description
Integration type Make sure that you have built an Advanced flow Android Components integration.
Setup steps Before you begin, contact our Support Team to add SEPA Direct Debit in your Customer Area.

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 are 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.

The /payments response contains:

  • resultCode: Received.
  • pspReference: 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 rece