Skip to main content
Retrieves details about a specific payment plan by its ID.

Example Usage

const plan = await payments.getPlan(planId)

Response

{
  "planId": "string",
  "metadata": {
    "name": "string",
    "description": "string"
  },
  "price": {
    "priceType": "FIXED_PRICE",
    "tokenAddress": "string",
    "amounts": ["number"],
    "receivers": ["string"]
  },
  "credits": {
    "creditsType": "FIXED",
    "amount": "number",
    "minAmount": "number",
    "maxAmount": "number",
    "durationOfThePlan": "number"
  },
  "nftAddress": "string?"
}

Notes

  • This endpoint is used to display details to a subscriber before they purchase
  • Returns pricing structure, credit limits, and metadata