Create Plan

POST/ps/api/v1/public/plans

Creates a new subscription plan that serves as a reusable template defining the pricing structure, billing frequency, and payment terms. Plans must be created before subscriptions can be set up.

Requires Bearer token. Get token →

Request Body

NameTypeDescription
plan_name
stringrequired

Subscription plan name.

plan_description
string

Corresponding description for a plan.

frequency
Day | Week | Month | Year | Bi-Monthly | Quarterly | Half-Yearly | AS | OT | Not Applicablerequired

Frequency of recurring transactions for this particular plan.

DayWeekMonthYearBi-MonthlyQuarterlyHalf-YearlyASOTNot Applicable
amount
objectrequired

Monetary amount with currency for subscription-related APIs.

value
integerrequired

Amount in the smallest currency unit (paisa for INR). Minimum ₹1 (100), maximum ₹10 lakh (100000000).

currency
stringrequired

Three-letter ISO 4217 currency code.

max_limit_amount
objectrequired

Monetary amount with currency for subscription-related APIs.

value
integerrequired

Amount in the smallest currency unit (paisa for INR). Minimum ₹1 (100), maximum ₹10 lakh (100000000).

currency
stringrequired

Three-letter ISO 4217 currency code.

initial_debit_amount
object

Monetary amount with currency for subscription-related APIs.

value
integerrequired

Amount in the smallest currency unit (paisa for INR). Minimum ₹1 (100), maximum ₹10 lakh (100000000).

currency
stringrequired

Three-letter ISO 4217 currency code.

trial_period_in_days
integer

Duration of the trial period in days.

start_date
string

The ISO 8601 UTC Timestamp when the subscription plan is active and available for use.

end_date
stringrequired

The ISO 8601 UTC Timestamp when the subscription plan expires.

merchant_metadata
object

Key-value pairs for additional information. Max 10 pairs, 256 chars each.

merchant_plan_reference
stringrequired

Idempotency Key. Unique identifier of the merchant plan reference. Duplicate requests with the same merchant_plan_reference will return the existing plan instead of creating a new one.

auto_debit_ot
string

Indicates whether auto-debit is enabled for one-time payments under the subscription plan.

Status Codes

201Plan created successfully.
400
422Unprocessable Entity — validation failed or duplicate request.
500
Request
curl --request POST \
  --url https://pluraluat.v2.pinepg.in/ps/api/v1/public/plans \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "plan_name": "Monthly Plan",
  "plan_description": "Diwali dhammaka plan intended to attract customers on diwali time",
  "frequency": "Month",
  "amount": {
    "value": 1000,
    "currency": "INR"
  },
  "max_limit_amount": {
    "value": 1000,
    "currency": "INR"
  },
  "initial_debit_amount": {
    "value": 1000,
    "currency": "INR"
  },
  "trial_period_in_days": 0,
  "start_date": "2022-02-01T17:32:28Z",
  "end_date": "2026-10-21T12:02:28Z",
  "merchant_metadata": {
    "key1": "DD"
  },
  "merchant_plan_reference": "1234567890",
  "auto_debit_ot": "false"
}'

Run this request

New chat
Responses are generated using AI and may contain mistakes.
Hi! I'm Pine, your AI developer assistant. Ask me anything about Pine Labs APIs, integrations, or troubleshooting.

Tip: you can create a new chat with ⌘ + E