Query
query CheckoutState($input: CheckoutStateInput!) {
checkoutState(input: $input) {
activeSubscription {
additionalMetaData
addons {
addon {
__typename
}
addonId
createdAt
id
price {
__typename
}
quantity
}
billingCycleAnchor
billingId
billingLinkUrl
billingPeriod
}
billingIntegration {
billingCredentials {
__typename
... on AirwallexCheckoutCredentials {
__typename
}
}
billingIdentifier
credentials {
accountId
publicKey
}
}
configuration {
content {
collectPhoneNumber
}
customCss
palette {
backgroundColor
borderColor
primary
summaryBackgroundColor
textColor
}
typography {
body {
__typename
}
fontFamily
h1 {
__typename
}
h2 {
__typename
}
h3 {
__typename
}
}
}
customer {
additionalMetaData
awsMarketplaceCustomerId
billingCurrency
billingId
billingLinkUrl
coupon {
additionalMetaData
amountsOff {
__typename
}
billingId
billingLinkUrl
createdAt
customers {
__typename
}
}
}
plan {
additionalMetaData
awsMarketplacePlanDimension
basePlan {
__typename
}
billingId
billingLinkUrl
compatibleAddons {
additionalMetaData
billingId
billingLinkUrl
createdAt
dependencies {
__typename
}
description
}
}
resource {
createdAt
customer {
additionalMetaData
awsMarketplaceCustomerId
billingCurrency
billingId
billingLinkUrl
coupon {
__typename
}
}
environmentId
resourceId
subscriptions {
additionalMetaData
addons {
__typename
}
billingCycleAnchor
billingId
billingLinkUrl
billingPeriod
}
}
}
}Variables
{
"input": {
"customerId": "string",
"planId": "string"
}
}Response
{
"data": {
"checkoutState": {
"activeSubscription": {
"additionalMetaData": "value",
"addons": [
{
"addon": {
"__typename": "Addon"
},
"addonId": "string",
"createdAt": "value",
"id": "value",
"price": {
"__typename": "Price"
},
"quantity": 1.5
}
],
"billingCycleAnchor": "value",
"billingId": "string",
"billingLinkUrl": "string",
"billingPeriod": "ANNUALLY"
},
"billingIntegration": {
"billingCredentials": {
"__typename": "AirwallexCheckoutCredentials"
},
"billingIdentifier": "RECEIVED",
"credentials": {
"accountId": "string",
"publicKey": "string"
}
},
"configuration": {
"content": {
"collectPhoneNumber": true
},
"customCss": "string",
"palette": {
"backgroundColor": "string",
"borderColor": "string",
"primary": "string",
"summaryBackgroundColor": "string",
"textColor": "string"
},
"typography": {
"body": {
"__typename": "FontVariant"
},
"fontFamily": "string",
"h1": {
"__typename": "FontVariant"
},
"h2": {
"__typename": "FontVariant"
},
"h3": {
"__typename": "FontVariant"
}
}
},
"customer": {
"additionalMetaData": "value",
"awsMarketplaceCustomerId": "string",
"billingCurrency": "AED",
"billingId": "string",
"billingLinkUrl": "string",
"coupon": {
"additionalMetaData": "value",
"amountsOff": [
{
"__typename": "Money"
}
],
"billingId": "string",
"billingLinkUrl": "string",
"createdAt": "value",
"customers": [
{
"__typename": "Customer"
}
]
}
},
"plan": {
"additionalMetaData": "value",
"awsMarketplacePlanDimension": "string",
"basePlan": {
"__typename": "Plan"
},
"billingId": "string",
"billingLinkUrl": "string",
"compatibleAddons": [
{
"additionalMetaData": "value",
"billingId": "string",
"billingLinkUrl": "string",
"createdAt": "value",
"dependencies": [
{
"__typename": "Addon"
}
],
"description": "string"
}
]
},
"resource": {
"createdAt": "value",
"customer": {
"additionalMetaData": "value",
"awsMarketplaceCustomerId": "string",
"billingCurrency": "AED",
"billingId": "string",
"billingLinkUrl": "string",
"coupon": {
"__typename": "Coupon"
}
},
"environmentId": "value",
"resourceId": "string",
"subscriptions": [
{
"additionalMetaData": "value",
"addons": [
{
"__typename": "SubscriptionAddon"
}
],
"billingCycleAnchor": "value",
"billingId": "string",
"billingLinkUrl": "string",
"billingPeriod": "ANNUALLY"
}
]
}
}
}
}Queries
checkoutState
QUERY
checkoutState(input: CheckoutStateInput!): CheckoutState!Arguments
input
required
Returns
activeSubscription
The current active subscription
billingIntegration
Current billing integration
configuration
The checkout configuration
customer
The customer
plan
Plan!
The selected plan
resource
The resource
setupSecret
String!
deprecated
The billing setup secret
Use billingIntegration.billingCredentials.setupSecret instead
Query
query CheckoutState($input: CheckoutStateInput!) {
checkoutState(input: $input) {
activeSubscription {
additionalMetaData
addons {
addon {
__typename
}
addonId
createdAt
id
price {
__typename
}
quantity
}
billingCycleAnchor
billingId
billingLinkUrl
billingPeriod
}
billingIntegration {
billingCredentials {
__typename
... on AirwallexCheckoutCredentials {
__typename
}
}
billingIdentifier
credentials {
accountId
publicKey
}
}
configuration {
content {
collectPhoneNumber
}
customCss
palette {
backgroundColor
borderColor
primary
summaryBackgroundColor
textColor
}
typography {
body {
__typename
}
fontFamily
h1 {
__typename
}
h2 {
__typename
}
h3 {
__typename
}
}
}
customer {
additionalMetaData
awsMarketplaceCustomerId
billingCurrency
billingId
billingLinkUrl
coupon {
additionalMetaData
amountsOff {
__typename
}
billingId
billingLinkUrl
createdAt
customers {
__typename
}
}
}
plan {
additionalMetaData
awsMarketplacePlanDimension
basePlan {
__typename
}
billingId
billingLinkUrl
compatibleAddons {
additionalMetaData
billingId
billingLinkUrl
createdAt
dependencies {
__typename
}
description
}
}
resource {
createdAt
customer {
additionalMetaData
awsMarketplaceCustomerId
billingCurrency
billingId
billingLinkUrl
coupon {
__typename
}
}
environmentId
resourceId
subscriptions {
additionalMetaData
addons {
__typename
}
billingCycleAnchor
billingId
billingLinkUrl
billingPeriod
}
}
}
}Variables
{
"input": {
"customerId": "string",
"planId": "string"
}
}Response
{
"data": {
"checkoutState": {
"activeSubscription": {
"additionalMetaData": "value",
"addons": [
{
"addon": {
"__typename": "Addon"
},
"addonId": "string",
"createdAt": "value",
"id": "value",
"price": {
"__typename": "Price"
},
"quantity": 1.5
}
],
"billingCycleAnchor": "value",
"billingId": "string",
"billingLinkUrl": "string",
"billingPeriod": "ANNUALLY"
},
"billingIntegration": {
"billingCredentials": {
"__typename": "AirwallexCheckoutCredentials"
},
"billingIdentifier": "RECEIVED",
"credentials": {
"accountId": "string",
"publicKey": "string"
}
},
"configuration": {
"content": {
"collectPhoneNumber": true
},
"customCss": "string",
"palette": {
"backgroundColor": "string",
"borderColor": "string",
"primary": "string",
"summaryBackgroundColor": "string",
"textColor": "string"
},
"typography": {
"body": {
"__typename": "FontVariant"
},
"fontFamily": "string",
"h1": {
"__typename": "FontVariant"
},
"h2": {
"__typename": "FontVariant"
},
"h3": {
"__typename": "FontVariant"
}
}
},
"customer": {
"additionalMetaData": "value",
"awsMarketplaceCustomerId": "string",
"billingCurrency": "AED",
"billingId": "string",
"billingLinkUrl": "string",
"coupon": {
"additionalMetaData": "value",
"amountsOff": [
{
"__typename": "Money"
}
],
"billingId": "string",
"billingLinkUrl": "string",
"createdAt": "value",
"customers": [
{
"__typename": "Customer"
}
]
}
},
"plan": {
"additionalMetaData": "value",
"awsMarketplacePlanDimension": "string",
"basePlan": {
"__typename": "Plan"
},
"billingId": "string",
"billingLinkUrl": "string",
"compatibleAddons": [
{
"additionalMetaData": "value",
"billingId": "string",
"billingLinkUrl": "string",
"createdAt": "value",
"dependencies": [
{
"__typename": "Addon"
}
],
"description": "string"
}
]
},
"resource": {
"createdAt": "value",
"customer": {
"additionalMetaData": "value",
"awsMarketplaceCustomerId": "string",
"billingCurrency": "AED",
"billingId": "string",
"billingLinkUrl": "string",
"coupon": {
"__typename": "Coupon"
}
},
"environmentId": "value",
"resourceId": "string",
"subscriptions": [
{
"additionalMetaData": "value",
"addons": [
{
"__typename": "SubscriptionAddon"
}
],
"billingCycleAnchor": "value",
"billingId": "string",
"billingLinkUrl": "string",
"billingPeriod": "ANNUALLY"
}
]
}
}
}
}