Skip to main content
POST
/
v0
/
plans
Create
curl --request POST \
  --url https://api.paygentic.io/v0/plans \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "billingInterval": "<string>",
  "currency": "<string>",
  "defaultTaxCode": "eservice",
  "defaultTaxRate": 0,
  "description": "<string>",
  "invoiceDisplayName": "<string>",
  "merchantId": "<string>",
  "name": "<string>",
  "price": "<string>",
  "prices": [
    "<string>"
  ],
  "productId": "<string>",
  "taxBehavior": "exclusive"
}'
{
  "id": "plan_t9u0v1w2x3y4z5a6",
  "object": "plan",
  "billingInterval": "monthly",
  "createdAt": "2024-01-12T10:00:00Z",
  "currency": "USD",
  "defaultTaxCode": "eservice",
  "defaultTaxRate": 8.5,
  "description": "Claude API access with 500K tokens monthly allowance",
  "invoiceDisplayName": "LLM API Basic Plan",
  "merchantId": "org_b7c8d9e0f1g2h3i4",
  "name": "Basic Tier",
  "price": "49990000000",
  "prices": [
    "price_r3s4t5u6v7w8x9y0"
  ],
  "productId": "prod_j5k6l7m8n9o0p1q2",
  "taxBehavior": "exclusive",
  "updatedAt": "2024-01-12T10:00:00Z"
}

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json
merchantId
string
required

The merchant organization that will own this plan

name
string
required

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

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:eservice

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
default:0

Fallback tax rate percentage when automatic tax calculation fails. Sample values: 8.5 represents 8.5% tax, 10.0 represents 10% tax, 0 represents no tax

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'

price
string

Monthly subscription fee in decimal format. Sample values: '49.99' represents $49.99 per month, '0.00' indicates pure usage-based pricing with no base fee, '199.00' represents $199 monthly subscription

prices
string[]

Array of price IDs to associate with this plan

Unique identifier for a price

productId
string

The product this plan belongs to

taxBehavior
enum<string>
default:exclusive

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

Available options:
exclusive,
inclusive

Response

Plan created 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