younifyd
Menu

Create Billing Info

Add new billing information on an account

POST/accounts/{account_id}/billing_infos

Use it in a workflow

  1. Add a step and choose the Recurly connector.
  2. Pick the Create Billing Info action (under billing_infos).
  3. Fill in the fields below, then reference the result from later steps as {{createBillingInfo.response.data}}.

Request

Path parameters

account_idstringrequired

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

Request body

Enter the body as JSON in the step's Body field.

token_idstring

A token [generated by Recurly.js](https://recurly.com/developers/reference/recurly-js/#getting-a-token).

first_namestring
last_namestring
companystring
addressobject
phonestring
street1string
street2string
citystring
regionstring

State or province.

postal_codestring

Zip or postal code.

countrystring

Country, 2-letter ISO 3166-1 alpha-2 code.

geo_codestring

Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.

numberstring

Credit card number, spaces and dashes are accepted.

monthstring
yearstring
cvvstring

*STRONGLY RECOMMENDED*

currencystring

3-letter ISO 4217 currency code.

vat_numberstring
ip_addressstring

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

gateway_tokenstring
gateway_codestring
payment_gateway_referencesarray<object>

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

tokenstring
reference_typestring

The type of reference token. Required if token is passed in for Stripe Gateway or Ebanx UPI.

One ofstripe_confirmation_tokenupi_vpa

gateway_attributesobject

Additional attributes to send to the gateway.

account_referencestring

Used by Adyen and Braintree gateways. For Adyen the Shopper Reference value used when the external token was created. Must be used in conjunction with gateway_token and gateway_code. For Braintree the PayPal PayerID is populated in the response.

amazon_billing_agreement_idstring

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

paypal_billing_agreement_idstring
roku_billing_agreement_idstring
fraud_session_idstring
adyen_risk_profile_reference_idstring

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

transaction_typestring

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.

One ofmoto

three_d_secure_action_result_token_idstring

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

ibanstring

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

name_on_accountstring

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

account_numberstring

The bank account number. (ACH, Bacs only)

routing_numberstring

The bank's rounting number. (ACH only)

sort_codestring

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

typestring

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

One ofbacsbecspix-automaticomercadopagoupi-autopay

account_typestring

The bank account type. (ACH only)

One ofcheckingsavings

tax_identifierstring

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.

tax_identifier_typestring

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.

One ofcpfcnpjcuit

primary_payment_methodboolean

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.

backup_payment_methodboolean

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.

external_hpp_typestring

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.

One ofadyen

online_banking_payment_typestring

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.

One ofidealsofort

card_typestring

One ofAmerican ExpressDankortDiners ClubDiscoverELOForbrugsforeningenHipercardJCBLaserMaestroMasterCardTest CardUnion PayUnknownVisaTarjeta Naranja

card_network_preferencestring

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

One ofBancontactCartesBancairesDankortMasterCardVisa

return_urlstring

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.

authentication_methodstring

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

One ofvpaqr-codeapp-deep-links

json
{
  "token_id": "string",
  "first_name": "string",
  "last_name": "string",
  "company": "string",
  "address": {
    "phone": "string",
    "street1": "string",
    "street2": "string",
    "city": "string",
    "region": "string",
    "postal_code": "string",
    "country": "string",
    "geo_code": "string"
  },
  "number": "string",
  "month": "string",
  "year": "string",
  "cvv": "string",
  "currency": "string",
  "vat_number": "string",
  "ip_address": "string"
}

Response

Returns 200 with an object. Read it in later steps with {{createBillingInfo.response.data.<field>}}.

idstring
objectstring
account_idstring
first_namestring
last_namestring
companystring
addressobject
phonestring
street1string
street2string
citystring
regionstring

State or province.

postal_codestring

Zip or postal code.

countrystring

Country, 2-letter ISO 3166-1 alpha-2 code.

geo_codestring

Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled.

vat_numberstring

Customer's VAT number (to avoid having the VAT applied). This is only used for automatically collected invoices.

validboolean
payment_methodobject
objectstring

One ofbacsamazonamazon_billing_agreementapple_payapple_pay_merchant_tokenbank_account_infobraintree_apple_paycheckcredit_cardeftgateway_tokengoogle_paygoogle_pay_device_paniban_bank_accountmoney_orderotherpaypalpaypal_billing_agreementrokusepadirectdebitvenmowire_transferbraintree_v_zeroboletocash_appupi_autopaypix_automaticomercadopagoklarnabraintree_google_paystripe_link

card_typestring

Visa, MasterCard, American Express, Discover, JCB, etc.

One ofAmerican ExpressDankortDiners ClubDiscoverELOForbrugsforeningenHipercardJCBLaserMaestroMasterCardTest CardUnion PayUnknownVisaTarjeta Naranja

first_sixstring

Credit card number's first six digits.

last_fourstring

Credit card number's last four digits. Will refer to bank account if payment method is ACH.

last_twostring

The IBAN bank account's last two digits.

exp_monthinteger

Expiration month.

exp_yearinteger

Expiration year.

gateway_tokenstring

A token used in place of a credit card in order to perform transactions.

cc_bin_countrystring

The 2-letter ISO 3166-1 alpha-2 country code associated with the card's issuer, if known.

funding_sourcestring

The funding source of the card, if known.

One ofcreditdebitchargeprepaiddeferred_debit

gateway_codestring

An identifier for a specific payment gateway.

gateway_attributesobject1 fields

Gateway specific attributes associated with this PaymentMethod

card_network_preferencestring

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

One ofBancontactCartesBancairesDankortMasterCardVisa

billing_agreement_idstring

Billing Agreement identifier. Only present for Amazon or Paypal payment methods.

name_on_accountstring

The name associated with the bank account.

account_typestring

The bank account type. Only present for ACH payment methods.

One ofcheckingsavings

routing_numberstring

The bank account's routing number. Only present for ACH payment methods.

routing_number_bankstring

The bank name of this routing number.

usernamestring

Username of the associated payment method. Currently only associated with Venmo.

fraudobject

Most recent fraud result.

scoreinteger
decisionstring

One ofapprovedeclineescalatereview

risk_rules_triggeredobject
primary_payment_methodboolean

The `primary_payment_method` field is used to indicate the primary billing info on the account. The first billing info created on an account will always become primary. This payment method will be used

backup_payment_methodboolean

The `backup_payment_method` field is used to indicate a billing info as a backup on the account that will be tried if the initial billing info used for an invoice is declined.

payment_gateway_referencesarray<object>

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

tokenstring

Reference value used when the external token was created. If a Stripe gateway or Ebanx gateway is used, this value will need to be accompanied by its reference_type.

reference_typestring

The type of reference token. Required if token is passed in for Stripe Gateway or Ebanx UPI.

One ofstripe_confirmation_tokenupi_vpa

created_atstring (date-time)

When the billing information was created.

updated_atstring (date-time)

When the billing information was last changed.

updated_byobject
ipstring

Customer's IP address when updating their billing information.

countrystring

Country, 2-letter ISO 3166-1 alpha-2 code matching the origin IP address, if known by Recurly.

json
{
  "id": "string",
  "object": "string",
  "account_id": "string",
  "first_name": "string",
  "last_name": "string",
  "company": "string",
  "address": {
    "phone": "string",
    "street1": "string",
    "street2": "string",
    "city": "string",
    "region": "string",
    "postal_code": "string",
    "country": "string",
    "geo_code": "string"
  },
  "vat_number": "string",
  "valid": false,
  "payment_method": {
    "object": "bacs",
    "card_type": "American Express",
    "first_six": "string",
    "last_four": "string",
    "last_two": "string",
    "exp_month": 0,
    "exp_year": 0,
    "gateway_token": "string",
    "cc_bin_country": "string",
    "funding_source": "credit",
    "gateway_code": "string",
    "gateway_attributes": {
      "account_reference": "string"
    }
  },
  "fraud": {
    "score": 0,
    "decision": "approve",
    "risk_rules_triggered": {}
  },
  "primary_payment_method": false
}

Need more? See the Recurly guide for connection setup and behaviour shared by every action.

Create Billing Info — Recurly — Documentation