---
updatedAt: 2026-11-05T23:25:26.000Z
agentTools:
  siteIndex: https://docs.recurly.com/llms.txt
  projectIndex: https://docs.recurly.com/recurly-subscriptions/v2021-02-25/llms.txt
---

# Add new billing information on an account

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


# OpenAPI definition

````json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Recurly V3 API",
    "description": "# Getting Started\n\n## Versioning\nThe V3 API is versioned to allow stability for integrators and\nflexibility for Recurly to continue making improvements.\n\nThe versions follow a format that incorporates the approximate date the\nchanges were released in a YYYY-MM-DD format, e.g. `v2021-02-25`.\n\n> *WARNING*: Specifying a version is required to get a successful response.\n\nEach request should specify a version using the `Accept` header:\n* `Accept: application/vnd.recurly.v2021-02-25`\n* `Accept: application/vnd.recurly.v2021-02-25+json`\n\nAll responses will include a `Recurly-Version` header with the API version\nused to process the request:\n```\nRecurly-Version: recurly.v2021-02-25\n```\n\nRecurly's client libraries correspond with API versions as listed below.\n\n<table>\n  <tr>\n    <th>API Version</th>\n    <th>Client Library Version</th>\n  </tr>\n  <tr>\n    <td>v2021-02-25</td>\n    <td>4.x</td>\n  </tr>\n  <tr>\n    <td>v2019-10-10</td>\n    <td>3.x</td>\n  </tr>\n</table>\n\nClient library releases:\n\n* [Node.js](https://github.com/recurly/recurly-client-node/releases)\n* [Python](https://github.com/recurly/recurly-client-python/releases)\n* [.NET](https://github.com/recurly/recurly-client-dotnet/releases)\n* [Ruby](https://github.com/recurly/recurly-client-ruby/releases)\n* [Java](https://github.com/recurly/recurly-client-java/releases)\n* [PHP](https://github.com/recurly/recurly-client-php/releases)\n* [Go](https://github.com/recurly/recurly-client-go/releases)\n\nClient libraries follow semantic versioning. For example, [Ruby client library\nversion 3.18.1](https://github.com/recurly/recurly-client-ruby/releases/tag/3.18.1)\nrepresents major version `3`, minor version `18` with patch `1`.\n\nWe encourage you to update to the latest version of the API and corresponding client library,\nas most recent versions are more performant than their predecessors. See the\n[changelog](https://recurly.com/developers/api/changelog.html) for a comprehensive list of changes\nintroduced in the latest API version.\n\n### Default Versions\nSpecifying a version is required to get a successful response. If you wish to\nreceive the latest version and are willing to accept the risk of breaking changes,\nyou may specify a version of `latest`.\n\nThe following media types will default the newest version of\nthe API:\n\n* `application/vnd.recurly.latest`\n* `application/vnd.recurly.latest+json`\n\n### Deprecation\nResponses for a deprecated version request will return two headers:\n```\nRecurly-Deprecated: TRUE\nRecurly-Sunset-Date: 2017-06-01T00:00:00+00:00\n```\nThe sunset date is an ISO-8601 formatted date time after which the version\nwill no longer be accessible.\n\n### Unsupported Versions\nA request for an unsupported version will return a status code of 406 and\nthe body will include a list of supported versions:\n```\n{\n  \"error\": {\n    \"type\": \"invalid_api_version\",\n    \"message\": \"That accept header isn't in the format we use to specify an API version. Try one of these instead:\",\n    \"acceptable_accept_headers\": [\n      \"application/vnd.recurly.v2016-03-01\",\n      \"application/vnd.recurly.v2016-04-27\",\n      \"application/vnd.recurly.v2016-07-27\",\n      \"application/vnd.recurly.v2016-12-15\",\n      \"application/vnd.recurly.v2017-01-12\",\n      \"application/vnd.recurly.v2017-09-30\",\n      \"application/vnd.recurly.v2018-01-24\",\n      \"application/vnd.recurly.v2018-05-10\",\n      \"application/vnd.recurly.v2018-06-06\",\n      \"application/vnd.recurly.v2018-08-09\",\n      \"application/vnd.recurly.v2019-10-10\",\n      \"application/vnd.recurly.v2021-02-25\"\n    ]\n  }\n}\n```\n\n## Error Messages\nError messages sent via the Recurly API are generally directed at\ndevelopers and those who are familiar with API technology. When using the\nAPI and passing error messages to target systems, be mindful that\nthese messages may not make sense in the context of the target system.\nPlease consider changing these messages in the target system to be better\nsuited to the audience of the system.\n\nPlease see [transaction error codes](https://recurly.com/developers/pages/api-transaction-errors.html) for more details.\n\n## Pagination\n### Response Schema\nEvery GET listing endpoint returns a response with the same schema:\n\n```\n{\n  \"object\":   \"list\",         // Always \"list\"\n  \"has_more\": true,           // false if this is the last page of data\n  \"next\":     \"https://...\",  // A URL pointing to the next page of data\n  \"data\":     []              // The data for this page as an array\n}\n```\n\nTo page through every record, your code should continually call the URL\nat `next` until `has_more` is `false`.\n\n### Query Parameters\nMost GET listing endpoints take query parameters that allow filtering\nand sorting the results. Some endpoints have additional parameters, which are\ndocumented on the respective endpoints, but most support the\nfollowing parameters:\n\n* `ids`: A comma separated list of ids to match.\n* `limit`: The number of records to return per page.\n* `order`: The sort order of records.\n* `sort`: The date field to use in sorting.\n* `begin_time`: The start datetime to filter (ISO 8601).\n* `end_time`: The end datetime to filter (ISO 8601).\n\n### Counting with HEAD\nEvery GET listing endpoint also supports the HEAD HTTP method. Making a\nhead request to the endpoint results in an empty body and an additional\n`Recurly-Total-Records` header. This is a count of the total number of records\nthat the endpoint will return, taking into account the current filtering query\nparameters.\n\n## Limits\nIn order to provide a fast response time to all our customers, we may rate\nlimit excessive requests. By default, new Recurly sites have the following\nAPI rate limits:\n\n* Sandbox sites: 400 requests/min. All requests count towards the rate limit.\n* Production sites: 1,000 requests/min. Only GET requests count towards the rate limit.\n\nOnce your site moves into production mode, Recurly will only rate limit\nGET requests. New subscriptions, account modifications, and other requests\nusing POST, PUT, or DELETE methods will not count against your rate limit.\n\nThe rate limit is calculated over a sliding 5 minute window. This means a\nproduction site could make 4,000 requests within one minute and not hit\nthe rate limit so long as the site made less than 1,000 requests during\nthe prior 4 minutes.\n\nIf an API request exceeds the rate limit, the API will return a\n`429 Too Many Requests` HTTP status. If your business needs a higher\nlimit, please contact support.\n\nThe rate limit applied to your client can be determined with the\n`X-RateLimit-Limit` header, and the number of remaining requests is sent\nin the `X-RateLimit-Remaining` header. Finally, the `X-RateLimit-Reset`\nheader contains an integer value representing the time, measured in\nseconds since the UNIX Epoch, at which the request count will be reset.\n\n## Idempotent Requests\n\nRecurly supports idempotent requests via the `Idempotency-Key` header for\n`POST`, `PUT`, `PATCH`, and `DELETE` requests. This allows API clients to\nsafely retry these requests without risk of duplicate operations.\n\nWhen you send a request with an `Idempotency-Key` header, Recurly stores the\nresponse for **1 hour**. If you send an identical request (same key, method,\npath, and API key) within that window, Recurly replays the original response\nrather than processing a new one. The replay response includes an\n`Idempotency-Prior: true` header.\n\nIf a request with the same key is **already in flight** when a second arrives,\nthe server returns `409 Conflict` with `Recurly-Should-Retry: true` and a\n`Retry-After` header indicating how long to wait in seconds before retrying.\n\n> **Note:** `429 Too Many Requests` responses are intentionally **not** cached.\n> You may retry freely once your rate limit resets without risk of unintended\n> replay behavior.\n\nKeys must be **255 characters or fewer**. Keys exceeding this limit will\nreceive a `400 Bad Request` response. We recommend using a UUID v4 as your\nkey to guarantee uniqueness.\n\n> **SDK support:** Native `Idempotency-Key` management (automatic key\n> generation, retry handling, and replay detection) is currently supported only\n> in the **Ruby SDK**. When using other SDKs or raw HTTP clients, you must\n> supply and manage the `Idempotency-Key` header yourself.\n\n## Change Log\n\nA list of changes for this version can be found [in the changelog](https://recurly.com/developers/api/changelog.html#v2021-02-25---current-ga-version).\n",
    "version": "v2021-02-25"
  },
  "security": [
    {
      "api_key": []
    }
  ],
  "x-tagGroups": [
    {
      "name": "Customers",
      "tags": [
        "Account",
        "Account Note",
        "Account Acquisition Info",
        "Billing Info",
        "Billing Infos",
        "Coupon Redemption",
        "Subscription",
        "Subscription Change",
        "Usage",
        "Shipping Address"
      ]
    },
    {
      "name": "Invoices and Payments",
      "tags": [
        "Purchase",
        "Invoice",
        "Line Item",
        "Credit Payment",
        "Transaction",
        "Revenue Recovery",
        "Gift Cards"
      ]
    },
    {
      "name": "Products and Promotions",
      "tags": [
        "Item",
        "Plan",
        "Add-on",
        "Measured Unit",
        "Coupon",
        "Unique Coupon Code",
        "Price Segment"
      ]
    },
    {
      "name": "Configuration",
      "tags": [
        "Site",
        "Custom Field Definition",
        "Shipping Method",
        "Dunning Campaigns",
        "Business Entities",
        "Automated Exports",
        "General Ledger Account",
        "Performance Obligations",
        "Invoice Templates"
      ]
    },
    {
      "name": "App Management",
      "tags": [
        "External Subscription",
        "External Invoice",
        "External Product",
        "External Account",
        "External Product Reference",
        "External Payment Phase"
      ]
    }
  ],
  "tags": [
    {
      "name": "Billing Infos",
      "description": "If the premium Wallet feature is enabled, an account can have multiple payment methods stored. Examples include credit cards, PayPal, or bank accounts. Primary or backup billing infos can be designated from these endpoints."
    }
  ],
  "paths": {
    "/accounts/{account_id}/billing_infos": {
      "post": {
        "tags": [
          "Billing Infos"
        ],
        "operationId": "create_billing_info",
        "summary": "Add new billing information on an account",
        "description": "If you're using Recurly.js to securely submit data from webforms without sending it through your server,\nyou can associate the billing information with an account by passing in the `token_id`. The only other\nfields permitted with `token_id` are `primary_payment_method` and/or `backup_payment_method`.\n\nFor credit card payments you'll need the following required fields:\n\n- first_name\n- last_name\n- number\n- month\n- year\n\nFor external (not Recurly.js) tokenized payments you'll need the following required fields:\n\n- first_name\n- last_name\n- gateway_token\n- gateway_code\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          },
          {
            "$ref": "#/components/parameters/account_id"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingInfoCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Updated billing information.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BillingInfo"
                }
              }
            }
          },
          "400": {
            "description": "Bad request, perhaps invalid JSON?",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Incorrect site or account ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid billing information, or error running the verification transaction.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorMayHaveTransaction"
                }
              }
            }
          }
        },
        "x-code-samples": []
      }
    }
  },
  "servers": [
    {
      "url": "https://v3.recurly.com"
    },
    {
      "url": "https://v3.eu.recurly.com"
    }
  ],
  "components": {
    "parameters": {
      "accept_header": {
        "name": "Accept",
        "in": "header",
        "description": "The API version to use for this request, e.g. `application/vnd.recurly.v2021-02-25`. Requests without a versioned `Accept` header return a 406 response.",
        "required": true,
        "schema": {
          "default": "application/vnd.recurly.v2021-02-25",
          "type": "string",
          "enum": [
            "application/vnd.recurly.v2021-02-25",
            "application/vnd.recurly.v2021-02-25+json"
          ]
        }
      },
      "account_id": {
        "name": "account_id",
        "in": "path",
        "description": "Account ID or code. For ID no prefix is used e.g. `e28zov4fw0v2`. For code use prefix `code-`, e.g. `code-bob`.",
        "required": true,
        "schema": {
          "type": "string"
        }
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "http",
        "description": "Enter the API key as the username and set the password to an empty string. You can locate and manage your API keys from the [API Credentials](https://app.recurly.com/go/developer/api_keys) page.",
        "scheme": "basic"
      }
    },
    "schemas": {
      "Address": {
        "type": "object",
        "properties": {
          "phone": {
            "type": "string",
            "title": "Phone number"
          },
          "street1": {
            "type": "string",
            "title": "Street 1",
            "maxLength": 50
          },
          "street2": {
            "type": "string",
            "title": "Street 2",
            "maxLength": 50
          },
          "city": {
            "type": "string",
            "title": "City"
          },
          "region": {
            "type": "string",
            "title": "State/Province",
            "description": "State or province."
          },
          "postal_code": {
            "type": "string",
            "title": "Zip/Postal code",
            "description": "Zip or postal code."
          },
          "country": {
            "type": "string",
            "title": "Country",
            "description": "Country, 2-letter ISO 3166-1 alpha-2 code."
          },
          "geo_code": {
            "type": "string",
            "maxLength": 20,
            "description": "Code that represents a geographic entity (location or object). Only returned when Vertex or Avalara for Communications is enabled."
          }
        }
      },
      "BillingInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 13,
            "readOnly": true
          },
          "object": {
            "type": "string",
            "title": "Object type",
            "readOnly": true
          },
          "account_id": {
            "type": "string",
            "maxLength": 13,
            "readOnly": true
          },
          "first_name": {
            "type": "string",
            "maxLength": 50
          },
          "last_name": {
            "type": "string",
            "maxLength": 50
          },
          "company": {
            "type": "string",
            "maxLength": 100
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "vat_number": {
            "type": "string",
            "description": "Customer's VAT number (to avoid having the VAT applied). This is only used for automatically collected invoices."
          },
          "valid": {
            "type": "boolean",
            "readOnly": true
          },
          "payment_method": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "fraud": {
            "type": "object",
            "x-class-name": "FraudInfo",
            "title": "Fraud information",
            "description": "Most recent fraud result.",
            "readOnly": true,
            "properties": {
              "score": {
                "type": "integer",
                "title": "Kount score",
                "minimum": 1,
                "maximum": 99
              },
              "decision": {
                "title": "Kount decision",
                "maxLength": 10,
                "type": "string",
                "enum": [
                  "approve",
                  "decline",
                  "escalate",
                  "review"
                ]
              },
              "risk_rules_triggered": {
                "type": "object",
                "title": "Kount rules"
              }
            }
          },
          "primary_payment_method": {
            "type": "boolean",
            "description": "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_method": {
            "type": "boolean",
            "description": "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_references": {
            "type": "array",
            "description": "Array of Payment Gateway References, each a reference to a third-party gateway object of varying types.",
            "items": {
              "$ref": "#/components/schemas/PaymentGatewayReferences"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the billing information was created.",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the billing information was last changed.",
            "readOnly": true
          },
          "updated_by": {
            "type": "object",
            "x-class-name": "BillingInfoUpdatedBy",
            "readOnly": true,
            "properties": {
              "ip": {
                "type": "string",
                "description": "Customer's IP address when updating their billing information.",
                "maxLength": 20
              },
              "country": {
                "type": "string",
                "description": "Country, 2-letter ISO 3166-1 alpha-2 code matching the origin IP address, if known by Recurly.",
                "maxLength": 2
              }
            }
          }
        }
      },
      "BillingInfoCreate": {
        "type": "object",
        "properties": {
          "token_id": {
            "type": "string",
            "title": "Token ID",
            "description": "A token [generated by Recurly.js](https://recurly.com/developers/reference/recurly-js/#getting-a-token).",
            "maxLength": 22
          },
          "first_name": {
            "type": "string",
            "title": "First name",
            "maxLength": 50
          },
          "last_name": {
            "type": "string",
            "title": "Last name",
            "maxLength": 50
          },
          "company": {
            "type": "string",
            "title": "Company name",
            "maxLength": 100
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "number": {
            "type": "string",
            "title": "Credit card number",
            "description": "Credit card number, spaces and dashes are accepted."
          },
          "month": {
            "type": "string",
            "title": "Expiration month",
            "maxLength": 2
          },
          "year": {
            "type": "string",
            "title": "Expiration year",
            "maxLength": 4
          },
          "cvv": {
            "type": "string",
            "title": "Security code or CVV",
            "description": "*STRONGLY RECOMMENDED*",
            "maxLength": 4
          },
          "currency": {
            "type": "string",
            "description": "3-letter ISO 4217 currency code."
          },
          "vat_number": {
            "type": "string",
            "title": "VAT number"
          },
          "ip_address": {
            "type": "string",
            "title": "IP address",
            "description": "*STRONGLY RECOMMENDED* Customer's IP address when updating their billing information.",
            "maxLength": 20
          },
          "gateway_token": {
            "type": "string",
            "title": "A token used in place of a credit card in order to perform transactions. Must be used in conjunction with `gateway_code`.",
            "maxLength": 50
          },
          "gateway_code": {
            "type": "string",
            "title": "An identifier for a specific payment gateway.",
            "maxLength": 12
          },
          "backup_gateway_code": {
            "type": "string",
            "title": "Identifies a backup gateway. Applies only when `gateway_code` is provided and that gateway is in failover. Providing this code overrides gateway exclusion configurations and restricts the backup to this gateway.",
            "maxLength": 12
          },
          "payment_gateway_references": {
            "type": "array",
            "description": "Array of Payment Gateway References, each a reference to a third-party gateway object of varying types.",
            "items": {
              "$ref": "#/components/schemas/PaymentGatewayReferences"
            },
            "properties": {
              "token": {
                "type": "string",
                "maxLength": 50
              },
              "reference_type": {
                "type": "string",
                "description": "The type of reference token. The value can be omitted for gateways that only support one type of token.",
                "enum": [
                  "stripe_confirmation_token",
                  "upi_vpa"
                ]
              }
            }
          },
          "gateway_attributes": {
            "type": "object",
            "description": "Additional attributes to send to the gateway.",
            "x-class-name": "GatewayAttributes",
            "properties": {
              "account_reference": {
                "type": "string",
                "description": "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.",
                "maxLength": 264
              }
            }
          },
          "amazon_billing_agreement_id": {
            "type": "string",
            "title": "Amazon billing agreement ID",
            "description": "Only supported on Amazon V1. For Amazon V2, use token_id with Recurly.js."
          },
          "paypal_billing_agreement_id": {
            "type": "string",
            "title": "PayPal billing agreement ID"
          },
          "roku_billing_agreement_id": {
            "type": "string",
            "title": "Roku's CIB if billing through Roku"
          },
          "fraud_session_id": {
            "type": "string",
            "title": "Fraud Session ID"
          },
          "adyen_risk_profile_reference_id": {
            "type": "string",
            "title": "Adyen Risk Profile Reference ID",
            "description": "The Adyen Risk Profile Reference ID is used to identify the risk profile for the payment method."
          },
          "transaction_type": {
            "description": "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.",
            "type": "string",
            "enum": [
              "moto"
            ]
          },
          "three_d_secure_action_result_token_id": {
            "type": "string",
            "title": "3-D Secure action result token ID",
            "description": "A token generated by Recurly.js after completing a 3-D Secure device fingerprinting or authentication challenge.",
            "maxLength": 22
          },
          "iban": {
            "type": "string",
            "maxLength": 34,
            "description": "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_account": {
            "type": "string",
            "maxLength": 255,
            "description": "The name associated with the bank account (ACH, SEPA, Bacs only)"
          },
          "account_number": {
            "type": "string",
            "maxLength": 255,
            "description": "The bank account number. (ACH, Bacs only)"
          },
          "routing_number": {
            "type": "string",
            "maxLength": 15,
            "description": "The bank's rounting number. (ACH only)"
          },
          "sort_code": {
            "type": "string",
            "maxLength": 15,
            "description": "Bank identifier code for UK based banks. Required for Bacs based billing infos. (Bacs only)"
          },
          "type": {
            "type": "string",
            "description": "The payment method type for a non-credit card based billing info. `bacs`, `becs`, `pix-automatico`, `mercadopago`, `upi-autopay` are the only accepted values.",
            "enum": [
              "bacs",
              "becs",
              "pix-automatico",
              "mercadopago",
              "upi-autopay"
            ]
          },
          "account_type": {
            "type": "string",
            "description": "The bank account type. (ACH only)",
            "enum": [
              "checking",
              "savings"
            ]
          },
          "tax_identifier": {
            "type": "string",
            "description": "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_type": {
            "description": "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.",
            "type": "string",
            "enum": [
              "cpf",
              "cnpj",
              "cuit"
            ]
          },
          "primary_payment_method": {
            "type": "boolean",
            "title": "Primary Payment Method",
            "description": "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_method": {
            "type": "boolean",
            "description": "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_type": {
            "type": "string",
            "description": "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.",
            "enum": [
              "adyen"
            ]
          },
          "online_banking_payment_type": {
            "deprecated": true,
            "type": "string",
            "description": "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.",
            "enum": [
              "ideal",
              "sofort"
            ]
          },
          "card_type": {
            "type": "string",
            "enum": [
              "American Express",
              "Dankort",
              "Diners Club",
              "Discover",
              "ELO",
              "Forbrugsforeningen",
              "Hipercard",
              "JCB",
              "Laser",
              "Maestro",
              "MasterCard",
              "Test Card",
              "Union Pay",
              "Unknown",
              "Visa",
              "Tarjeta Naranja"
            ]
          },
          "card_network_preference": {
            "description": "Represents the card network preference associated with the billing info for dual badged cards. Must be a supported card network.",
            "type": "string",
            "enum": [
              "Bancontact",
              "CartesBancaires",
              "Dankort",
              "MasterCard",
              "Visa"
            ]
          },
          "return_url": {
            "type": "string",
            "title": "Return URL",
            "description": "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_method": {
            "type": "string",
            "title": "Authentication Method",
            "description": "UPI Autopay authentication method. Specifies how the customer authorizes the enrollment mandate. Defaults to 'vpa' if omitted.",
            "enum": [
              "vpa",
              "qr-code",
              "app-deep-links"
            ]
          },
          "store_billing_info": {
            "type": "boolean",
            "description": "Whether to store this billing info onto its associated account. Defaults to `true`."
          }
        }
      },
      "PaymentGatewayReferences": {
        "type": "object",
        "title": "Payment Gateway References Object",
        "description": "Array of Payment Gateway References, each a reference to a third-party gateway object of varying types.",
        "properties": {
          "token": {
            "type": "string",
            "title": "Token",
            "description": "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_type": {
            "type": "string",
            "title": "Reference Type",
            "description": "The type of reference token. The value can be omitted for gateways that only support one type of token.",
            "enum": [
              "stripe_confirmation_token",
              "upi_vpa"
            ]
          }
        }
      },
      "TransactionFraudInfo": {
        "type": "object",
        "title": "Fraud information",
        "readOnly": true,
        "properties": {
          "object": {
            "type": "string",
            "title": "Object type",
            "readOnly": true
          },
          "score": {
            "type": "integer",
            "title": "Kount score",
            "minimum": 1,
            "maximum": 99
          },
          "decision": {
            "title": "Kount decision",
            "maxLength": 10,
            "type": "string",
            "enum": [
              "approve",
              "decline",
              "escalate",
              "review"
            ]
          },
          "reference": {
            "type": "string",
            "title": "Kount transaction reference ID"
          },
          "risk_rules_triggered": {
            "type": "array",
            "title": "Risk Rules Triggered",
            "description": "A list of fraud risk rules that were triggered for the transaction.",
            "items": {
              "$ref": "#/components/schemas/FraudRiskRule"
            }
          }
        }
      },
      "FraudRiskRule": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "title": "The Kount rule number."
          },
          "message": {
            "type": "string",
            "title": "Description of why the rule was triggered"
          }
        }
      },
      "PaymentMethod": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "bacs",
              "amazon",
              "amazon_billing_agreement",
              "apple_pay",
              "apple_pay_merchant_token",
              "bank_account_info",
              "braintree_apple_pay",
              "check",
              "credit_card",
              "eft",
              "gateway_token",
              "google_pay",
              "google_pay_device_pan",
              "iban_bank_account",
              "money_order",
              "other",
              "paypal",
              "paypal_billing_agreement",
              "roku",
              "sepadirectdebit",
              "venmo",
              "wire_transfer",
              "braintree_v_zero",
              "boleto",
              "cash_app",
              "upi_autopay",
              "pix_automatico",
              "mercadopago",
              "klarna",
              "braintree_google_pay",
              "stripe_link"
            ]
          },
          "card_type": {
            "description": "Visa, MasterCard, American Express, Discover, JCB, etc.",
            "type": "string",
            "enum": [
              "American Express",
              "Dankort",
              "Diners Club",
              "Discover",
              "ELO",
              "Forbrugsforeningen",
              "Hipercard",
              "JCB",
              "Laser",
              "Maestro",
              "MasterCard",
              "Test Card",
              "Union Pay",
              "Unknown",
              "Visa",
              "Tarjeta Naranja"
            ]
          },
          "first_six": {
            "type": "string",
            "description": "Credit card number's first six digits.\n\nFor a tokenized wallet payment (`apple_pay`, `google_pay`, or\n`google_pay_device_pan`), this is the DPAN's (the wallet/device token's own\nnumber) first six digits, not the underlying card's (FPAN).\n",
            "maxLength": 6
          },
          "last_four": {
            "type": "string",
            "description": "Credit card number's last four digits. Will refer to bank account if payment\nmethod is ACH.\n\nFor a tokenized wallet payment (`apple_pay`, `google_pay`, or\n`google_pay_device_pan`), this is the DPAN's last four digits, not the\nunderlying card's (FPAN).\n",
            "maxLength": 4
          },
          "last_two": {
            "type": "string",
            "description": "The IBAN bank account's last two digits.",
            "maxLength": 2
          },
          "exp_month": {
            "type": "integer",
            "description": "Expiration month.",
            "maxLength": 2
          },
          "exp_year": {
            "type": "integer",
            "description": "Expiration year.",
            "maxLength": 4
          },
          "gateway_token": {
            "type": "string",
            "description": "A token used in place of a credit card in order to perform transactions.",
            "maxLength": 50
          },
          "cc_bin_country": {
            "type": "string",
            "description": "The 2-letter ISO 3166-1 alpha-2 country code associated with the card's issuer, if known."
          },
          "funding_source": {
            "description": "The funding source of the card, if known.",
            "type": "string",
            "enum": [
              "credit",
              "debit",
              "charge",
              "prepaid",
              "deferred_debit"
            ]
          },
          "gateway_code": {
            "type": "string",
            "description": "An identifier for a specific payment gateway.",
            "maxLength": 13
          },
          "gateway_attributes": {
            "type": "object",
            "description": "Gateway specific attributes associated with this PaymentMethod",
            "x-class-name": "GatewayAttributes",
            "properties": {
              "account_reference": {
                "type": "string",
                "description": "Used by Adyen and Braintree gateways. For Adyen the Shopper Reference value used when the external token was created. For Braintree the PayPal PayerID is populated in the response.",
                "maxLength": 264
              }
            }
          },
          "card_network_preference": {
            "description": "Represents the card network preference associated with the billing info for dual badged cards. Must be a supported card network.",
            "type": "string",
            "enum": [
              "Bancontact",
              "CartesBancaires",
              "Dankort",
              "MasterCard",
              "Visa"
            ]
          },
          "billing_agreement_id": {
            "type": "string",
            "description": "Billing Agreement identifier. Only present for Amazon or Paypal payment methods."
          },
          "name_on_account": {
            "type": "string",
            "description": "The name associated with the bank account."
          },
          "account_type": {
            "description": "The bank account type. Only present for ACH payment methods.",
            "type": "string",
            "enum": [
              "checking",
              "savings"
            ]
          },
          "routing_number": {
            "type": "string",
            "description": "The bank account's routing number. Only present for ACH payment methods."
          },
          "routing_number_bank": {
            "type": "string",
            "description": "The bank name of this routing number."
          },
          "username": {
            "type": "string",
            "description": "Username of the associated payment method. Currently only associated with Venmo."
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "type": {
            "title": "Type",
            "type": "string",
            "enum": [
              "bad_request",
              "immutable_subscription",
              "internal_server_error",
              "invalid_api_key",
              "invalid_api_version",
              "invalid_content_type",
              "invalid_permissions",
              "invalid_token",
              "missing_feature",
              "not_found",
              "rate_limited",
              "service_not_available",
              "simultaneous_request",
              "tax_service_error",
              "transaction",
              "unauthorized",
              "unavailable_in_api_version",
              "unknown_api_version",
              "validation"
            ]
          },
          "message": {
            "type": "string",
            "title": "Message"
          },
          "params": {
            "type": "array",
            "title": "Parameter specific errors",
            "items": {
              "type": "object",
              "properties": {
                "param": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "ErrorMayHaveTransaction": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Error"
          },
          {
            "type": "object",
            "properties": {
              "transaction_error": {
                "type": "object",
                "x-class-name": "TransactionError",
                "title": "Transaction error details",
                "description": "This is only included on errors with `type=transaction`.",
                "properties": {
                  "object": {
                    "type": "string",
                    "title": "Object type"
                  },
                  "transaction_id": {
                    "type": "string",
                    "title": "Transaction ID",
                    "maxLength": 13
                  },
                  "category": {
                    "title": "Category",
                    "type": "string",
                    "enum": [
                      "three_d_secure_required",
                      "three_d_secure_action_required",
                      "amazon",
                      "api_error",
                      "approved",
                      "communication",
                      "configuration",
                      "duplicate",
                      "fraud",
                      "hard",
                      "invalid",
                      "not_enabled",
                      "not_supported",
                      "recurly",
                      "referral",
                      "skles",
                      "soft",
                      "unknown"
                    ]
                  },
                  "code": {
                    "title": "Code",
                    "type": "string",
                    "enum": [
                      "ach_cancel",
                      "ach_chargeback",
                      "ach_credit_return",
                      "ach_exception",
                      "ach_return",
                      "ach_transactions_not_supported",
                      "ach_validation_exception",
                      "amazon_amount_exceeded",
                      "amazon_declined_review",
                      "amazon_invalid_authorization_status",
                      "amazon_invalid_close_attempt",
                      "amazon_invalid_create_order_reference",
                      "amazon_invalid_order_status",
                      "amazon_not_authorized",
                      "amazon_order_not_modifiable",
                      "amazon_transaction_count_exceeded",
                      "api_error",
                      "approved",
                      "approved_fraud_review",
                      "authorization_already_captured",
                      "authorization_amount_depleted",
                      "authorization_expired",
                      "batch_processing_error",
                      "billing_agreement_already_accepted",
                      "billing_agreement_not_accepted",
                      "billing_agreement_not_found",
                      "billing_agreement_replaced",
                      "call_issuer",
                      "call_issuer_update_cardholder_data",
                      "cancelled",
                      "cannot_refund_unsettled_transactions",
                      "card_not_activated",
                      "card_type_not_accepted",
                      "cardholder_requested_stop",
                      "contact_gateway",
                      "contract_not_found",
                      "currency_not_supported",
                      "customer_canceled_transaction",
                      "cvv_required",
                      "declined",
                      "declined_card_number",
                      "declined_exception",
                      "declined_expiration_date",
                      "declined_missing_data",
                      "declined_saveable",
                      "declined_security_code",
                      "deposit_referenced_chargeback",
                      "direct_debit_type_not_accepted",
                      "duplicate_transaction",
                      "exceeds_daily_limit",
                      "exceeds_max_amount",
                      "expired_card",
                      "finbot_disconnect",
                      "finbot_unavailable",
                      "fraud_address",
                      "fraud_address_recurly",
                      "fraud_advanced_verification",
                      "fraud_gateway",
                      "fraud_generic",
                      "fraud_ip_address",
                      "fraud_manual_decision",
                      "fraud_risk_check",
                      "fraud_security_code",
                      "fraud_stolen_card",
                      "fraud_too_many_attempts",
                      "fraud_velocity",
                      "gateway_account_setup_incomplete",
                      "gateway_error",
                      "gateway_rate_limited",
                      "gateway_timeout",
                      "gateway_token_not_found",
                      "gateway_unavailable",
                      "gateway_validation_exception",
                      "insufficient_funds",
                      "invalid_account_number",
                      "invalid_amount",
                      "invalid_billing_agreement_status",
                      "invalid_card_number",
                      "invalid_data",
                      "invalid_email",
                      "invalid_gateway_access_token",
                      "invalid_gateway_configuration",
                      "invalid_issuer",
                      "invalid_login",
                      "invalid_merchant_type",
                      "invalid_name",
                      "invalid_payment_method",
                      "invalid_payment_method_hard",
                      "invalid_transaction",
                      "issuer_unavailable",
                      "lifecycle_decline",
                      "merch_max_transaction_limit_exceeded",
                      "moneybot_disconnect",
                      "moneybot_unavailable",
                      "no_billing_information",
                      "no_gateway",
                      "no_gateway_found_for_transaction_amount",
                      "partial_approval",
                      "partial_credits_not_supported",
                      "payer_authentication_rejected",
                      "payment_cannot_void_authorization",
                      "payment_not_accepted",
                      "paypal_account_issue",
                      "paypal_cannot_pay_self",
                      "paypal_declined_use_alternate",
                      "paypal_expired_reference_id",
                      "paypal_hard_decline",
                      "paypal_invalid_billing_agreement",
                      "paypal_primary_declined",
                      "processor_not_available",
                      "processor_unavailable",
                      "recurly_credentials_not_found",
                      "recurly_error",
                      "recurly_failed_to_get_token",
                      "recurly_token_mismatch",
                      "recurly_token_not_found",
                      "reference_transactions_not_enabled",
                      "restricted_card",
                      "restricted_card_chargeback",
                      "rjs_token_expired",
                      "roku_invalid_card_number",
                      "roku_invalid_cib",
                      "roku_invalid_payment_method",
                      "roku_zip_code_mismatch",
                      "simultaneous",
                      "ssl_error",
                      "temporary_hold",
                      "three_d_secure_action_required",
                      "three_d_secure_action_result_token_mismatch",
                      "three_d_secure_authentication",
                      "three_d_secure_connection_error",
                      "three_d_secure_credential_error",
                      "three_d_secure_not_supported",
                      "too_busy",
                      "too_many_attempts",
                      "total_credit_exceeds_capture",
                      "transaction_already_refunded",
                      "transaction_already_voided",
                      "transaction_cannot_be_authorized",
                      "transaction_cannot_be_refunded",
                      "transaction_cannot_be_refunded_currently",
                      "transaction_cannot_be_voided",
                      "transaction_failed_to_settle",
                      "transaction_not_found",
                      "transaction_service_v2_disconnect",
                      "transaction_service_v2_unavailable",
                      "transaction_settled",
                      "transaction_stale_at_gateway",
                      "try_again",
                      "unknown",
                      "unmapped_partner_error",
                      "vaultly_service_unavailable",
                      "zero_dollar_auth_not_supported"
                    ]
                  },
                  "decline_code": {
                    "title": "Decline code",
                    "type": "string",
                    "enum": [
                      "account_closed",
                      "call_issuer",
                      "card_not_activated",
                      "card_not_supported",
                      "cardholder_requested_stop",
                      "do_not_honor",
                      "do_not_try_again",
                      "exceeds_daily_limit",
                      "generic_decline",
                      "expired_card",
                      "fraudulent",
                      "insufficient_funds",
                      "incorrect_address",
                      "incorrect_security_code",
                      "invalid_amount",
                      "invalid_number",
                      "invalid_transaction",
                      "issuer_unavailable",
                      "lifecycle_decline",
                      "lost_card",
                      "pickup_card",
                      "policy_decline",
                      "restricted_card",
                      "restricted_card_chargeback",
                      "security_decline",
                      "stolen_card",
                      "try_again",
                      "update_cardholder_data",
                      "requires_3d_secure"
                    ]
                  },
                  "message": {
                    "type": "string",
                    "title": "Customer message"
                  },
                  "merchant_advice": {
                    "type": "string",
                    "title": "Merchant message"
                  },
                  "three_d_secure_action_token_id": {
                    "type": "string",
                    "title": "3-D Secure action token id",
                    "description": "Returned when 3-D Secure authentication is required for a transaction. Pass this value to Recurly.js so it can continue the challenge flow.",
                    "maxLength": 22
                  },
                  "fraud_info": {
                    "$ref": "#/components/schemas/TransactionFraudInfo"
                  }
                }
              }
            }
          }
        ]
      }
    }
  }
}
````

# Sibling pages

* [Get the list of billing information associated with an account](https://docs.recurly.com/recurly-subscriptions/v2021-02-25/reference/list_billing_infos.md)
* [Fetch a billing info](https://docs.recurly.com/recurly-subscriptions/v2021-02-25/reference/get_a_billing_info.md)
* [Update an account's billing information](https://docs.recurly.com/recurly-subscriptions/v2021-02-25/reference/update_a_billing_info.md)
* [Remove an account's billing information](https://docs.recurly.com/recurly-subscriptions/v2021-02-25/reference/remove_a_billing_info.md)
* [Verify a billing information's credit card](https://docs.recurly.com/recurly-subscriptions/v2021-02-25/reference/verify_billing_infos.md)
* [Verify a billing information's credit card cvv](https://docs.recurly.com/recurly-subscriptions/v2021-02-25/reference/verify_billing_infos_cvv.md)