Skip to main content
PATCH
/
v0
/
plans
/
{id}
Update
curl --request PATCH \
  --url https://api.paygentic.io/v0/plans/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "billingCadence": "P1M",
  "billingInterval": "monthly",
  "defaultTaxCode": "<string>",
  "defaultTaxRate": 123,
  "description": "<string>",
  "invoiceDisplayName": "<string>",
  "name": "<string>",
  "prices": [
    "<string>"
  ],
  "taxBehavior": "exclusive",
  "renewalReminderEnabled": true,
  "renewalReminderDays": 15
}
'
{
  "id": "plan_f3g4h5i6j7k8l9m0",
  "object": "plan",
  "billingCadence": "P1Y",
  "billingInterval": "yearly",
  "createdAt": "2024-01-20T09:00:00Z",
  "currency": "USD",
  "defaultTaxCode": "eservice",
  "defaultTaxRate": 8.5,
  "description": "Complete machine learning infrastructure with GPU access",
  "invoiceDisplayName": "ML Platform Enterprise",
  "merchantId": "org_n1o2p3q4r5s6t7u8",
  "name": "Enterprise Solution",
  "prices": [
    "price_d7e8f9g0h1i2j3k4"
  ],
  "productId": "prod_v9w0x1y2z3a4b5c6",
  "taxBehavior": "exclusive",
  "updatedAt": "2024-03-01T15:30:00Z"
}

Authorizations

Authorization
string
header
required

API key authentication

Path Parameters

id
string
required

The unique identifier of the plan Unique identifier for a plan

Pattern: ^plan_[a-zA-Z0-9]+$

Body

application/json
billingCadence
enum<string>

ISO 8601 duration for the billing period. Takes precedence over billingInterval when both are provided.

Available options:
P1M,
P3M,
P1Y
billingInterval
enum<string>

Recurring billing period frequency. Sample values: 'monthly' for monthly billing, 'quarterly' for quarterly billing, 'yearly' for annual billing

Available options:
monthly,
quarterly,
yearly,
annual
defaultTaxCode
string

Default tax code for plan line items. Common values: 'eservice' (electronically supplied services), 'saas' (software as a service), 'consulting', 'ebook', 'standard', 'reduced', 'exempt'. Full list available via GET /tax/codes endpoint.

defaultTaxRate
number

Fallback tax rate (as percentage) if automatic tax calculation is unavailable

description
string

Plan details explaining included features and limits. Sample values: 'Claude API access with 500K tokens monthly allowance', 'Unlimited cloud storage plus real-time analytics tools', 'Complete machine learning infrastructure with GPU access', 'Flexible usage-based pricing with no monthly commitment'

invoiceDisplayName
string

Plan name shown on billing statements. Sample values: 'LLM API Basic Plan', 'Data Warehouse Business', 'ML Platform Enterprise', 'Pay-Per-Use Model'

name
string

Plan identifier visible to customers. Sample values: 'Basic Tier', 'Business Package', 'Enterprise Solution', 'Metered Billing', 'Free Tier', 'Premium Access'

prices
string[]

Array of price IDs to associate with this plan

Unique identifier for a price

Pattern: ^price_[a-zA-Z0-9]+$
taxBehavior
enum<string>

Whether tax is added on top of the price (exclusive) or included in the price (inclusive)

Available options:
exclusive,
inclusive
renewalReminderEnabled
boolean

Whether to send renewal reminder emails to customers before their subscription renews

renewalReminderDays
integer

Number of days before renewal to send the reminder email

Required range: 1 <= x <= 30

Response

Plan updated successfully

id
string
required

Unique identifier for a plan

Pattern: ^plan_[a-zA-Z0-9]+$
object
enum<string>
required
Available options:
plan
billingCadence
enum<string>
default:P1M
required

ISO 8601 duration for the billing period.

Available options:
P1M,
P3M,
P1Y
billingInterval
string
required
deprecated

Deprecated. Human-readable billing period derived from billingCadence. Use billingCadence instead.

createdAt
string<date-time>
required
currency
string
required
merchantId
string
required

The merchant organization that owns this plan

Pattern: ^org_[a-zA-Z0-9]+$
name
string
required
productId
string
required

The product this plan belongs to

Pattern: ^prod_[a-zA-Z0-9]+$
updatedAt
string<date-time>
required
defaultTaxCode
string

Default tax code for plan line items. Common values: 'eservice' (electronically supplied services), 'saas' (software as a service), 'consulting', 'ebook', 'standard', 'reduced', 'exempt'. Full list available via GET /tax/codes endpoint.

defaultTaxRate
number

Fallback tax rate (as percentage) if automatic tax calculation is unavailable

deletedAt
string<date-time>
description
string
invoiceDisplayName
string
paymentTerm
object
prices
object[]
taxBehavior
enum<string>

Whether tax is added on top of the price (exclusive) or included in the price (inclusive)

Available options:
exclusive,
inclusive
walletNamespaceId
string

Unique identifier for a wallet namespace

renewalReminderEnabled
boolean

Whether renewal reminder emails are enabled for subscriptions using this plan

renewalReminderDays
integer

Number of days before renewal to send the reminder email

billingVersion
integer

Billing engine version. Managed by Paygentic support.