Retrieve Plan

GET/subscriptions/plans/{plan_id}

Header Parameters

X-Account-Codestringrequired

The account_id found in your WHITELABEL Dashboard (UUID). Required — omitting it returns 400 BAD_REQUEST (“Invalid x-account-code header.”).

Path Parameters

plan_idstringrequired

The unique identifier of the plan.

Response

200

idstring
account_idstring
namestring
descriptionstring
merchant_referencestring
statusstring
base_amountobject
Show base_amount properties
currencystring
valuenumber
frequencyobject
Show frequency properties
typestring
valueinteger
country_pricesobject[]
Show country_prices properties
countrystring
amountobject
Show amount properties
currencystring
valuenumber
allowed_payment_methodsstring[]
metadataobject[]
phasesobject[]
created_atstring
updated_atstring
account_idsstring[]

Every account the plan is available on. Always returned; contains account_id when the plan is scoped to a single account.

retriesobject

The retry configuration subscriptions created from this plan inherit. null when the plan sets none.

retry_splitobject

The Smart Retries A/B split configuration attached to this plan. null when none is set.

metersobject[]

The metered prices attached to this plan. Empty when the plan has no usage-based pricing; see Attach Meter to Plan.

404

codestring
messagesstring[]
Request
curl -X GET "https://api-sandbox.whitelabel.com/v1/subscriptions/plans/<plan_id>" \
  -H "X-Account-Code: <X-Account-Code>" \
  -H "public-api-key: <public-api-key>" \
  -H "private-secret-key: <private-secret-key>"
Response
{
  "id": "string",
  "account_id": "string",
  "name": "string",
  "description": "string",
  "merchant_reference": "string",
  "status": "string",
  "base_amount": {
    "currency": "string",
    "value": 0
  },
  "frequency": {
    "type": "string",
    "value": 0
  },
  "country_prices": [
    {
      "country": "string",
      "amount": {
        "currency": "string",
        "value": 0
      }
    }
  ],
  "allowed_payment_methods": [
    "string"
  ],
  "metadata": [
    {}
  ],
  "phases": [
    {}
  ],
  "created_at": "string",
  "updated_at": "string",
  "account_ids": [
    "string"
  ],
  "retries": {},
  "retry_split": {},
  "meters": [
    {}
  ]
}