HomeProduct DocsAPI ReferenceChangelog
RecurlyAPI GuidesRecurly.jsWebhooksAPI ReferenceSupportBook demo
API Reference

Update an account's billing information

If you're using Recurly.js to securely submit data from webforms without sending it through your server,
you can associate the billing information with an account by passing in the token_id. The only other
fields permitted with token_id are primary_payment_method and/or backup_payment_method.

For credit card payments you'll need the following required fields:

  • first_name
  • last_name
  • number
  • month
  • year

For external (not Recurly.js) tokenized payments you'll need the following required fields:

  • first_name
  • last_name
  • gateway_token
  • gateway_code
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Account ID or code. For ID no prefix is used e.g. e28zov4fw0v2. For code use prefix code-, e.g. code-bob.

string
required

Billing Info ID. Can ONLY be used for sites utilizing the Wallet feature.

Body Params
string
length ≤ 22
string
length ≤ 50
string
length ≤ 50
string
length ≤ 100
address
object
string

Credit card number, spaces and dashes are accepted.

string
length ≤ 2
string
length ≤ 4
string
length ≤ 4

STRONGLY RECOMMENDED

string

3-letter ISO 4217 currency code.

string
string
length ≤ 20

STRONGLY RECOMMENDED Customer's IP address when updating their billing information.

string
length ≤ 50
string
length ≤ 12
payment_gateway_references
array of objects

Array of Payment Gateway References, each a reference to a third-party gateway object of varying types.

payment_gateway_references
gateway_attributes
object

Additional attributes to send to the gateway.

string

Only supported on Amazon V1. For Amazon V2, use token_id with Recurly.js.

string
string
string
string

The Adyen Risk Profile Reference ID is used to identify the risk profile for the payment method.

string
enum

An optional type designation for the payment gateway transaction created by this request. Supports 'moto' value, which is the acronym for mail order and telephone transactions.

Allowed:
string
length ≤ 22

A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge.

string
length ≤ 34

The 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

string
length ≤ 255

The name associated with the bank account (ACH, SEPA, Bacs only)

string
length ≤ 255

The bank account number. (ACH, Bacs only)

string
length ≤ 15

The bank's rounting number. (ACH only)

string
length ≤ 15

Bank identifier code for UK based banks. Required for Bacs based billing infos. (Bacs only)

string
enum

The payment method type for a non-credit card based billing info. bacs, becs, pix-automatico, mercadopago, upi-autopay are the only accepted values.

Allowed:
string
enum

The bank account type. (ACH only)

Allowed:
string

Tax identifier is required if adding a billing info that is a consumer card in Brazil or in Argentina. This would be the customer's CPF/CNPJ (Brazil) and CUIT (Argentina). CPF, CNPJ and CUIT are tax identifiers for all residents who pay taxes in Brazil and Argentina respectively.

string
enum

This field and a value of cpf, cnpj or cuit are required if adding a billing info that is an elo or hipercard type in Brazil or in Argentina.

Allowed:
boolean

The primary_payment_method field is used to designate the primary billing info on the account. The first billing info created on an account will always become primary. Adding additional billing infos provides the flexibility to mark another billing info as primary, or adding additional non-primary billing infos. This can be accomplished by passing the primary_payment_method with a value of true. When adding billing infos via the billing_info and /accounts endpoints, this value is not permitted, and will return an error if provided.

boolean

The backup_payment_method field is used to designate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined. All payment methods, including the billing info marked primary_payment_method can be set as a backup. An account can have a maximum of 1 backup, if a user sets a different payment method as a backup, the existing backup will no longer be marked as such.

string
enum

Use for Adyen HPP billing info. This should only be used as part of a pending purchase request, when the billing info is nested inside an account object.

Allowed:
string
enum
deprecated

Use for Online Banking billing info. This should only be used as part of a pending purchase request, when the billing info is nested inside an account object.

Allowed:
string
enum
string
enum

Represents the card network preference associated with the billing info for dual badged cards. Must be a supported card network.

Allowed:
string

Specifies a URL to which a consumer will be redirected upon completion of a redirect payment flow. Only redirect payment flows operating through Adyen Components will utilize this return URL.

string
enum

UPI Autopay authentication method. Specifies how the customer authorizes the enrollment mandate. Defaults to 'vpa' if omitted.

Allowed:
Responses

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json