Mutation
mutation PreviewNextInvoice($input: PreviewNextInvoiceInput!) {
previewNextInvoice(input: $input) {
amountDue {
amount
currency
}
billingDate
credits {
initial {
amount
currency
}
remaining {
amount
currency
}
used {
amount
currency
}
}
discount {
amount
currency
}
discountDetails {
durationInMonths
durationType
end
name
start
type
}
lastUpdatedAt
}
}Variables
{
"input": {
"subscriptionId": "string"
}
}Response
{
"data": {
"previewNextInvoice": {
"amountDue": {
"amount": 1.5,
"currency": "AED"
},
"billingDate": "value",
"credits": {
"initial": {
"amount": 1.5,
"currency": "AED"
},
"remaining": {
"amount": 1.5,
"currency": "AED"
},
"used": {
"amount": 1.5,
"currency": "AED"
}
},
"discount": {
"amount": 1.5,
"currency": "AED"
},
"discountDetails": {
"durationInMonths": 1.5,
"durationType": "FOREVER",
"end": "value",
"name": "string",
"start": "value",
"type": "FIXED"
},
"lastUpdatedAt": "value"
}
}
}Mutations
previewNextInvoice
MUTATION
previewNextInvoice(input: PreviewNextInvoiceInput!): SubscriptionInvoicePreview!Arguments
input
required
Returns
amountDue
The amount due for the invoice after taxes, discounts and credits
billingDate
DateTime
The date the invoice is expected to be billed
credits
Credits information (initial, used, remaining)
discount
The total discount amount of the invoice
discountDetails
The applied discount details
lastUpdatedAt
DateTime!
The date when the invoice was last updated
lines
The line items of the invoice
minimumSpendAdjustment
The minimum spend adjustment applied to the invoice
subTotal
The sub total amount of the invoice excluding discounts
subTotalExcludingTax
The sub total amount of the invoice excluding taxes and discounts
tax
The total tax amount of the invoice
taxDetails
The applied tax details
total
The total amount of the invoice including taxes and discounts
totalExcludingTax
The total amount of the invoice excluding taxes
Mutation
mutation PreviewNextInvoice($input: PreviewNextInvoiceInput!) {
previewNextInvoice(input: $input) {
amountDue {
amount
currency
}
billingDate
credits {
initial {
amount
currency
}
remaining {
amount
currency
}
used {
amount
currency
}
}
discount {
amount
currency
}
discountDetails {
durationInMonths
durationType
end
name
start
type
}
lastUpdatedAt
}
}Variables
{
"input": {
"subscriptionId": "string"
}
}Response
{
"data": {
"previewNextInvoice": {
"amountDue": {
"amount": 1.5,
"currency": "AED"
},
"billingDate": "value",
"credits": {
"initial": {
"amount": 1.5,
"currency": "AED"
},
"remaining": {
"amount": 1.5,
"currency": "AED"
},
"used": {
"amount": 1.5,
"currency": "AED"
}
},
"discount": {
"amount": 1.5,
"currency": "AED"
},
"discountDetails": {
"durationInMonths": 1.5,
"durationType": "FOREVER",
"end": "value",
"name": "string",
"start": "value",
"type": "FIXED"
},
"lastUpdatedAt": "value"
}
}
}