v1

latestOpenAPI 3.1.02026-07-24770322.0 KB

Retrieve Subscription

This API endpoint retrieves a specific subscription.

get/v1/subscriptions/{id}

Path parameters

idstring required

The unique ID of the subscription you want to retrieve.

Response

200

idstring
objectstring
createdAtstring
collectionMethodstring
statusstring
recipientIdstring
clientIdstring
companyIdstring
memostring
taxPercentagenumber
currencystring
intervalstring
intervalCountinteger
daysUntilDueinteger
canceledAtstring
updatedAtstring

Example response

{
  "id": "sub_01HN4V8K5P7RNQJ6MGXKDZ8T2W",
  "object": "subscription",
  "createdAt": "2024-02-21T15:31:16.789Z",
  "collectionMethod": "sendInvoice",
  "status": "active",
  "recipientId": "d0000000-d7a5-473d-a75b-9821a8f4e180",
  "clientId": "d0000000-d7a5-473d-a75b-9821a8f4e180",
  "companyId": "d0000000-d7a5-473d-a75b-9821a8f4e180",
  "memo": "Monthly service subscription",
  "taxPercentage": 8.5,
  "currency": "USD",
  "interval": "month",
  "intervalCount": 1,
  "daysUntilDue": 30,
  "canceledAt": "2024-02-21T15:31:16.789Z",
  "paymentPreferences": {
    "allowedPaymentMethodTypes": [
      "creditCard"
    ],
    "absorbTransactionFee": [
      {
        "type": "creditCard"
      }
    ]
  },
  "lineItems": [
    {
      "priceId": "K5P7RNQJ6",
      "productId": "d0000000-d7a5-473d-a75b-9821a8f4e191",
      "description": "Professional Plan",
      "quantity": 1
    }
  ]
}