PATCH
/
plans
/
{id}
Update a plan
curl --request PATCH \
  --url https://api.paygentic.io/v0/plans/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "invoiceDisplayName": "<string>",
  "description": "<string>",
  "billingInterval": "<string>",
  "currency": "<string>",
  "tax": {},
  "prices": [
    "<string>"
  ]
}'
{
  "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

Path Parameters

id
string
required

The unique identifier of the plan

Body

application/json
name
string

Name of the 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

tax
object

Tax configuration for the plan

prices
string[]

Array of price IDs to associate with this plan

Unique identifier for a price

Response

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