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 '{
  "billingInterval": "<string>",
  "currency": "<string>",
  "defaultTaxCode": "<string>",
  "defaultTaxRate": 123,
  "description": "<string>",
  "invoiceDisplayName": "<string>",
  "name": "<string>",
  "prices": [
    "<string>"
  ],
  "taxBehavior": "exclusive"
}'
{
  "id": "plan_f3g4h5i6j7k8l9m0",
  "object": "plan",
  "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",
  "price": "1999000000000",
  "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

Body

application/json
billingInterval
string

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

currency
string

Three-letter ISO 4217 currency code for plan pricing. Sample values: 'USD' for US dollars, 'EUR' for euros, 'GBP' for British pounds

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

taxBehavior
enum<string>

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

Available options:
exclusive,
inclusive

Response

Plan updated successfully

id
string

Unique identifier for a plan

object
enum<string>
Available options:
plan
billingInterval
string
createdAt
string<date-time>
currency
string
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
merchantId
string

The merchant organization that owns this plan

name
string
paymentTerm
object
prices
object[]
productId
string

The product this plan belongs to

taxBehavior
enum<string>

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

Available options:
exclusive,
inclusive
updatedAt
string<date-time>
walletNamespaceId
string

Unique identifier for a wallet namespace