Pine LabsDOCS

Update Plan

PATCH/ps/api/v1/public/plans/{plan_id}

Updates an existing subscription plan. Existing subscriptions under this plan will remain unaffected. The changes will apply only to new subscriptions created under this plan.

Requires Bearer token. Get token →

Path Parameters

NameTypeDescription
plan_id
stringrequired

Unique identifier for the subscription plan.

Request Body

NameTypeDescription
plan_name
string

Subscription plan name.

plan_description
string

Corresponding description for a plan.

amount
object

This is the recurring mandate amount, that would be charged for each frequency. For instance 200 every month. This field is not needed if the mandate frequency is AS

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
object

This is the recurring mandate amount, that would be charged for each frequency. For instance 200 every month. This field is not needed if the mandate frequency is AS

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.

end_date
string

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.

Response

NameTypeDescription
plan_id
string

Unique identifier for the subscription plan in the Pine Labs database.

status
string

Status of the plan.

  • ACTIVE: Plan creation completed and start time has passed.
  • INACTIVE: Plan is disabled or has exceeded its validity period.
  • CREATED: Plan creation completed but start time is in the future.
Allowed values:
ACTIVEINACTIVECREATED
plan_name
string

Subscription plan name.

plan_description
string

Corresponding description for a plan.

frequency
string

Frequency of recurring transactions for this particular plan.

Allowed values:
DayWeekMonthYearBi-MonthlyQuarterlyHalf-YearlyASOTNot Applicable
amount
object

This is the recurring mandate amount, that would be charged for each frequency. For instance 200 every month. This field is not needed if the mandate frequency is AS

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
object

This is the recurring mandate amount, that would be charged for each frequency. For instance 200 every month. This field is not needed if the mandate frequency is AS

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.

end_date
string

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
string

Unique identifier of the merchant plan reference.

created_at
stringnull

ISO 8601 UTC Timestamp when the create plan request was received.

modified_at
stringnull

ISO 8601 UTC Timestamp when the plan was last updated.

initial_debit_amount
object

This is the recurring mandate amount, that would be charged for each frequency. For instance 200 every month. This field is not needed if the mandate frequency is AS

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.

auto_debit_ot
string

Indicates whether auto-debit is enabled for one-time payments.

Status Codes

200Plan updated successfully.
400The request was malformed or missing required fields.
Request
curl --request PATCH \
  --url https://pluraluat.v2.pinepg.in/ps/api/v1/public/plans/%7Bplan_id%7D \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "plan_name": "Monthly Plan Updated",
  "plan_description": "Updated plan description",
  "amount": {
    "value": 1000,
    "currency": "INR"
  },
  "max_limit_amount": {
    "value": 1000,
    "currency": "INR"
  },
  "trial_period_in_days": 1,
  "end_date": "2026-10-21T12:02:28Z",
  "merchant_metadata": {
    "key1": "DD"
  }
}'

Run this request

plan_id
200 OK
{
  "plan_id": "v1-plan-4405071524-aa-qlAtAf",
  "status": "ACTIVE",
  "plan_name": "Monthly Plan",
  "plan_description": "Diwali dhammaka plan intended to attract customers on diwali time",
  "frequency": "Day",
  "amount": {
    "value": 100,
    "currency": "INR"
  },
  "max_limit_amount": {
    "value": 100,
    "currency": "INR"
  },
  "trial_period_in_days": 1,
  "start_date": "2022-02-01T17:32:28Z",
  "end_date": "2022-10-21T17:32:28Z",
  "merchant_metadata": {
    "key1": "DD",
    "key2": "XOF"
  },
  "merchant_plan_reference": "1234567890",
  "created_at": "2022-10-21T17:32:28Z",
  "modified_at": "2022-10-21T17:32:28Z"
}