BACS API integration

Integrate with API for processing BACS payments.

BACS one-off payment request

A one-off payment request using the BACS Direct Debit option is similar to a standard /authorise payment request, except for the following differences:

  • A BACS DD payment request holds a bankAccount container.
  • A BACS DD payment request requires a selectedBrand field whose value needs to be directdebit_GB.
Name
Type
Required
Description
bankAccount class (tick)

A container for bank account data.

It takes the following children:

  • bankAccountNumber
  • bankLocationId
  • countryCode
  • ownerName

bankLocationId

String (tick) Sort code of the shopper.

bankAccountNumber

String (tick) The bank account number

countryCode

String (error)

The country is predefined.

ownerName

String (tick) The name of the bank account holder.

billingAddress

Class (tick)

A container for billing address data.

It takes the following children:

  • city
  • country
  • houseNumberOrName
  • postalCode
  • stateOrProvince

city

String (tick) City of the merchant.

country

String (tick) Country of the merchant. A valid value is an ISO 2-character country code.

houseNumberOrName

String (tick) House name or number of the merchant.

postalCode

Int (tick) Postal code with a maximum of 5 characters for USA and maximum of 10 characters for any other country.

stateOrProvince

String (tick)

For USA or Canada, a valid 2-character abbreviation for the state or province respectively. For other countries any abbreviation with maximum 3 characters for the state or province.

selectedBrand String (tick) For BACS DD payment requests,set the corresponding value to directdebit_GB.

Code examples

Request:

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soap:Body>
    <ns1:authorise xmlns:ns1="http://payment.services.adyen.com">
      <ns1:paymentRequest>
        <amount xmlns="http://payment.services.adyen.com">
          <currency xmlns="http://common.services.adyen.com">GBP</currency>
          <value xmlns="http://common.services.adyen.com">900</value>
        </amount>
        <bankAccount xmlns="http://payment.services.adyen.com">
          <bankAccountNumber>1234567890</bankAccountNumber>
          <bankLocationId>560036</bankLocationId>
          <countryCode>GB</countryCode>
          <ownerName>John Smith</ownerName>
        </bankAccount>
        <billingAddress xmlns="http://payment.services.adyen.com">
          <city xmlns="http://common.services.adyen.com">Westbury</city>
          <country xmlns="http://common.services.adyen.com">GB</country>
          <houseNumberOrName xmlns="http://common.services.adyen.com">530</houseNumberOrName>
          <postalCode xmlns="http://common.services.adyen.com">BA133BN</postalCode>
          <stateOrProvince xmlns="http://common.services.adyen.com"/>
          <street xmlns="http://common.services.adyen.com">High St</street>
        </billingAddress>
        <browserInfo xmlns="http://payment.services.adyen.com">
          <acceptHeader xmlns="http://common.services.adyen.com">text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</acceptHeader>
          <userAgent xmlns="http://common.services.adyen.com">Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:41.0) Gecko/20100101 Firefox/41.0</userAgent>
        </browserInfo>
        <deliveryDate xmlns="http://payment.services.adyen.com">2015-10-19T02:00:00+02:00</deliveryDate>
        <deviceFingerprint xmlns="http://payment.services.adyen.com">jgWB1GRa1U0120000000000000KZbIQj6kzs0055821336cVB94iKzBGd7RdyuDsuryVPGQAkDbi0858KHn8QITNo00000TIvjXxMpCOvMIC6J9kAKuSDDZ8PccV:40</deviceFingerprint>
        <merchantAccount xmlns="http://payment.services.adyen.com">TestMerchant</merchantAccount>
        <reference xmlns="http://payment.services.adyen.com">TMRef1234</reference>
        <referrer xmlns="http://payment.services.adyen.com">http://localhost:8080/hpp/demo/demoform.shtml</referrer>
        <selectedBrand xmlns="http://payment.services.adyen.com">directdebit_GB</selectedBrand>
        <sessionId xmlns="http://payment.services.adyen.com">ArIMV+XxHdinbLvwcx7TVuSxO84=</sessionId>
        <shopperEmail xmlns="http://payment.services.adyen.com">johnsmith@email.com</shopperEmail>
        <shopperIP xmlns="http://payment.services.adyen.com">127.0.0.1</shopperIP>
        <shopperLocale xmlns="http://payment.services.adyen.com">en_GB</shopperLocale>
        <shopperReference xmlns="http://payment.services.adyen.com">reference-001</shopperReference>
        <skinCode xmlns="http://payment.services.adyen.com">aF563qQs</skinCode>
      </ns1:paymentRequest>
    </ns1:authorise>
  </soap:Body>
</soap:Envelope>

Response:

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soap:Body>
    <ns1:authoriseResponse xmlns:ns1="http://payment.services.adyen.com">
      <ns1:paymentResult>
        <additionalData xmlns="http://payment.services.adyen.com">
          <entry>
            <key xsi:type="xsd:string">directdebit_GB_.mandateId</key>
            <value xsi:type="xsd:string">507509</value>
          </entry>
          <entry>
            <key xsi:type="xsd:string">directdebit_GB.sequenceType</key>
            <value xsi:type="xsd:string">OneOff</value>
          </entry>
          <entry>
            <key xsi:type="xsd:string">directdebit_GB.dateOfSignature</key>
            <value xsi:type="xsd:string">2015-10-13</value>
          </entry>
          <entry>
            <key xsi:type="xsd:string">directdebit_GB.serviceUserNumber</key>
            <value xsi:type="xsd:string">298288</value>
          </entry>
          <entry>
            <key xsi:type="xsd:string">directdebit_GB.serviceUserName</key>
            <value xsi:type="xsd:string">Adyen Payments</value>
          </entry>
        </additionalData>
        <authCode xmlns="http://payment.services.adyen.com" xsi:nil="true"/>
        <dccAmount xmlns="http://payment.services.adyen.com" xsi:nil="true"/>
        <dccSignature xmlns="http://payment.services.adyen.com" xsi:nil="true"/>
        <fraudResult xmlns="http://payment.services.adyen.com" xsi:nil="true"/>
        <issuerUrl xmlns="http://payment.services.adyen.com" xsi:nil="true"/>
        <md xmlns="http://payment.services.adyen.com" xsi:nil="true"/>
        <paRequest xmlns="http://payment.services.adyen.com" xsi:nil="true"/>
        <pspReference xmlns="http://payment.services.adyen.com">9914447507502292</pspReference>
        <refusalReason xmlns="http://payment.services.adyen.com" xsi:nil="true"/>
        <resultCode xmlns="http://payment.services.adyen.com">Received</resultCode>
      </ns1:paymentResult>
    </ns1:authoriseResponse>
  </soap:Body>
</soap:Envelope>