Update a plan

The API Endpoint allows integrators to update details of a plan. Any changes actioned on the plan, will only be effective for subscriptions created after the update.

Existing subscriptions will not be affected and remain grandfathered at terms agreed previously when subscribing to the plan.

NOTE: It a good practice to use the "accountingCode" to provide a grouping for the plan. This will automatically appear in the invoice generated by Ezypay based on your frequency settings.

Path Params
string
required

Identifier of the plan to update.

Body Params
string

Plan name. Max of 50 characters.

string

Brief memo of the plan. Max of 50 characters.

amount
object

The gross amount charged to the customer, inclusive of tax. Supports decimal values for cents. For example, $24.50 would be 24.50.

string

Current state of the plan. Supported values are: active - Customers can subscribe to the plan. inactive - Customers are unable to subscribe to the plan.

setupPayments
object

Setup payment settings.

string
Defaults to week

Specifies frequency of billing. Can be day, week or month. If no value is provided, the default value is week.

tax
object

The tax rate that will be applied to the plan's amount. If left blank, uses the tax rate specified in the Merchant Object by default.

int32

Number to be specified as interval to manipulate billing frequency. For example interval=2 and intervalUnit=week would means billing every 2 weeks. If no value is provided, the default value is 1.

string

Specify the rules to auto-calculate default billing start dates for customers subscribed to the plan. Supported values are weekday, day_of_month, and subscription_date. Must be specified with a corresponding billingStartValue. The default value is subscription_date. This means, by default, schedules created from this plan will start on the start date defined in the customer’s subscription. However, if the scheduled start date and today’s date are the same, then the subscription is marked as starting today but schedules are generated the next day.

string

Specifies the rules to automate when a subscription ends. Supported values are: ongoing - Default value. Subscriptions created from this plan will have no end date and continue billing on an ongoing basis (until instructions are given to stop billing). amount_collected - Subscriptions will end when a specified amount is collected as defined in billingEndValue. billing_cycles - Subscriptions will end after a specified number of billing cycles as defined in billingEndValue. end_date - Subscriptions will end on specific date. Specify this date when you create a subscription in billingEndValue

string

Specifies the rules to auto-calculate the billing charges for the first scheduled billing. Supported values are: If full_amount = Default value. The first billing will charge the full amount on the subscription as defined in the plan's amount. If prorate = Prorate will be auto-calculated for the first billing in the subscription for the pro-rated period, with full recurring billing amount starting from the next billing cycle.

string

Specify an accounting code to categorise revenue collected from the plan's subscription payment. Max of 50 characters.

Headers
string
required

Merchant ID

Responses

Language
Response
Choose an example:
application/json