Update Subscription Plan

Last changes: 11-29-2021

Request parameters

FieldDescriptionTypeLengthMandatory
nameName of the Subscription PlanString255No
descriptionDescription of the Subscription PlanString255No
recurrentAmountAmount to be billed recurrentlyDouble18.2No
currencyIsoCodeCurrency code.String3No
trialDurationPeriodPeriod of the trial.
Required if trialDurationUnit is provided.
Int 2Conditional
trialDurationUnitUnit of the trial period.
Required if trialDurationPeriod is provided.
String5Conditional
billingOccurrenceRecurrence of the billing occurrences.
Required if billingUnit is provided.
Int2Conditional
billingUnitUnit of the billing recurrence.
Required if billingOccurrence is provided.
String5Conditional
billingCyclesNumber of the billing occurrences.Int2No
merchantMetadataMerchant Metadata fields sent during the creation of the Subscription Plan.String255No

Request sample

Path:

PATCH {BaseUrl}/plans/SubscriptionPlan-12033695-99d8-4dc6-bf51-db64ef27620b

Header:

Content-Type: application/json
Accept-Language: en-US

{
  "name": "Premium U",
  "description": "Premium sub for only 80.9 EUR!",
  "recurrentAmount": 80.9,
  "currencyIsoCode": "EUR",
  "trialDurationPeriod": 1,
  "trialDurationUnit": "month",
  "billingOccurrence": 1,
  "billingUnit": "year",
  "billingCycles": 1,
  "prepaid": false,
  "merchantMetadata": "{\"orderId\": U1asd265jh4, \"usageTracking\": true, \"referenceId\": Us125jkwh2321 }"
}

Response parameters

FieldDescriptionTypeLengthMandatory
idUnique Identifier of the created Subscription Plan.
Format: "SubscriptionPlan" + "-" + <UUID>
String53Yes
createdAtTimestamp of when the Subscription Plan was created.
Format: yyyy-MM-dd'T'HH:mm:ss.SS'Z
DateTime24Yes
updatedAtTimestamp of when the Subscription Plan was last updated.
Format: yyyy-MM-dd'T'HH:mm:ss.SS'Z
DateTime24Yes
deletedAtTimestamp of when the Subscription Plan was deleted (if applicable).
Format: yyyy-MM-dd'T'HH:mm:ss.SS'Z
DateTime24Yes
nameName of the Subscription Plan.String255Yes
descriptionDescription of the Subscription Plan.String255Yes
recurrentAmountAmount to be billed recurrently.Double18.2Yes
currencyIsoCodeCurrency code.String3Yes
trialDurationPeriodPeriod of the trial.Int 2Conditional
trialDurationUnitUnit of the trial period.String5Conditional
billingOccurrenceRecurrence of the billing occurrences.Int2Yes
billingUnitUnit of the billing recurrence.String5Yes
billingCyclesNumber of the billing occurrences.Int2Yes
prepaidTRUE by default in current version.Boolean5No
merchantMetadataMerchant Metadata fields sent during the creation of the Subscription Plan.String255No

Response sample

Status Code:

200 (OK)

Header:

Content-Type: application/json
Accept-Language: en-US

{
  "id": "SubscriptionPlan-a2a88967-db66-481d-9f29-00e684866cd6",
  "createdAt": "2021-03-18T08:53:56.65Z",
  "updatedAt": "2021-03-18T08:55:20.85Z",
  "deletedAt": null,
  "name": "Premium U",
  "description": "Premium sub for only 80.9 EUR!",
  "recurrentAmount": 80.90,
  "currencyIsoCode": "EUR",
  "trialDurationPeriod": 1,
  "trialDurationUnit": "month",
  "billingUnit": "year",
  "billingOccurrence": 1,
  "billingCycles": 1,
  "prepaid": true,
  "merchantMetadata": "{\"orderId\": U1asd265jh4, \"usageTracking\": true, \"referenceId\": Us125jkwh2321 }"
}