HomeProduct DocsAPI ReferenceChangelog
RecurlyAPI GuidesRecurly.jsWebhooksAPI ReferenceSupportBook demo
Product Docs

Data retention

Data Retention Settings lets site administrators automatically redact inactive account data on a schedule you control. You set independent retention windows for payment method data and full personally identifiable information (PII) — keeping you compliant with GDPR and similar regulations without any manual effort.
Available on all Recurly plans

Prerequisites

  • Site administrator permissions are required to configure Data Retention Settings
  • A site feature flag must be enabled — contact Recurly Support to request access

Limitations

  • Payment Method Retention and PII Retention periods must each be set between one and ten years
  • PII Retention must be equal to or longer than the Payment Method Retention period
  • Accounts with active subscriptions, open child accounts, unpaid invoices, or uninvoiced charges are excluded from redaction

Definition

Data Retention Settings is a site-level configuration feature that automatically redacts sensitive account data after a period of inactivity. It supports two independent retention windows — one for payment method data and one for full PII — giving you granular control over how long each data class is kept and when it's cleared.

Key benefits

Built-in compliance Automatically redact inactive account data to meet GDPR, CCPA, and other data minimization requirements — no manual intervention required.
Two independent retention windows Configure separate timelines for payment method data and full PII, so you can minimize data exposure at your own pace.
Smart exclusions Accounts with active subscriptions, unpaid invoices, or open child accounts are automatically protected from redaction until they're fully settled.
Webhook notifications Receive an account.redacted event every time an account is redacted, with a payload indicating exactly which data class was cleared.

Key details

Configuring retention periods

Navigate to Configuration → Data Retention Settings to configure retention periods for your site.

Data Retention Settings configuration screen
NoteAll changes to Data Retention Settings are recorded in the audit log.
FieldDescriptionConstraints
Payment Method RetentionHow long card and billing data is kept after account inactivity1–10 years
PII RetentionHow long full PII (name, email, address, and more) is kept after account inactivity1–10 years; must be equal to or longer than the Payment Method Retention period

How redaction works

Two-phase redaction

When PII Retention is set longer than Payment Method Retention, accounts pass through two sequential phases:

1

Payment method phase

Billing info is deleted and card fields are cleared from transactions. Account PII — name, email, and address — is preserved.

2

PII phase

After the additional gap elapses, full PII is redacted: name, email, address, and IP addresses are cleared from the account and all associated invoices.

If both retention periods are equal, redaction happens in a single pass.

Inactivity window

An account's "last active" date is whichever of the following is most recent:

  • The account's created_at date
  • The most recent transaction's created_at date
  • The most recent subscription renewal date
ImportantAccounts with active subscriptions, open child accounts, unpaid invoices, or uninvoiced charges are excluded from redaction until those conditions are resolved.

Redaction scope

Payment method redaction clears:

  • All billing info records
  • Card fields on transactions: card type, last four digits, expiry, BIN, and first six digits

PII redaction additionally clears:

  • Account fields: first and last name, email, company, address, VAT number, username, and IP addresses
  • All invoice and shipping addresses
  • Customer fields on transactions: customer IP, VAT, and tax-exempt certificate
  • Update-attribute activity metadata

Orphaned transactions

Transactions without an associated account — such as those from closed accounts — are processed separately by a dedicated cron job. The same retention rules apply directly to those transaction records.

Account activity

Redaction events appear in the account's activity log under the Redacted verb. Each entry indicates whether PII was cleared.

Webhooks

When an account is redacted, Recurly fires an account.redacted webhook. The payload includes the account data in its post-redaction state and a data_type field indicating whether payment_method or pii data was cleared.

JSON payload — account.redacted

{
  "id": "b18znuwra79d",
  "object_type": "account",
  "site_id": "9s2roxi35o2v",
  "event_type": "redacted",
  "event_time": "2026-04-15T20:00:00Z",
  "account_code": "abc123",
  "data_type": "payment_method"
}

XML payload — redacted_account_notification

<?xml version="1.0" encoding="UTF-8"?>
<redacted_account_notification>
  <account>
    <account_code>abc123</account_code>
    <username>jsmith</username>
    <email>[email protected]</email>
    <first_name>Jane</first_name>
    <last_name>Smith</last_name>
    <company_name>Acme Corp</company_name>
    <phone>555-1234</phone>
    <dunning_campaign_id nil="nil"/>
  </account>
  <data_retention>
    <data_type>payment_method</data_type>
  </data_retention>
</redacted_account_notification>

FAQs

Can I set the payment method and PII retention periods to the same length?

Yes. If both periods are equal, redaction happens in a single pass — payment method data and full PII are cleared at the same time.

What happens to transactions that don't have an associated account?

Orphaned transactions — such as those from closed accounts — are handled by a dedicated background job. The same retention rules apply directly to those transaction records.

Will accounts with open invoices be redacted?

No. Accounts with active subscriptions, open child accounts, unpaid invoices, or uninvoiced charges are excluded from redaction until those conditions are fully resolved.

How do I enable this feature?

Data Retention Settings requires a site feature flag. Contact Recurly Support to request access, then configure your retention periods at Configuration → Data Retention Settings.