# Retrieve Subscription

**GET** `/subscriptions/{subscription_id}`

Base URL: `https://api-sandbox.whitelabel.com/v1`

Retrieve Subscription

## Authorization

- public-api-key (apiKey in header)
- private-secret-key (apiKey in header)

## Path parameters

- `subscription_id` (string, required)
  The unique identifier of the subscription.

## Responses

### 200

200

- `id` (string)
- `name` (string)
- `description` (string)
- `account_id` (string)
- `country` (string)
  The subscription's country (ISO 3166-1 alpha-2).
- `merchant_reference` (string)
- `soft_descriptor` (string)
- `status` (string)
- `amount` (object)
  - `currency` (string)
  - `value` (number)
- `frequency` (object)
  - `type` (string)
  - `value` (integer)
- `billing_cycles` (object)
  - `total` (integer)
  - `current` (integer)
  - `next_at` (string)
  - `scheduling_date` (string)
    When the debit instruction is handed to the Pix rail — `next_at` minus four days. Only present on `PIX_AUTOMATIC` subscriptions that WHITELABEL executes, and only where the four-day scheduling lead is enabled for the organization; absent, not `null`, otherwise. Read-only. See [Pix Automático](/docs/payment-features/subscriptions/pix-automatico#the-scheduling-date).
  - `paid` (integer)
    How many cycles have been paid so far. Distinct from `current`, which is the cycle being billed.
- `current_period_start` (string)
  Start of the billing period the subscription is currently in, one cadence before `current_period_end`. Inside a trial or any other plan phase it follows that phase's cadence. A terminal subscription (`CANCELED` or `COMPLETED`) keeps its final window rather than going null. Null only for a subscription with no recurring cadence. Always returned together with current_period_end.
- `current_period_end` (string)
  End of the billing period the subscription is currently in. Equal to billing_cycles.next_at. Always returned together with current_period_start.
- `billing_date` (object)
  Only present on subscriptions billed on a fixed date instead of a frequency; mutually exclusive with `frequency`.
  - `type` (string)
  - `day` (integer)
- `customer_payer` (object)
  - `id` (string)
- `payment_method` (object)
  - `type` (string)
  - `vaulted_token` (string)
  - `card` (object)
    - `installments` (integer)
    - `network_transaction_id` (string)
    - `usage` (string)
- `availability` (object)
  - `start_at` (string)
  - `finish_at` (string)
- `retries` (object)
  The retry policy applied when a recurring charge is declined. See [Retries](/docs/payment-features/subscriptions/retries).
  - `retry_on_decline` (boolean)
    Whether declined charges are retried at all.
  - `amount` (integer)
    How many retries a billing cycle gets. Capped by your environment's retry schedule length (6 in production).
  - `strategy` (string)
    How the timing of each retry is decided: `DEFAULT`, `SMART` or `CUSTOM_SCHEDULE`. Treat as open-ended — handle unrecognized values gracefully.
  - `schedule` (object[])
    The per-attempt schedule, only set when `strategy` is `CUSTOM_SCHEDULE`; `null` otherwise.
  - `stop_on_hard_decline` (boolean)
    When true, a hard decline stops the retries for the current billing cycle.
  - `cancel_on_exhausted_retries` (boolean)
    When true, the subscription is canceled once a cycle's retries end without a successful payment, with `cancellation_source` set to `RETRIES_EXHAUSTED`.
  - `profile` (string)
    The fixed retry ladder the subscription follows instead of the configurable schedule. Always `PIX_AUTOMATIC`. This field and the three below are only present on `PIX_AUTOMATIC` subscriptions that WHITELABEL executes; they are absent, not `null`, on every other payment method. See [Pix Automático](/docs/payment-features/subscriptions/pix-automatico#the-retry-ladder).
  - `max_attempts` (integer)
    How many retries the Pix ladder runs. Always 3, matching the `amount` reported for these subscriptions.
  - `min_gap_hours` (integer)
    Always 24 — the gap between the ladder's debit dates (`D`, `D+1`, `D+2`, `D+3`), not between dispatch attempts.
  - `until` (string)
    When the ladder stops — `billing_cycles.next_at` plus 7 days. Moves with `next_at` at every renewal.
- `trial_period` (object)
  - `billing_cycles` (integer)
  - `amount` (object)
    - `value` (number)
    - `currency` (string)
- `metadata` (object[])
  - `key` (string)
  - `value` (string)
- `additional_data` (object)
  The optional order enrichment sent at creation, echoed back. See [The Subscription Object](/reference/subscriptions/the-subscription-object) for its full shape.
- `initial_payment_validation` (boolean)
  Whether the subscription waited for its first payment to succeed before activating. `false` by default.
- `reason` (string)
  Free-form reason for the subscription's current status, when one was recorded; `null` otherwise.
- `renewal_notification_days` (integer)
  How many days before the next billing date the `subscription.close_to_renewal` webhook is sent. `null` means no renewal notification is sent.
- `payments` (string[])
- `subscription_agreement_id` (string)
- `cancellation_time` (string)
  When the subscription was canceled. Only set once it reaches `CANCELED`; `null` otherwise.
- `cancellation_source` (string)
  What triggered the cancellation: `MERCHANT`, `SYSTEM`, `PLAN_CHANGE` or `RETRIES_EXHAUSTED`. Only set once the subscription reaches `CANCELED`; `null` otherwise. Treat as open-ended — handle unrecognized values gracefully.
- `ending_time` (string)
  When the subscription completed or expired. Only set once it reaches `COMPLETED`; `null` otherwise.
- `plan_id` (string)
  Only present when the subscription is linked to a plan.
- `plan_assigned_at` (string)
  Only present on plan-linked subscriptions. The moment the plan was attached — at creation from a plan, migration onto a plan, or a plan change.
- `previous_subscription_id` (string)
  Only present when this subscription was created by a plan change (switching an existing subscription to a different plan).
- `phases` (object[])
  The linked plan's phase definitions, as the plan declares them — including the terminal `REGULAR` phase. Only present on plan-linked subscriptions whose plan has phases. This is the plan's own ladder, not this subscriber's snapshot: for what was pinned for this subscription at creation, use `billing_phases`.
  - `order` (integer)
  - `name` (string)
  - `type` (string)
    `TRIAL` or `REGULAR`.
  - `duration` (object)
    How long the phase lasts. `null` on the terminal `REGULAR` phase, which runs until the subscription ends.
    - `type` (string)
    - `value` (integer)
  - `frequency` (object)
    How often the phase bills. `null` on the terminal `REGULAR` phase, which bills at the plan's own frequency.
    - `type` (string)
    - `value` (integer)
  - `amount` (object)
    The phase price. `null` on the terminal `REGULAR` phase, whose price resolves from the plan at every billing.
    - `currency` (string)
    - `value` (number)
  - `total_payments` (integer)
  - `country_prices` (object[])
    Per-country overrides of the phase price, empty when the phase has none.
    - `country` (string)
    - `amount` (object)
      - `currency` (string)
      - `value` (number)
- `current_phase` (string)
  Only present on plan-linked subscriptions.
- `current_phase_end` (string)
  When the phase named by `current_phase` hands over to the next one — for a subscription in its trial, when it switches to the regular price. End of the last billing period the phase covers, so on the final period of a trial it equals `current_period_end`. Null for a subscription with no plan and for one that already left the phase ladder.
- `billing_phases` (object[])
  Only present on plan-linked subscriptions whose plan has phases. Contains the leading TRIAL phases only, snapshotted at creation — the terminal REGULAR phase is never included, since its price isn't pinned and instead resolves from the plan at every billing. `current_phase: "REGULAR"` is how you know the ladder is exhausted.
  - `order` (integer)
  - `type` (string)
    Always TRIAL — the terminal REGULAR phase is never in this array.
  - `name` (string)
  - `amount` (object)
    - `currency` (string)
    - `value` (number)
  - `frequency` (object)
    - `type` (string)
    - `value` (integer)
  - `start_cycle` (integer)
  - `end_cycle` (integer)
- `pending_plan_change` (object)
  The plan change scheduled for the next billing cycle, or null when none is pending. Schedule one with the `plan_change` block on Update Subscription.
  - `plan_id` (string)
    The identifier of the target plan.
  - `plan_name` (string)
    The name of the target plan.
  - `direction` ("UPGRADE" | "DOWNGRADE")
    Whether the target plan is an upgrade or a downgrade. Informational only.
  - `effective` ("NEXT_BILLING_CYCLE")
    When the change applies.
  - `phases_behavior` ("START_FROM_REGULAR" | "HONOR_PHASES")
    What happens when the target plan has phases.
  - `applies_at` (string)
    The billing event the change will take effect on — the subscription's next billing date.
  - `requested_at` (string)
    When the change was scheduled.
- `created_at` (string)
- `updated_at` (string)

Example:

```json
{
  "id": "7304911d-5df9-429e-8488-ad41abea1a4c",
  "name": "sub_001",
  "description": "streaming service",
  "account_id": "2404911d-5df9-429e-8488-ad41abea1a4b",
  "country": "US",
  "merchant_reference": "001_marzo_23",
  "soft_descriptor": "ACME SUBSCRIPTION",
  "status": "ACTIVE",
  "amount": {
    "currency": "USD",
    "value": 12100
  },
  "frequency": {
    "type": "MONTH",
    "value": 1
  },
  "billing_cycles": {
    "total": 10,
    "current": 2,
    "next_at": "2023-02-16T20:00:00.786342Z",
    "scheduling_date": "2026-11-27T00:00:00Z",
    "paid": 0
  },
  "current_period_start": "2023-01-16T20:00:00.912480Z",
  "current_period_end": "2023-02-16T20:00:00.786342Z",
  "billing_date": {
    "type": "DAY",
    "day": 2
  },
  "customer_payer": {
    "id": "3t04911d-5df9-429e-8488-ad41abea1a2c"
  },
  "payment_method": {
    "type": "CARD",
    "vaulted_token": "6104911d-5df9-429e-8488-ad41abea1a4b",
    "card": {
      "installments": 0,
      "network_transaction_id": "string",
      "usage": "FIRST"
    }
  },
  "availability": {
    "start_at": "2024-01-16T00:00:00.786342Z",
    "finish_at": "2024-05-26T20:00:00.786342Z"
  },
  "retries": {
    "retry_on_decline": true,
    "amount": 4,
    "strategy": "DEFAULT",
    "schedule": [
      {}
    ],
    "stop_on_hard_decline": true,
    "cancel_on_exhausted_retries": true,
    "profile": "PIX_AUTOMATIC",
    "max_attempts": 3,
    "min_gap_hours": 24,
    "until": "string"
  },
  "trial_period": {
    "billing_cycles": 1,
    "amount": {
      "value": 0,
      "currency": ""
    }
  },
  "metadata": [
    {
      "key": "sub_ext_id",
      "value": "AA001"
    }
  ],
  "additional_data": {},
  "initial_payment_validation": false,
  "reason": "merchant request",
  "renewal_notification_days": 3,
  "payments": [
    "5104911d-5df9-229e-8468-bd41abea1a4s"
  ],
  "subscription_agreement_id": "sa_6af2dfcd-44c0-4f16-a331-8bed3ed9c9fa",
  "cancellation_time": "2023-12-16T20:46:54.786342Z",
  "cancellation_source": "MERCHANT",
  "ending_time": "2024-12-16T20:46:54.786342Z",
  "plan_id": "00000000-0000-4000-8000-000000000001",
  "plan_assigned_at": "2023-12-16T20:46:54.786342Z",
  "previous_subscription_id": "string",
  "phases": [
    {
      "order": 0,
      "name": "string",
      "type": "string",
      "duration": {
        "type": "string",
        "value": 0
      },
      "frequency": {
        "type": "string",
        "value": 0
      },
      "amount": {
        "currency": "string",
        "value": 0
      },
      "total_payments": 0,
      "country_prices": [
        {
          "country": "string",
          "amount": {
            "currency": "string",
            "value": 0
          }
        }
      ]
    }
  ],
  "current_phase": "REGULAR",
  "current_phase_end": "2023-03-16T20:00:00.786342Z",
  "billing_phases": [
    {
      "order": 0,
      "type": "string",
      "name": "string",
      "amount": {
        "currency": "string",
        "value": 0
      },
      "frequency": {
        "type": "string",
        "value": 0
      },
      "start_cycle": 0,
      "end_cycle": 0
    }
  ],
  "pending_plan_change": {
    "plan_id": "1904911d-5df9-429e-8488-ad41abea1a4d",
    "plan_name": "Pro",
    "direction": "UPGRADE",
    "effective": "NEXT_BILLING_CYCLE",
    "phases_behavior": "START_FROM_REGULAR",
    "applies_at": "2023-02-16T20:00:00.786342Z",
    "requested_at": "2023-01-20T10:12:31.786342Z"
  },
  "created_at": "2023-12-16T20:46:54.786342Z",
  "updated_at": "2023-12-16T21:00:54.786342Z"
}
```

### 400

400