---
updatedAt: 2026-05-05T19:53:57.000Z
agentTools:
  siteIndex: https://docs.recurly.com/llms.txt
  projectIndex: https://docs.recurly.com/recurly-subscriptions/v2021-02-25/llms.txt
---

# Redact an account (GDPR Right to Erasure)

Permanently and irreversibly removes all personally identifiable information (PII) from an account to fulfill a data subject's right to erasure under GDPR and similar privacy regulations (e.g. CCPA). This includes billing information, shipping addresses, and transaction details such as names, email addresses, and payment card data. The underlying account and transaction records are retained for financial and audit purposes, but all personal data fields are cleared. The account must have no active subscriptions, uninvoiced charges, or partially paid invoices before it can be redacted. Redaction is processed asynchronously and cannot be undone.

# 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": "Account",
      "description": "Accounts are core to managing your customers inside of Recurly. The account object stores the entire Recurly history of your customer and acts as the entry point for working with a customer's billing information, subscription data, transactions, invoices and more."
    }
  ],
  "paths": {
    "/accounts/{account_id}/redact": {
      "parameters": [
        {
          "$ref": "#/components/parameters/account_id"
        }
      ],
      "put": {
        "tags": [
          "Account"
        ],
        "operationId": "redact_account",
        "x-product": [
          "recover"
        ],
        "summary": "Redact an account (GDPR Right to Erasure)",
        "description": "Permanently and irreversibly removes all personally identifiable information (PII) from an account to fulfill a data subject's right to erasure under GDPR and similar privacy regulations (e.g. CCPA). This includes billing information, shipping addresses, and transaction details such as names, email addresses, and payment card data. The underlying account and transaction records are retained for financial and audit purposes, but all personal data fields are cleared. The account must have no active subscriptions, uninvoiced charges, or partially paid invoices before it can be redacted. Redaction is processed asynchronously and cannot be undone.",
        "parameters": [
          {
            "$ref": "#/components/parameters/accept_header"
          }
        ],
        "responses": {
          "200": {
            "description": "Account has been accepted for redaction and will be processed asynchronously.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "422": {
            "description": "Account cannot be redacted. Common reasons include active subscriptions, uninvoiced charges, or partially paid invoices.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "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": {
      "Account": {
        "allOf": [
          {
            "$ref": "#/components/schemas/AccountReadOnly"
          },
          {
            "$ref": "#/components/schemas/AccountResponse"
          }
        ]
      },
      "AccountReadOnly": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 13,
            "readOnly": true
          },
          "object": {
            "type": "string",
            "title": "Object type",
            "readOnly": true
          },
          "state": {
            "description": "Accounts can be either active or inactive.",
            "readOnly": true,
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          },
          "hosted_login_token": {
            "type": "string",
            "description": "The unique token for automatically logging the account in to the hosted management pages. You may automatically log the user into their hosted management pages by directing the user to: `https://{subdomain}.recurly.com/account/{hosted_login_token}`.",
            "readOnly": true,
            "maxLength": 32
          },
          "shipping_addresses": {
            "type": "array",
            "description": "The shipping addresses on the account.",
            "items": {
              "$ref": "#/components/schemas/ShippingAddress"
            }
          },
          "has_live_subscription": {
            "type": "boolean",
            "description": "Indicates if the account has a subscription that is either active, canceled, future, or paused."
          },
          "has_active_subscription": {
            "type": "boolean",
            "description": "Indicates if the account has an active subscription."
          },
          "has_future_subscription": {
            "type": "boolean",
            "description": "Indicates if the account has a future subscription."
          },
          "has_canceled_subscription": {
            "type": "boolean",
            "description": "Indicates if the account has a canceled subscription."
          },
          "has_paused_subscription": {
            "type": "boolean",
            "description": "Indicates if the account has a paused subscription."
          },
          "has_past_due_invoice": {
            "type": "boolean",
            "description": "Indicates if the account has a past due invoice."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the account was created.",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the account was last changed.",
            "readOnly": true
          },
          "deleted_at": {
            "type": "string",
            "format": "date-time",
            "description": "If present, when the account was last marked inactive.",
            "readOnly": true
          }
        }
      },
      "AccountResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "The unique identifier of the account. This cannot be changed once the account is created.",
            "maxLength": 50,
            "readOnly": true
          },
          "username": {
            "type": "string",
            "description": "A secondary value for the account.",
            "maxLength": 255
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "The email address used for communicating with this customer. The customer will also use this email address to log into your hosted account management pages. This value does not need to be unique.",
            "maxLength": 255
          },
          "override_business_entity_id": {
            "type": "string",
            "title": "Override Business Entity ID",
            "description": "Unique ID to identify the business entity assigned to the account. Available when the `Multiple Business Entities` feature is enabled."
          },
          "preferred_locale": {
            "description": "Used to determine the language and locale of emails sent on behalf of the merchant to the customer.",
            "type": "string",
            "enum": [
              "da-DK",
              "de-CH",
              "de-DE",
              "en-AU",
              "en-CA",
              "en-GB",
              "en-IE",
              "en-NZ",
              "en-US",
              "es-ES",
              "es-MX",
              "es-US",
              "fi-FI",
              "fr-BE",
              "fr-CA",
              "fr-CH",
              "fr-FR",
              "hi-IN",
              "it-IT",
              "ja-JP",
              "ko-KR",
              "nl-BE",
              "nl-NL",
              "pl-PL",
              "pt-BR",
              "pt-PT",
              "ro-RO",
              "ru-RU",
              "sk-SK",
              "sv-SE",
              "tr-TR",
              "zh-CN"
            ]
          },
          "preferred_time_zone": {
            "type": "string",
            "example": "America/Los_Angeles",
            "description": "The [IANA time zone name](https://docs.recurly.com/docs/email-time-zones-and-time-stamps#supported-api-iana-time-zone-names) used to determine the time zone of emails sent on behalf of the merchant to the customer."
          },
          "cc_emails": {
            "type": "string",
            "description": "Additional email address that should receive account correspondence. These should be separated only by commas. These CC emails will receive all emails that the `email` field also receives.",
            "maxLength": 255
          },
          "first_name": {
            "type": "string",
            "maxLength": 255
          },
          "last_name": {
            "type": "string",
            "maxLength": 255
          },
          "company": {
            "type": "string",
            "maxLength": 50
          },
          "vat_number": {
            "type": "string",
            "description": "The VAT number of the account (to avoid having the VAT applied). This is only used for manually collected invoices.",
            "maxLength": 20
          },
          "tax_exempt": {
            "type": "boolean",
            "description": "The tax status of the account. `true` exempts tax on the account, `false` applies tax on the account."
          },
          "exemption_certificate": {
            "type": "string",
            "description": "The tax exemption certificate number for the account. If the merchant has an integration for the Vertex tax provider, this optional value will be sent in any tax calculation requests for the account.",
            "maxLength": 30
          },
          "external_accounts": {
            "type": "array",
            "description": "The external accounts belonging to this account",
            "items": {
              "$ref": "#/components/schemas/ExternalAccount"
            }
          },
          "parent_account_id": {
            "type": "string",
            "maxLength": 13,
            "description": "The UUID of the parent account associated with this account."
          },
          "bill_to": {
            "maxLength": 6,
            "description": "An enumerable describing the billing behavior of the account, specifically whether the account is self-paying or will rely on the parent account to pay.",
            "type": "string",
            "enum": [
              "parent",
              "self"
            ]
          },
          "dunning_campaign_id": {
            "type": "string",
            "title": "Dunning Campaign ID",
            "description": "Unique ID to identify a dunning campaign. Used to specify if a non-default dunning campaign should be assigned to this account. For sites without multiple dunning campaigns enabled, the default dunning campaign will always be used."
          },
          "invoice_template_id": {
            "type": "string",
            "title": "Invoice Template ID",
            "description": "Unique ID to identify an invoice template. Available when the site is on a Pro or Elite plan. Used to specify if a non-default invoice template will be used to generate invoices for the account. For sites without multiple invoice templates enabled, the default template will always be used."
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "billing_info": {
            "$ref": "#/components/schemas/BillingInfo"
          },
          "custom_fields": {
            "$ref": "#/components/schemas/CustomFields"
          },
          "entity_use_code": {
            "type": "string",
            "description": "The Avalara AvaTax value that can be passed to identify the customer type for tax purposes. The range of values can be A - R (more info at Avalara). Value is case-sensitive."
          },
          "bill_date": {
            "title": "Bill Date",
            "type": "string",
            "format": "date-time",
            "description": "The preferred billing date for the account. This date will be used as the billing date for when activating new subscriptions on the account."
          }
        }
      },
      "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
              }
            }
          }
        }
      },
      "CustomField": {
        "type": "object",
        "title": "Custom field",
        "properties": {
          "name": {
            "type": "string",
            "title": "Field name",
            "description": "Fields must be created in the UI before values can be assigned to them.",
            "pattern": "/^[a-z0-9_-]+$/i",
            "maxLength": 50
          },
          "value": {
            "type": "string",
            "title": "Field value",
            "description": "Any values that resemble a credit card number or security code (CVV/CVC) will be rejected.",
            "maxLength": 255
          },
          "source_record_type": {
            "type": "string",
            "title": "Source record type",
            "description": "The type of record a custom field was automatically copied from.",
            "readOnly": true,
            "enum": [
              "account",
              "plan",
              "product",
              "subscription"
            ]
          },
          "source_record_id": {
            "type": "string",
            "title": "Source record ID",
            "description": "The UUID of the record this custom field was automatically copied from. Only present when the field was copied from another record.",
            "readOnly": true
          }
        },
        "required": [
          "name",
          "value"
        ]
      },
      "CustomFields": {
        "type": "array",
        "title": "Custom fields",
        "description": "The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.",
        "items": {
          "$ref": "#/components/schemas/CustomField"
        }
      },
      "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"
            ]
          }
        }
      },
      "ShippingAddress": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "title": "Shipping Address ID",
            "maxLength": 13,
            "readOnly": true
          },
          "object": {
            "type": "string",
            "title": "Object type",
            "readOnly": true
          },
          "account_id": {
            "type": "string",
            "title": "Account ID",
            "maxLength": 13,
            "readOnly": true
          },
          "nickname": {
            "type": "string",
            "maxLength": 255
          },
          "first_name": {
            "type": "string",
            "maxLength": 255
          },
          "last_name": {
            "type": "string",
            "maxLength": 255
          },
          "company": {
            "type": "string",
            "maxLength": 255
          },
          "email": {
            "type": "string",
            "maxLength": 255
          },
          "vat_number": {
            "type": "string",
            "maxLength": 20
          },
          "phone": {
            "type": "string",
            "maxLength": 30
          },
          "street1": {
            "type": "string",
            "maxLength": 255
          },
          "street2": {
            "type": "string",
            "maxLength": 255
          },
          "city": {
            "type": "string",
            "maxLength": 255
          },
          "region": {
            "type": "string",
            "maxLength": 255,
            "description": "State or province."
          },
          "postal_code": {
            "type": "string",
            "maxLength": 20,
            "description": "Zip or postal code."
          },
          "country": {
            "type": "string",
            "maxLength": 50,
            "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."
          },
          "created_at": {
            "type": "string",
            "title": "Created at",
            "format": "date-time",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "title": "Updated at",
            "format": "date-time",
            "readOnly": true
          }
        }
      },
      "ExternalAccount": {
        "type": "object",
        "title": "External Account",
        "properties": {
          "object": {
            "type": "string",
            "default": "external_account"
          },
          "id": {
            "type": "string",
            "description": "UUID of the external_account ."
          },
          "external_account_code": {
            "type": "string",
            "description": "Represents the account code for the external account."
          },
          "external_connection_type": {
            "type": "string",
            "description": "Represents the connection type. One of the connection types of your enabled App Connectors"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Created at",
            "readOnly": true
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Last updated at",
            "readOnly": true
          }
        }
      },
      "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"
                }
              }
            }
          }
        }
      }
    }
  }
}
````

# Sibling pages

* [List a site's accounts](https://docs.recurly.com/recurly-subscriptions/v2021-02-25/reference/list_accounts.md)
* [Create an account](https://docs.recurly.com/recurly-subscriptions/v2021-02-25/reference/create_account.md)
* [Fetch an account](https://docs.recurly.com/recurly-subscriptions/v2021-02-25/reference/get_account.md)
* [Update an account](https://docs.recurly.com/recurly-subscriptions/v2021-02-25/reference/update_account.md)
* [Deactivate an account](https://docs.recurly.com/recurly-subscriptions/v2021-02-25/reference/deactivate_account.md)
* [Reactivate an inactive account](https://docs.recurly.com/recurly-subscriptions/v2021-02-25/reference/reactivate_account.md)
* [Fetch an account's balance and past due status](https://docs.recurly.com/recurly-subscriptions/v2021-02-25/reference/get_account_balance.md)
* [List the external invoices on an account](https://docs.recurly.com/recurly-subscriptions/v2021-02-25/reference/list_account_external_invoices.md)
* [List an account's child accounts](https://docs.recurly.com/recurly-subscriptions/v2021-02-25/reference/list_child_accounts.md)
* [List an invoice template's associated accounts](https://docs.recurly.com/recurly-subscriptions/v2021-02-25/reference/list_invoice_template_accounts.md)
* [List entitlements granted to an account](https://docs.recurly.com/recurly-subscriptions/v2021-02-25/reference/list_entitlements.md)
* [List an account's external subscriptions](https://docs.recurly.com/recurly-subscriptions/v2021-02-25/reference/list_account_external_subscriptions.md)