BACS - Recurring payments

BACS direct debit is mainly used for recurring transactions. Adyen automatically recognizes the sequence type and submits that to the scheme.

Merchants can just submit their recurring payments to Adyen by calling the recurring contract API and the recurring payments API for subsequent payments.

Creating a recurring contract

Request:

<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>David Archer</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>
        <recurring xmlns="http://payment.services.adyen.com">
          <contract>RECURRING</contract>
          </recurring>
        <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">chronis@adyen.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:

<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">514636</value>
          </entry>
          <entry>
            <key xsi:type="xsd:string">directdebit_GB.sequenceType</key>
            <value xsi:type="xsd:string">First</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">9914447514633064</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>

Submitting subsequent recurring payments

Creating a request for subsequent recurring payments is same as explained in the Recurring API section.

<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">514636</value>
          </entry>
          <entry>
            <key xsi:type="xsd:string">directdebit_GB.sequenceType</key>
            <value xsi:type="xsd:string">Recurring</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">9914447514633064</pspReference>
        <refusalReason xmlns="http://payment.services.adyen.com" xsi:nil="true"/>
        <resultCode xmlns="http://payment.services.adyen.com">Authorised</resultCode>
      </ns1:paymentResult>
    </ns1:authoriseResponse>
  </soap:Body>
</soap:Envelope>