v1

latestOpenAPI 3.0.02026-07-26167441.9 MB

Retrieve Subscription

get/subscriptions/{subscription_id}

Path parameters

subscription_idstring required

The unique identifier of the subscription.

Response

200

idstring
namestring
descriptionstring
account_idstring
merchant_referencestring
soft_descriptorstring
statusstring
subscription_plan_idstring
paymentsstring[]
subscription_agreement_idstring
plan_idstring

Only present when the subscription is linked to a plan.

plan_assigned_atstring

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_idstring

Only present when this subscription was created by a plan change (switching an existing subscription to a different plan).

current_phasestring

Only present on plan-linked subscriptions.

created_atstring
updated_atstring

Example response

{
  "id": "7304911d-5df9-429e-8488-ad41abea1a4c",
  "name": "sub_001",
  "description": "streaming service",
  "account_id": "2404911d-5df9-429e-8488-ad41abea1a4b",
  "merchant_reference": "001_marzo_23",
  "soft_descriptor": "ACME SUBSCRIPTION",
  "status": "ACTIVE",
  "subscription_plan_id": "1904911d-5df9-429e-8488-ad41abea1a4d",
  "amount": {
    "currency": "USD",
    "value": 12100
  },
  "frequency": {
    "type": "MONTH",
    "value": 1
  },
  "billing_cycles": {
    "total": 10,
    "current": 2,
    "next_at": "2023-02-16T20:00:00.786342Z"
  },
  "customer_payer": {
    "id": "3t04911d-5df9-429e-8488-ad41abea1a2c"
  },
  "payment_method": [
    {
      "type": "CARD",
      "token": "9104911d-5df9-429e-8488-ad41abea1a4b",
      "vaulted_token": "6104911d-5df9-429e-8488-ad41abea1a4b",
      "card": {
        "card_data": {
          "number": "4507990000000010",
          "expiration_month": 10,
          "expiration_year": 2025,
          "security_code": 123,
          "holder_name": "JOHN DOE"
        }
      }
    }
  ],
  "availability": {
    "start_at": "2024-01-16T00:00:00.786342Z",
    "finish_at": "2024-05-26T20:00:00.786342Z"
  },
  "trial_period": {
    "billing_cycles": 1
  },
  "metadata": {
    "key": "sub_ext_id",
    "value": "AA001"
  },
  "payments": [
    "5104911d-5df9-229e-8468-bd41abea1a4s"
  ],
  "subscription_agreement_id": "sa_6af2dfcd-44c0-4f16-a331-8bed3ed9c9fa",
  "plan_id": "00000000-0000-4000-8000-000000000001",
  "plan_assigned_at": "2023-12-16T20:46:54.786342Z",
  "current_phase": "REGULAR",
  "created_at": "2023-12-16T20:46:54.786342Z",
  "updated_at": "2023-12-16T21:00:54.786342Z"
}