Bank accounts: US, IBAN, BACS, BECS

Collect and tokenize U.S., IBAN/SEPA, UK (Bacs), and Australian (Becs) bank-account details with Recurly.js, then exchange the token for a secure ACH/SEPA/Bacs/Becs payment.

Recurly.js lets you gather bank-account information directly on your checkout page—no hosted iframes required—and swap it for a temporary Recurly token. The workflow is identical across regions: build a simple HTML form, call recurly.bankAccount.token, receive the token, and submit it to any v3 endpoint that accepts billing_info. The sections below show the exact inputs and token calls for:

  • U.S. ACH
  • IBAN / SEPA
  • UK Bacs
  • Australia Becs

Key details

US bank accounts

Tokenize your users' bank account information

Just as with a card form, use the data-recurly attribute to identify fields to Recurly.js. Since Recurly.js does not need to inject fields for bank accounts, all fields may be displayed as inputs on your payment form.

<form>
  <input type="text" data-recurly="routing_number">
  <input type="text" data-recurly="account_number">
  <input type="text" data-recurly="account_number_confirmation">
  <input type="text" data-recurly="account_type">
  <input type="text" data-recurly="name_on_account">
  <input type="hidden" name="recurly-token" data-recurly="token">
  <button>submit</button>
</form>

US bank account inputs

Field NameExampleDescription
routing_number123456789Routing number. Required
account_number987654321Account number. Required
account_number_confirmation987654321Account number confirmation. Required
account_typechecking or savingsAccount type. Required
name_on_accountPat SmithFull name on account. Required

Getting a token

fn recurly.bankAccount.token

You may call recurly.bankAccount.token with a form element:

recurly.bankAccount.token(document.querySelector('form'), tokenHandler);

Or with an Object:

const billingInfo = {
  // required attributes
  routing_number: '123456780',
  account_number: '111111111',
  account_number_confirmation: '111111111',
  account_type: 'checking',
  name_on_account: 'Pat Smith',

  // optional attributes
  address1: '123 Main St.',
  address2: 'Unit 1',
  city: 'Hope',
  state: 'WA',
  postal_code: '98552',
  country: 'US',
  vat_number: 'SE0000'
};

recurly.bankAccount.token(billingInfo, tokenHandler);

Both methods require using a handler function like this one:

function tokenHandler (err, token) {
  if (err) {
    // handle error using err.code and err.fields
  } else {
    // handle success using token.id
  }
}

This sends bank account billing information to Recurly to store as a token, returning that token id back to you via callback.


International bank accounts (IBAN)

Tokenize your users' International Bank Account (IBAN) information in
order to process SEPA transactions.

Similar to configuring a card form, use the data-recurly attribute to
identify IBAN specific inputs. Since Recurly.js does not need to inject fields for bank accounts, all fields may be displayed as inputs on your payment form.

<form>
  <input type="text" data-recurly="name_on_account">
  <input type="text" data-recurly="iban">
  <input type="text" data-recurly="country">
  <input type="hidden" name="recurly-token" data-recurly="token">
  <button>submit</button>
</form>

IBAN inputs

Field NameExampleDescription
name_on_accountPat SmithFull name on account. Required
ibanGB33BUKB20201555555555The International Bank Account Number, up to 34 alphanumeric characters comprising a country code, two check digits, and a number that includes the domestic bank account number, branch identifier, and potential routing information. (SEPA only) Required
countryFRISO 3166 two-letter country code. This code must match a country in the European Union (EU) Required

Getting a token

fn recurly.bankAccount.token

You may call recurly.bankAccount.token with a form element:

recurly.bankAccount.token(document.querySelector('form'), tokenHandler);

Or with an Object:

const ibanBillingInfo = {
  name_on_account: 'Pat Smith',
  iban: 'GB33BUKB20201555555555',
  country: 'GB'
};

recurly.bankAccount.token(ibanBillingInfo, tokenHandler);

Both methods require using a handler function like this one:

function tokenHandler (err, token) {
  if (err) {
    // handle error using err.code and err.fields
  } else {
    // handle success using token.id
  }
}

This sends IBAN information to Recurly to store as a token, returning that token id back to you via callback.

UK bank accounts (BACS)

Tokenize your users' UK based Bank Account (Bacs) information in
order to process Bacs transactions.

Similar to configuring a card form, use the data-recurly attribute to
identify Bacs specific inputs. Since Recurly.js does not need to inject fields for bank accounts, all fields may be displayed as inputs on your payment form.

<form>
  <input type="text" data-recurly="sort_code">
  <input type="text" data-recurly="account_number">
  <input type="text" data-recurly="account_number_confirmation">
  <input type="hidden" name="type" value="bacs" data-recurly="type">
  <input type="text" data-recurly="name_on_account">
  <input type="hidden" name="recurly-token" data-recurly="token">
  <button>submit</button>
</form>

UK bank account (BACS) inputs

Field NameExampleDescription
sort_code200000UK Sort Code. Required
account_number55779911Account number. Required
account_number_confirmation55779911Account number confirmation. Required
typebacsAccount type. Required
name_on_accountCharles GeorgeFull name on account. Required

Getting a token

fn recurly.bankAccount.token

You may call recurly.bankAccount.token with a form element:

recurly.bankAccount.token(document.querySelector('form'), tokenHandler);

Or with an Object:

const bacsBillingInfo = {
  name_on_account: 'Charles George',
  account_number: '55779911',
  account_number_confirmation: '55779911',
  sort_code: '200000',
  type: 'bacs'
};

recurly.bankAccount.token(bacsBillingInfo, tokenHandler);

Both methods require using a handler function like this one:

function tokenHandler (err, token) {
  if (err) {
    // handle error using err.code and err.fields
  } else {
    // handle success using token.id
  }
}

This sends Bacs information to Recurly to store as a token, returning that token id back to you via callback.

Arguments (form)

ParamTypeDescription
formHTMLFormElementParent form containing data-recurly fields
callbackFunctionCallback function to accept the returned token

Alternatively, you can call recurly.bankAccount.token with a plain JavaScript object. This allows a more direct interface to the payment flow, eliminating any need to use the DOM.

Arguments (object)

ParamTypeDescription
optionsObjectAn object with billing information properties matching those [outlined above].
callbackFunctionCallback function to accept the returned token

A callback is always required

Callback arguments

ParamTypeDescription
errRecurlyError or nullA RecurlyError if an error occurred; otherwise null.
tokenObjectAn object containing a token id.
token.typeString'bank_account'
token.idStringA token id.

Returns

Nothing.


Australian bank accounts (BECS)

Tokenize your users' Australian based Bank Account (Becs) information in
order to process Becs transactions.

Similar to configuring a card form, use the data-recurly attribute to
identify Becs specific inputs. Since Recurly.js does not need to inject fields for bank accounts, all fields may be displayed as inputs on your payment form.

<form>
  <input type="text" data-recurly="bsb_code">
  <input type="text" data-recurly="account_number">
  <input type="text" data-recurly="account_number_confirmation">
  <input type="hidden" name="type" value="becs" data-recurly="type">
  <input type="text" data-recurly="name_on_account">
  <input type="hidden" name="recurly-token" data-recurly="token">
  <button>submit</button>
</form>

Australian bank account (BECS) inputs

Field NameExampleDescription
bsb_code082902Australian BSB Code. Required
account_number55779911Account number. Required
account_number_confirmation55779911Account number confirmation. Required
typebecsAccount type. Required
name_on_accountCharles GeorgeFull name on account. Required

Getting a token

fn recurly.bankAccount.token

You may call recurly.bankAccount.token with a form element:

recurly.bankAccount.token(document.querySelector('form'), tokenHandler);

Or with an Object:

const becsBillingInfo = {
  name_on_account: 'Charles George',
  account_number: '55779911',
  account_number_confirmation: '55779911',
  bsb_code: '082902',
  type: 'becs'
};

recurly.bankAccount.token(becsBillingInfo, tokenHandler);

Both methods require using a handler function like this one:

function tokenHandler (err, token) {
  if (err) {
    // handle error using err.code and err.fields
  } else {
    // handle success using token.id
  }
}

This sends Becs information to Recurly to store as a token, returning that token id back to you via callback.

Arguments (form)

ParamTypeDescription
formHTMLFormElementParent form containing data-recurly fields
callbackFunctionCallback function to accept the returned token

Alternatively, you can call recurly.bankAccount.token with a plain JavaScript object. This allows a more direct interface to the payment flow, eliminating any need to use the DOM.

Arguments (object)

ParamTypeDescription
optionsObjectAn object with billing information properties matching those [outlined above].
callbackFunctionCallback function to accept the returned token

A callback is always required

Callback arguments

ParamTypeDescription
errRecurlyError or nullA RecurlyError if an error occurred; otherwise null.
tokenObjectAn object containing a token id.
token.typeString'bank_account'
token.idStringA token id.

Returns

Nothing.