curl --request POST \
--url https://sandbox-platform.jupico.com/v1/subscriptions/plan/update \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"planId": "<string>",
"subMerchantId": "<string>",
"name": "Black friday test plan",
"description": "Black friday test plan description",
"schedules": [
{
"order": 1,
"label": "Silver",
"invoiceDescription": "Invoice for \"Silver\" schedule.",
"cyclesQty": 3,
"frequency": "monthly",
"executionDays": [
10
],
"pricingModel": {
"type": "flat",
"free": {
"daysQty": 10
},
"flat": {
"price": 100
},
"flatTiered": {
"tiers": [
{
"name": "Basic",
"description": "<string>",
"price": 100,
"featuresSettings": {
"label": "<string>",
"features": [
{
"icon": "<string>",
"name": "<string>",
"description": "<string>",
"link": "<string>"
}
]
}
}
]
},
"perModule": {
"modules": [
{
"name": "Basic",
"description": "<string>",
"price": 100,
"featuresSettings": {
"label": "<string>",
"features": [
{
"icon": "<string>",
"name": "<string>",
"description": "<string>",
"link": "<string>"
}
]
}
}
]
},
"perUsageQuantity": {
"unitPrice": 10
},
"perUsageVolume": {
"steps": [
{
"startQty": 1,
"endQty": 9,
"unitPrice": 15
}
]
},
"perUsageTiered": {
"tiers": [
{
"name": "Basic",
"description": "<string>",
"price": 100,
"featuresSettings": {
"label": "<string>",
"features": [
{
"icon": "<string>",
"name": "<string>",
"description": "<string>",
"link": "<string>"
}
]
}
}
]
}
},
"enabled": true,
"featuresEnabled": false
}
]
}
'import requests
url = "https://sandbox-platform.jupico.com/v1/subscriptions/plan/update"
payload = {
"planId": "<string>",
"subMerchantId": "<string>",
"name": "Black friday test plan",
"description": "Black friday test plan description",
"schedules": [
{
"order": 1,
"label": "Silver",
"invoiceDescription": "Invoice for \"Silver\" schedule.",
"cyclesQty": 3,
"frequency": "monthly",
"executionDays": [10],
"pricingModel": {
"type": "flat",
"free": { "daysQty": 10 },
"flat": { "price": 100 },
"flatTiered": { "tiers": [
{
"name": "Basic",
"description": "<string>",
"price": 100,
"featuresSettings": {
"label": "<string>",
"features": [
{
"icon": "<string>",
"name": "<string>",
"description": "<string>",
"link": "<string>"
}
]
}
}
] },
"perModule": { "modules": [
{
"name": "Basic",
"description": "<string>",
"price": 100,
"featuresSettings": {
"label": "<string>",
"features": [
{
"icon": "<string>",
"name": "<string>",
"description": "<string>",
"link": "<string>"
}
]
}
}
] },
"perUsageQuantity": { "unitPrice": 10 },
"perUsageVolume": { "steps": [
{
"startQty": 1,
"endQty": 9,
"unitPrice": 15
}
] },
"perUsageTiered": { "tiers": [
{
"name": "Basic",
"description": "<string>",
"price": 100,
"featuresSettings": {
"label": "<string>",
"features": [
{
"icon": "<string>",
"name": "<string>",
"description": "<string>",
"link": "<string>"
}
]
}
}
] }
},
"enabled": True,
"featuresEnabled": False
}
]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
planId: '<string>',
subMerchantId: '<string>',
name: 'Black friday test plan',
description: 'Black friday test plan description',
schedules: [
{
order: 1,
label: 'Silver',
invoiceDescription: 'Invoice for "Silver" schedule.',
cyclesQty: 3,
frequency: 'monthly',
executionDays: [10],
pricingModel: {
type: 'flat',
free: {daysQty: 10},
flat: {price: 100},
flatTiered: {
tiers: [
{
name: 'Basic',
description: '<string>',
price: 100,
featuresSettings: {
label: '<string>',
features: [
{icon: '<string>', name: '<string>', description: '<string>', link: '<string>'}
]
}
}
]
},
perModule: {
modules: [
{
name: 'Basic',
description: '<string>',
price: 100,
featuresSettings: {
label: '<string>',
features: [
{icon: '<string>', name: '<string>', description: '<string>', link: '<string>'}
]
}
}
]
},
perUsageQuantity: {unitPrice: 10},
perUsageVolume: {steps: [{startQty: 1, endQty: 9, unitPrice: 15}]},
perUsageTiered: {
tiers: [
{
name: 'Basic',
description: '<string>',
price: 100,
featuresSettings: {
label: '<string>',
features: [
{icon: '<string>', name: '<string>', description: '<string>', link: '<string>'}
]
}
}
]
}
},
enabled: true,
featuresEnabled: false
}
]
})
};
fetch('https://sandbox-platform.jupico.com/v1/subscriptions/plan/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://sandbox-platform.jupico.com/v1/subscriptions/plan/update';
const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
planId: '<string>',
subMerchantId: '<string>',
name: 'Black friday test plan',
description: 'Black friday test plan description',
schedules: [
{
order: 1,
label: 'Silver',
invoiceDescription: 'Invoice for "Silver" schedule.',
cyclesQty: 3,
frequency: 'monthly',
executionDays: [10],
pricingModel: {
type: 'flat',
free: {daysQty: 10},
flat: {price: 100},
flatTiered: {
tiers: [
{
name: 'Basic',
description: '<string>',
price: 100,
featuresSettings: {
label: '<string>',
features: [
{icon: '<string>', name: '<string>', description: '<string>', link: '<string>'}
]
}
}
]
},
perModule: {
modules: [
{
name: 'Basic',
description: '<string>',
price: 100,
featuresSettings: {
label: '<string>',
features: [
{icon: '<string>', name: '<string>', description: '<string>', link: '<string>'}
]
}
}
]
},
perUsageQuantity: {unitPrice: 10},
perUsageVolume: {steps: [{startQty: 1, endQty: 9, unitPrice: 15}]},
perUsageTiered: {
tiers: [
{
name: 'Basic',
description: '<string>',
price: 100,
featuresSettings: {
label: '<string>',
features: [
{icon: '<string>', name: '<string>', description: '<string>', link: '<string>'}
]
}
}
]
}
},
enabled: true,
featuresEnabled: false
}
]
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Update a plan
Updates an existing subscription plan’s details, schedules, or hosted session settings.
curl --request POST \
--url https://sandbox-platform.jupico.com/v1/subscriptions/plan/update \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"planId": "<string>",
"subMerchantId": "<string>",
"name": "Black friday test plan",
"description": "Black friday test plan description",
"schedules": [
{
"order": 1,
"label": "Silver",
"invoiceDescription": "Invoice for \"Silver\" schedule.",
"cyclesQty": 3,
"frequency": "monthly",
"executionDays": [
10
],
"pricingModel": {
"type": "flat",
"free": {
"daysQty": 10
},
"flat": {
"price": 100
},
"flatTiered": {
"tiers": [
{
"name": "Basic",
"description": "<string>",
"price": 100,
"featuresSettings": {
"label": "<string>",
"features": [
{
"icon": "<string>",
"name": "<string>",
"description": "<string>",
"link": "<string>"
}
]
}
}
]
},
"perModule": {
"modules": [
{
"name": "Basic",
"description": "<string>",
"price": 100,
"featuresSettings": {
"label": "<string>",
"features": [
{
"icon": "<string>",
"name": "<string>",
"description": "<string>",
"link": "<string>"
}
]
}
}
]
},
"perUsageQuantity": {
"unitPrice": 10
},
"perUsageVolume": {
"steps": [
{
"startQty": 1,
"endQty": 9,
"unitPrice": 15
}
]
},
"perUsageTiered": {
"tiers": [
{
"name": "Basic",
"description": "<string>",
"price": 100,
"featuresSettings": {
"label": "<string>",
"features": [
{
"icon": "<string>",
"name": "<string>",
"description": "<string>",
"link": "<string>"
}
]
}
}
]
}
},
"enabled": true,
"featuresEnabled": false
}
]
}
'import requests
url = "https://sandbox-platform.jupico.com/v1/subscriptions/plan/update"
payload = {
"planId": "<string>",
"subMerchantId": "<string>",
"name": "Black friday test plan",
"description": "Black friday test plan description",
"schedules": [
{
"order": 1,
"label": "Silver",
"invoiceDescription": "Invoice for \"Silver\" schedule.",
"cyclesQty": 3,
"frequency": "monthly",
"executionDays": [10],
"pricingModel": {
"type": "flat",
"free": { "daysQty": 10 },
"flat": { "price": 100 },
"flatTiered": { "tiers": [
{
"name": "Basic",
"description": "<string>",
"price": 100,
"featuresSettings": {
"label": "<string>",
"features": [
{
"icon": "<string>",
"name": "<string>",
"description": "<string>",
"link": "<string>"
}
]
}
}
] },
"perModule": { "modules": [
{
"name": "Basic",
"description": "<string>",
"price": 100,
"featuresSettings": {
"label": "<string>",
"features": [
{
"icon": "<string>",
"name": "<string>",
"description": "<string>",
"link": "<string>"
}
]
}
}
] },
"perUsageQuantity": { "unitPrice": 10 },
"perUsageVolume": { "steps": [
{
"startQty": 1,
"endQty": 9,
"unitPrice": 15
}
] },
"perUsageTiered": { "tiers": [
{
"name": "Basic",
"description": "<string>",
"price": 100,
"featuresSettings": {
"label": "<string>",
"features": [
{
"icon": "<string>",
"name": "<string>",
"description": "<string>",
"link": "<string>"
}
]
}
}
] }
},
"enabled": True,
"featuresEnabled": False
}
]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
planId: '<string>',
subMerchantId: '<string>',
name: 'Black friday test plan',
description: 'Black friday test plan description',
schedules: [
{
order: 1,
label: 'Silver',
invoiceDescription: 'Invoice for "Silver" schedule.',
cyclesQty: 3,
frequency: 'monthly',
executionDays: [10],
pricingModel: {
type: 'flat',
free: {daysQty: 10},
flat: {price: 100},
flatTiered: {
tiers: [
{
name: 'Basic',
description: '<string>',
price: 100,
featuresSettings: {
label: '<string>',
features: [
{icon: '<string>', name: '<string>', description: '<string>', link: '<string>'}
]
}
}
]
},
perModule: {
modules: [
{
name: 'Basic',
description: '<string>',
price: 100,
featuresSettings: {
label: '<string>',
features: [
{icon: '<string>', name: '<string>', description: '<string>', link: '<string>'}
]
}
}
]
},
perUsageQuantity: {unitPrice: 10},
perUsageVolume: {steps: [{startQty: 1, endQty: 9, unitPrice: 15}]},
perUsageTiered: {
tiers: [
{
name: 'Basic',
description: '<string>',
price: 100,
featuresSettings: {
label: '<string>',
features: [
{icon: '<string>', name: '<string>', description: '<string>', link: '<string>'}
]
}
}
]
}
},
enabled: true,
featuresEnabled: false
}
]
})
};
fetch('https://sandbox-platform.jupico.com/v1/subscriptions/plan/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://sandbox-platform.jupico.com/v1/subscriptions/plan/update';
const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
planId: '<string>',
subMerchantId: '<string>',
name: 'Black friday test plan',
description: 'Black friday test plan description',
schedules: [
{
order: 1,
label: 'Silver',
invoiceDescription: 'Invoice for "Silver" schedule.',
cyclesQty: 3,
frequency: 'monthly',
executionDays: [10],
pricingModel: {
type: 'flat',
free: {daysQty: 10},
flat: {price: 100},
flatTiered: {
tiers: [
{
name: 'Basic',
description: '<string>',
price: 100,
featuresSettings: {
label: '<string>',
features: [
{icon: '<string>', name: '<string>', description: '<string>', link: '<string>'}
]
}
}
]
},
perModule: {
modules: [
{
name: 'Basic',
description: '<string>',
price: 100,
featuresSettings: {
label: '<string>',
features: [
{icon: '<string>', name: '<string>', description: '<string>', link: '<string>'}
]
}
}
]
},
perUsageQuantity: {unitPrice: 10},
perUsageVolume: {steps: [{startQty: 1, endQty: 9, unitPrice: 15}]},
perUsageTiered: {
tiers: [
{
name: 'Basic',
description: '<string>',
price: 100,
featuresSettings: {
label: '<string>',
features: [
{icon: '<string>', name: '<string>', description: '<string>', link: '<string>'}
]
}
}
]
}
},
enabled: true,
featuresEnabled: false
}
]
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
The planId that ident the subscription plan
The subMerchantId associated with the plan.
Plan's name.
"Black friday test plan"
Plan's description.
"Black friday test plan description"
Array containing plan's schedules.
Hide child attributes
Hide child attributes
Schedule order.
1
Schedule's label
"Silver"
Schedule's description to make invoice.
"Invoice for \"Silver\" schedule."
Number of cycles of schedule
3
Billing frequency
one-time, daily, weekly, every-28-days, biweekly, monthly, yearly "monthly"
Days on which scheduled charges execute.
Array of billing numbers day[0-32] for monthly, 0 at period start(month's 1st), 32 at period end(month's last day)
Pricing models params.
Hide child attributes
Hide child attributes
Pricing model type, one of ["free", "flat", "flatTiered", "perModule", "perUsageQuantity", "perUsageVolume", "perUsageTiered"]. Depending of this value you must provide corresponding next atribute.
"flat"
Flat pricing with selectable tiers.
Hide child attributes
Hide child attributes
Available tiers for this schedule.
Hide child attributes
Hide child attributes
Display name of the tier.
"Basic"
Description of the tier shown to the customer.
Price of the tier per billing cycle.
100
Display settings for the tier's feature list.
Hide child attributes
Hide child attributes
Heading displayed above the feature list.
Feature list displayed for this tier.
Hide child attributes
Hide child attributes
Icon displayed next to the feature.
Display name.
Free-text description.
URL the feature links to.
Per-module pricing: the customer subscribes to individual modules.
Hide child attributes
Hide child attributes
Modules available for subscription.
Hide child attributes
Hide child attributes
Display name.
"Basic"
Free-text description.
Price per billing cycle.
100
Display settings for the feature list.
Hide child attributes
Hide child attributes
Heading displayed above the feature list.
Feature list displayed for this tier.
Hide child attributes
Hide child attributes
Icon displayed next to the feature.
Display name.
Free-text description.
URL the feature links to.
Usage-based pricing where the unit price depends on total volume.
Hide child attributes
Hide child attributes
Volume pricing steps.
Hide child attributes
Hide child attributes
First unit quantity this step applies to.
1
Last unit quantity this step applies to.
9
Price per unit within this volume step.
15
Usage-based pricing with tiered rates per volume step.
Hide child attributes
Hide child attributes
Available tiers for this schedule.
Hide child attributes
Hide child attributes
Display name of the tier.
"Basic"
Description of the tier shown to the customer.
Price of the tier per billing cycle.
100
Display settings for the tier's feature list.
Hide child attributes
Hide child attributes
Heading displayed above the feature list.
Feature list displayed for this tier.
Hide child attributes
Hide child attributes
Icon displayed next to the feature.
Display name.
Free-text description.
URL the feature links to.
Whether this setting is enabled.
true
Whether tier features are enabled for this schedule.
false
Plan's title.
""
Plan's sub title.
""
Object to edit configuration of created hosted session.
Hide child attributes
Hide child attributes
Only required field, setting enabled = true, we create a session with default values. In case you want customization, append below data.
true
Payment methods offered on the hosted page.
Hide child attributes
Hide child attributes
Default payment method one of ["creditCard","eCheck", "applePay","googlePay"]
"creditCard"
Navigation behavior of the hosted page.
Hide child attributes
Hide child attributes
Default payment method one of ["standalone","redirect"]
"redirect"
URLs the customer is redirected to during the flow.
Hide child attributes
Hide child attributes
URL the customer is redirected to after successful payment.
"https://yoursite.com/successUrl"
URL the customer is redirected to if they cancel.
"https://yoursite.com/cancelUrl"
URL the customer is redirected to when they navigate back.
"https://yoursite.com/backUrl"
Hosted session functions
Hide child attributes
Hide child attributes
Customization of the pay button.
Collect the customer's email address during checkout.
How many times the hosted session link can be used.
Response
Plan successfully created.
Was this page helpful?

