Skip to main content

Updating an existing plan

PUT 

/recurrency/plans/:planId

This endpoint is used to update the details of an existing subscription plan based on the provided ID. Subscription plans may need to be updated to reflect changes in terms, pricing, benefits or other attributes associated with the plan. When submitting an upgrade request to this endpoint, pertinent plan details such as name, description, price, duration, and features must be provided in the body of the request. The ID of the plan to be updated must be specified in the URL. After successful update, the system returns the updated plan details.

Request​

Path Parameters

    planId uuidrequired
    Example: 8086bfd7-6241-4f76-81d8-70460533ce74

Body

required

    billingCycle stringrequired

    Possible values: [DAILY, WEEKLY, MONTHLY, QUARTERLY, BIANNUAL, ANNUAL]

    amount int32required

    Possible values: >= 1

    totalBillingCycles int32required

    Possible values: >= 1

    initialGraceCycles int32

    initialFee

    object

    description stringrequired
    amount int32required
    cycles int32required

    Possible values: >= 1

    tag stringrequired

    Possible values: non-empty

Responses​

OK

Schema

    id string
    billingCycle string
    totalBillingCycles int32
    initialGraceCycles int32

    initialFee

    object

    description string
    amount int32
    cycles int32
    tag string
    paymentType string
    amount int32
    enabled boolean

    Indicates if the plan is enabled or not.

Loading...