SEPA Direct Debit

Client-Side Implementation

Availability

SEPA Direct Debit is available to eligible merchants using a custom client-side integration. It is only available in Android v4.13+, iOS v5.11+, and JavaScript v3 SDK. It's not currently available in Drop-in.

If you meet the criteria, Contact us to enable SEPA Direct Debit in your Sandbox or Production account.

Set up your iOS ClientAnchorIcon

Get the SDKAnchorIcon

CocoapodsAnchorIcon

Include Braintree/SEPADirectDebit in your Podfile:
  1. Ruby
# Podfile
pod 'Braintree/SEPADirectDebit'

Swift Package ManagerAnchorIcon

Include the BraintreeSEPADirectDebit framework.

CarthageAnchorIcon

Include the BraintreeCoreand BraintreeSEPADirectDebit frameworks.

Collect informationAnchorIcon

Once your component is ready, collect the required bank account information from the customer. Bank information:
  • accountHolderName (the name of the account owner)
  • iban (International Bank Account Number)
Customer information:
  • billingAddress
  • customerID (customer id in the merchant's system)

Invoking the SEPA Direct Debit flowAnchorIcon

Construct a BTSEPADirectDebitClient and a BTSEPADirectDebitRequest. Call BTSEPADirectDebitClient.tokenize(_:completion:) to launch the SEPA Direct Debit flow. This method will create a mandate, display the mandate to the user, and tokenize the payment method.
  1. Swift
class ExampleViewController: UIViewController {
  var apiClient: BTAPIClient!
  var sepaDebitClient: BTSEPADirectDebitClient!

  override func viewDidLoad() {
    super.viewDidLoad()
    self.apiClient = BTAPIClient(authorization: "<#CLIENT_AUTHORIZATION#>")
    self.sepaDirectDebitClient = BTSEPADirectDebitClient(apiClient: apiClient)
  }

  func sepaDirectDebitButtonTapped() {
    let billingAddress = BTPostalAddress()
    billingAddress.recipientName = "John Doe"
    billingAddress.streetAddress = "123 Main St"
    billingAddress.countryCodeAlpha2 = "NL"
    billingAddress.locality = "Amsterdam"
    billingAddress.postalCode = "1072 AE"

    let sepaDirectDebitRequest = BTSEPADirectDebitRequest()
    sepaDirectDebitRequest.accountHolderName = "John Doe"
    sepaDirectDebitRequest.customerID = "1234"
    sepaDirectDebitRequest.iban = "FR7618106000321234566666608"
    sepaDirectDebitRequest.mandateType = .oneOff
    sepaDirectDebitRequest.address = billingAddress

    sepaDirectDebitClient.tokenize(sepaDirectDebitRequest) {
      sepaDirectDebitNonce, error in
      if let sepaDirectDebitNonce {
        // send sepaDirectDebitNonce.nonce to server
      } else if let error {
        // handle error
      } else {
        // handle cancel
      }
    }
  }
}

If you accept cookies, we’ll use them to improve and customize your experience and enable our partners to show you personalized PayPal ads when you visit other sites. Manage cookies and learn more