Mutation
mutation PreviewSubscription($input: PreviewSubscriptionInput!) {
previewSubscription(input: $input) {
billingPeriodRange {
end
start
}
freeItems {
addonId
quantity
}
hasScheduledUpdates
immediateInvoice {
credits {
initial {
__typename
}
remaining {
__typename
}
used {
__typename
}
}
discount {
amount
currency
}
discountDetails {
durationInMonths
durationType
end
name
start
type
}
minimumSpendAdjustment {
amount
currency
}
proration {
credit {
__typename
}
debit {
__typename
}
hasProrations
netAmount {
__typename
}
prorationDate
}
subTotal {
amount
currency
}
}
isPlanDowngrade
recurringInvoice {
discount {
amount
currency
}
discountDetails {
durationInMonths
durationType
end
name
start
type
}
minimumSpendAdjustment {
amount
currency
}
subTotal {
amount
currency
}
tax {
amount
currency
}
taxDetails {
displayName
inclusive
percentage
}
}
}
}Variables
{
"input": {
"customerId": "string",
"planId": "string"
}
}Response
{
"data": {
"previewSubscription": {
"billingPeriodRange": {
"end": "value",
"start": "value"
},
"freeItems": [
{
"addonId": "string",
"quantity": 1.5
}
],
"hasScheduledUpdates": true,
"immediateInvoice": {
"credits": {
"initial": {
"__typename": "Money"
},
"remaining": {
"__typename": "Money"
},
"used": {
"__typename": "Money"
}
},
"discount": {
"amount": 1.5,
"currency": "AED"
},
"discountDetails": {
"durationInMonths": 1.5,
"durationType": "FOREVER",
"end": "value",
"name": "string",
"start": "value",
"type": "FIXED"
},
"minimumSpendAdjustment": {
"amount": 1.5,
"currency": "AED"
},
"proration": {
"credit": {
"__typename": "Money"
},
"debit": {
"__typename": "Money"
},
"hasProrations": true,
"netAmount": {
"__typename": "Money"
},
"prorationDate": "value"
},
"subTotal": {
"amount": 1.5,
"currency": "AED"
}
},
"isPlanDowngrade": true,
"recurringInvoice": {
"discount": {
"amount": 1.5,
"currency": "AED"
},
"discountDetails": {
"durationInMonths": 1.5,
"durationType": "FOREVER",
"end": "value",
"name": "string",
"start": "value",
"type": "FIXED"
},
"minimumSpendAdjustment": {
"amount": 1.5,
"currency": "AED"
},
"subTotal": {
"amount": 1.5,
"currency": "AED"
},
"tax": {
"amount": 1.5,
"currency": "AED"
},
"taxDetails": {
"displayName": "string",
"inclusive": true,
"percentage": 1.5
}
}
}
}
}Mutations
previewSubscription
MUTATION
previewSubscription(input: PreviewSubscriptionInput!): SubscriptionPreviewV2!Arguments
input
required
Returns
billingPeriodRange
freeItems
Free items of the subscription
hasScheduledUpdates
Boolean
immediateInvoice
isPlanDowngrade
Boolean
recurringInvoice
Mutation
mutation PreviewSubscription($input: PreviewSubscriptionInput!) {
previewSubscription(input: $input) {
billingPeriodRange {
end
start
}
freeItems {
addonId
quantity
}
hasScheduledUpdates
immediateInvoice {
credits {
initial {
__typename
}
remaining {
__typename
}
used {
__typename
}
}
discount {
amount
currency
}
discountDetails {
durationInMonths
durationType
end
name
start
type
}
minimumSpendAdjustment {
amount
currency
}
proration {
credit {
__typename
}
debit {
__typename
}
hasProrations
netAmount {
__typename
}
prorationDate
}
subTotal {
amount
currency
}
}
isPlanDowngrade
recurringInvoice {
discount {
amount
currency
}
discountDetails {
durationInMonths
durationType
end
name
start
type
}
minimumSpendAdjustment {
amount
currency
}
subTotal {
amount
currency
}
tax {
amount
currency
}
taxDetails {
displayName
inclusive
percentage
}
}
}
}Variables
{
"input": {
"customerId": "string",
"planId": "string"
}
}Response
{
"data": {
"previewSubscription": {
"billingPeriodRange": {
"end": "value",
"start": "value"
},
"freeItems": [
{
"addonId": "string",
"quantity": 1.5
}
],
"hasScheduledUpdates": true,
"immediateInvoice": {
"credits": {
"initial": {
"__typename": "Money"
},
"remaining": {
"__typename": "Money"
},
"used": {
"__typename": "Money"
}
},
"discount": {
"amount": 1.5,
"currency": "AED"
},
"discountDetails": {
"durationInMonths": 1.5,
"durationType": "FOREVER",
"end": "value",
"name": "string",
"start": "value",
"type": "FIXED"
},
"minimumSpendAdjustment": {
"amount": 1.5,
"currency": "AED"
},
"proration": {
"credit": {
"__typename": "Money"
},
"debit": {
"__typename": "Money"
},
"hasProrations": true,
"netAmount": {
"__typename": "Money"
},
"prorationDate": "value"
},
"subTotal": {
"amount": 1.5,
"currency": "AED"
}
},
"isPlanDowngrade": true,
"recurringInvoice": {
"discount": {
"amount": 1.5,
"currency": "AED"
},
"discountDetails": {
"durationInMonths": 1.5,
"durationType": "FOREVER",
"end": "value",
"name": "string",
"start": "value",
"type": "FIXED"
},
"minimumSpendAdjustment": {
"amount": 1.5,
"currency": "AED"
},
"subTotal": {
"amount": 1.5,
"currency": "AED"
},
"tax": {
"amount": 1.5,
"currency": "AED"
},
"taxDetails": {
"displayName": "string",
"inclusive": true,
"percentage": 1.5
}
}
}
}
}