Skip to main content

Update Subscription Plan

PATCH 

/plans/:subscriptionPlanId

Updates the specified fields of an existing subscription plan.

info

The request must provide the following header: x-api-key: {merchantKey}

Request

Path Parameters

    subscriptionPlanId stringrequired

    Unique Identifier of the created Subscription. Format: Subscription + - + <UUID>

    Example: SubscriptionPlan-12033695-99d8-4dc6-bf51-db64ef27620b

Header Parameters

    Content-Type stringrequired

    Must be application/json

    Accept-Language stringrequired

    Must be be en-US

    Origin stringrequired

    The origin of the request

    User-Agent stringrequired

    The client making the request

    x-api-key stringrequired

    x-api-key: {merchantKey}

Body

required

    name string

    Name of the Subscription Plan

    description string

    Description of the Subscription Plan

    recurrentAmount decimal

    Possible values: <= 60 characters

    Amount to be billed recurrently

    currencyIsoCode string

    Currency code. Format: ISO 4217

    trialDurationPeriod integernullable

    Period of the trial. Required if trialDurationUnit is provided.

    trialDurationUnit stringnullable

    Unit of the trial period. Required if trialDurationPeriod is provided.

    billingOccurrence integernullable

    Recurrence of the billing occurrences. Required if billingUnit is provided.

    billingUnit stringnullable

    Unit of the billing recurrence. Required if billingOccurrence is provided.

    billingCycles integer

    Number of the billing occurrences.

    merchantMetadata stringnullable

    Possible values: <= 255 characters

    Merchant Metadata fields sent during the creation of the Subscription Plan.

Responses

Subscription plan updated successfully

Schema

    id string

    Unique Identifier of the Subscription Plan. Format: SubscriptionPlan + - + <UUID>

    createdAt date-time

    Timestamp of when the Subscription Plan was created.

    updatedAt date-time

    Timestamp of when the Subscription Plan was last updated.

    deletedAt date-timenullable

    Timestamp of when the Subscription Plan was deleted (if applicable).

    name stringrequired

    Possible values: <= 255 characters

    Name of the Subscription Plan.

    description stringrequired

    Possible values: <= 255 characters

    Description of the Subscription Plan.

    recurrentAmount decimalrequired

    Possible values: <= 60 characters

    Amount to be billed recurrently.

    currencyIsoCode stringrequired

    Possible values: >= 3 characters and <= 3 characters

    Currency code. Format ISO 4217.

    trialDurationPeriod integer

    Possible values: >= 1 and <= 28

    Period of the trial. MinValue 1, MaxValue 28.

    trialDurationUnit string

    Possible values: [day, month, year]

    Unit of the trial period.

    billingOccurrence integerrequired

    Recurrence of the billing occurrences.

    billingUnit stringrequired

    Possible values: [day, month, year]

    Unit of the billing recurrence.

    billingCycles integerrequired

    Possible values: >= -1 and <= 120

    Number of the billing occurrences. -1 for unlimited subscription.

    prepaid boolean

    Always false. Once created, a plan cannot be updated.

    merchantMetadata stringnullable

    Possible values: <= 255 characters

    Field that allows the merchant to store specific metadata linked with the subscription plan.

Loading...