Skip to main content
PATCH
Update Plan

Authorizations

Authorization
string
header
required

JWT issued by POST /api/v1.1/access-token/b2b. Send Authorization: Bearer <token>.

X-PARTNER-ID
string
header
required

Merchant API key (Credential.api_key). Required on every request.

Path Parameters

id
string<uuid>
required

Body

application/json

Payload for UpdateSubscriptionPlanRequest. If amount or items is present, the service runs upgrade/downgrade (new plan, proration). Otherwise only cosmetic fields (name, merchant_reff_no, metadata) are patched on the existing plan.

name
string

New plan name.

Maximum string length: 255
Example:

"Monthly Pro Subscription (Updated)"

merchant_reff_no
string | null

New merchant reference number.

Maximum string length: 255
Example:

"REF-0002"

amount
number

New per-cycle charge in IDR. Mutually exclusive with items when upgrading.

Required range: x >= 0
Example:

200000

items
object[]

New itemized pricing. Mutually exclusive with amount when upgrading.

Minimum array length: 1
metadata
object

Free-form metadata to merge onto the plan.

prorated_charge_mode
enum<string> | null

How the proration charge is determined when upgrading. Defaults to auto.

Available options:
auto,
manual
Example:

"auto"

prorated_charge_amount
number | null

When prorated_charge_mode is manual; use 0 to skip immediate proration charge. If positive, must meet the same IDR 10,000 card minimum as create/upgrade amounts.

Required range: x >= 0
Example:

50000

Response

SP000 Successfully — data is RecurringPlanData (includes upgrade when amount/items changed).

Merchant v2 envelope returned on a successful plan operation (SP000). Used by create (HTTP 201), show, update, and cancel (HTTP 200). The data.upgrade block is present only on an upgrade/downgrade.

response_code
string
required

SingaPay custom business response code.

Example:

"SP000"

response_message
string
required

Human-readable label paired with response_code.

Example:

"Successfully"

data
object
required

data object shape from SubscriptionPlanResource (success responses).