Wonder
put/svc/payment/api/v1/openapi/recurring_payments/plan/{id}/cycles

Add plan cycles

Add new billing cycles to a specified plan.

Path parameters

idrequired
string

Recurring plan id

Header parameters

Signature
string

Example: good

Credential
string

Example: {{credential}}

x-request-id
string

Example: {{$string.uuid}}

x-i18n-lang
string

Example: zh-CN

Content-typerequired
string

Example: application/json

Request body · application/json

required
array<object>

Billing cycles to add to the plan

description
string

Any description to remark about this record

billing_countrequired
number

This is to count how long will the recurring cycle run for. If data is null, then consider this recurring_cycles record will run forerver.

discount_type
string

Discount type: fixed or percentage

discount_amount
number

If trial_period is TRUE, it means the total amount of billing amount for this recurring_cycles record will be 0.00

required
array<object>

Items billed in this cycle

recurring_billing_configrequired
string

This is for the system to know the billing date of a cycle, once the cycle has started

activate_typerequired
enum<string>

Immediate: The cycle to be added will start immediately and all previously-active recurring_cycles.state from the recurring plan will be updated to cancelled. Next Billing Date: The cycle to be added will start on the next billing date of the current recurring cycle. The recurring_cycles.state will be updated to completed, and all the succession recurring_cycles.state of it will be updated to cancelled. As Last Cycle: The cycle to be added will start once the current last recurring_cycles.state of recurring plan is changed to completed. If that recurring_cycles.billing_count and hence recurring_cycles.estimated_end_date are empty, the new cycle would not be added. If activate_type is not provided, the cycle would automatically be added as this value.

immediatenext_billing_dateas_last_cycle

process_credit
boolean

Only applicable for activate_type = immediate. By default, we will process the current recurring billing's remaining credit and add to/ subtract from recurring_plan.credit

Responses

coderequired
integer

Response code

required
object

Response data

required
object

Recurring plan details

messagerequired
string

Response message