POST
/
plans
Create a new plan
curl --request POST \
  --url https://api.paygentic.io/v0/plans \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "invoiceDisplayName": "<string>",
  "description": "<string>",
  "billingInterval": "<string>",
  "currency": "<string>",
  "merchantId": "<string>",
  "productId": "<string>",
  "tax": {},
  "prices": [
    "<string>"
  ],
  "price": "<string>",
  "paymentOptions": {
    "outOfBand": true,
    "payAsYouGo": true,
    "prePaid": false,
    "postPaid": false,
    "credits": ""
  }
}'
{
  "id": "<string>",
  "object": "plan",
  "name": "<string>",
  "paymentOptions": {
    "outOfBand": true,
    "payAsYouGo": true,
    "prePaid": false,
    "postPaid": false,
    "credits": ""
  },
  "invoiceDisplayName": "<string>",
  "description": "<string>",
  "billingInterval": "<string>",
  "currency": "<string>",
  "merchantId": "<string>",
  "productId": "<string>",
  "walletNamespaceId": "<string>",
  "tax": {},
  "prices": [
    {
      "id": "<string>",
      "object": "price",
      "billableMetricId": "<string>",
      "model": "standard",
      "invoiceDisplayName": "<string>",
      "properties": {},
      "description": "<string>",
      "unitAmount": "<string>",
      "currency": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "deletedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key authentication

Body

application/json
name
string
required

Name of the plan

merchantId
string
required

The merchant organization that will own this plan

invoiceDisplayName
string

Display name for invoices

description
string

Description of the plan

billingInterval
string

Billing interval for the plan

currency
string

Currency for the plan

productId
string

The product this plan belongs to

tax
object

Tax configuration for the plan

prices
string[]

Array of price IDs to associate with this plan

Unique identifier for a price

price
string

Price as a decimal string (e.g., '10.99')

paymentOptions
object

Payment options for the plan, pre/post paid, pay as you go, outOfBand payments.

Response

Plan created successfully

id
string

Unique identifier for a plan

object
enum<string>
Available options:
plan
name
string
paymentOptions
object

Payment options for the plan, pre/post paid, pay as you go, outOfBand payments.

invoiceDisplayName
string
description
string
billingInterval
string
currency
string
merchantId
string

The merchant organization that owns this plan

productId
string

The product this plan belongs to

walletNamespaceId
string

Unique identifier for a wallet namespace

tax
object
prices
object[]
createdAt
string<date-time>
updatedAt
string<date-time>
deletedAt
string<date-time>