Retrieve CheckoutSettings
To retrieve saved Checkout settings, you can use the checkoutSettings
query. This will return the CheckoutSettings
object associated with the Organization your API key is associated with.
Query
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
query {
checkoutSettings {
allowedDomains
googleAnalyticsTrackingID
orderNotifications {
abandonedCart {
delay
discountPercent
status
}
orderCancelled
orderConfirmation
orderShipped
}
successBehavior
successRedirectUrl
createdAt
createdBy
updatedAt
updatedBy
id
mode
organization
}
}
Response
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
"data": {
"checkoutSettings": {
"allowedDomains": ["https://mydomain.com", "https://myotherdomain.com"],
"googleAnalyticsTrackingID": "UA-123456789-1",
"orderNotifications": {
"abandonedCart": {
"delay": 24,
"discountPercent": 5.0,
"status": "ENABLED"
},
"orderCancelled": "ENABLED",
"orderConfirmation": "ENABLED",
"orderShipped": "ENABLED"
},
"successBehavior": "REDIRECT_TO_SUCCESS_PAGE",
"successRedirectUrl": "https://mydomain.com/success",
"createdAt": "2023-07-10T12:34:56Z",
"createdBy": "USER_ID",
"updatedAt": "2023-07-12T12:34:56Z",
"updatedBy": "USER_ID",
"id": "CHECKOUT_SETTINGS_ID",
"mode": "TEST",
"organization": "ORG_ID"
}
}
}
Update CheckoutSettings
You can update CheckoutSettings
with the checkoutSettingsUpdate
mutation. You only need to include the fields you want to update.
Mutation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
mutation {
checkoutSettingsUpdate(
input: {
successRedirectUrl: "https://mynewdomain.com/success"
orderNotifications: { abandonedCart: { status: ENABLED } }
}
) {
allowedDomains
googleAnalyticsTrackingID
orderNotifications {
abandonedCart {
delay
discountPercent
status
}
orderCancelled
orderConfirmation
orderShipped
}
successBehavior
successRedirectUrl
createdAt
createdBy
updatedAt
updatedBy
id
mode
organization
}
}
Response
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
"data": {
"checkoutSettingsUpdate": {
"allowedDomains": ["https://mydomain.com", "https://myotherdomain.com"],
"googleAnalyticsTrackingID": "UA-123456789-1",
"orderNotifications": {
"abandonedCart": {
"delay": 24,
"discountPercent": 5.0,
"status": "ENABLED"
},
"orderCancelled": "ENABLED",
"orderConfirmation": "ENABLED",
"orderShipped": "ENABLED"
},
"successBehavior": "REDIRECT_TO_SUCCESS_PAGE",
"successRedirectUrl": "https://mynewdomain.com/success",
"createdAt": "2023-07-10T12:34:56Z",
"createdBy": "USER_ID",
"updatedAt": "2023-07-12T12:34:56Z",
"updatedBy": "USER_ID",
"id": "CHECKOUT_SETTINGS_ID",
"mode": "TEST",
"organization": "ORG_ID"
}
}
}
Manage Checkout settings
Learn how to configure Checkout with GraphQL.Coming soon
All of the Zonos Checkout's settings that can be configured via Dashboard can also be configured via the API using GraphQL via the
CheckoutSettings
object.