checkoutBrandingUpsert
Requires access to checkout branding settings and the shop must be on a Plus plan or a Development store plan. User must have preferences
permission to modify.
Updates the checkout branding settings for a checkout profile.
If the settings don't exist, then new settings are created. The checkout branding settings applied to a published checkout profile will be immediately visible within the store's checkout. The checkout branding settings applied to a draft checkout profile could be previewed within the admin checkout editor.
To learn more about updating checkout branding settings, refer to the checkout branding tutorial.
Arguments
- Anchor to checkoutBrandingInputcheckout•
Branding Input The input fields to use to upsert the checkout branding settings (pass null to reset them to default).
- Anchor to checkoutProfileIdcheckout•
Profile Id ID!required A globally-unique identifier.
Anchor to CheckoutBrandingUpsertPayload returnsCheckoutBrandingUpsertPayload returns
- Anchor to checkoutBrandingcheckout•
Branding Returns the new checkout branding settings.
- Anchor to userErrorsuser•
Errors The list of errors that occurred from executing the mutation.
- Apply section styles to main and order summary
- Modify a color scheme
- Modify checkout font settings
- Modify global colors
- Reset all styling to defaults
- Reset color schemes to the defaults
- Set a checkout logo
- checkoutBrandingUpsert reference
Examples
mutation ApplySectionStyles($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {
checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {
checkoutBranding {
customizations {
main {
section {
cornerRadius
colorScheme
shadow
padding
}
}
orderSummary {
section {
colorScheme
shadow
padding
border
}
}
}
}
userErrors {
field
message
}
}
}
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "mutation ApplySectionStyles($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) { checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) { checkoutBranding { customizations { main { section { cornerRadius colorScheme shadow padding } } orderSummary { section { colorScheme shadow padding border } } } } userErrors { field message } } }",
"variables": {
"checkoutProfileId": "gid://shopify/CheckoutProfile/235093654",
"input": {
"customizations": {
"main": {
"section": {
"cornerRadius": "LARGE",
"colorScheme": "COLOR_SCHEME2",
"shadow": "LARGE_200",
"padding": "LARGE_400"
}
},
"orderSummary": {
"section": {
"colorScheme": "COLOR_SCHEME1",
"shadow": "LARGE_200",
"padding": "LARGE_400",
"border": "FULL"
}
}
}
}
}
}'
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
mutation ApplySectionStyles($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {
checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {
checkoutBranding {
customizations {
main {
section {
cornerRadius
colorScheme
shadow
padding
}
}
orderSummary {
section {
colorScheme
shadow
padding
border
}
}
}
}
userErrors {
field
message
}
}
}`,
{
variables: {
"checkoutProfileId": "gid://shopify/CheckoutProfile/235093654",
"input": {
"customizations": {
"main": {
"section": {
"cornerRadius": "LARGE",
"colorScheme": "COLOR_SCHEME2",
"shadow": "LARGE_200",
"padding": "LARGE_400"
}
},
"orderSummary": {
"section": {
"colorScheme": "COLOR_SCHEME1",
"shadow": "LARGE_200",
"padding": "LARGE_400",
"border": "FULL"
}
}
}
}
},
},
);
const data = await response.json();
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `mutation ApplySectionStyles($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {
checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {
checkoutBranding {
customizations {
main {
section {
cornerRadius
colorScheme
shadow
padding
}
}
orderSummary {
section {
colorScheme
shadow
padding
border
}
}
}
}
userErrors {
field
message
}
}
}`,
"variables": {
"checkoutProfileId": "gid://shopify/CheckoutProfile/235093654",
"input": {
"customizations": {
"main": {
"section": {
"cornerRadius": "LARGE",
"colorScheme": "COLOR_SCHEME2",
"shadow": "LARGE_200",
"padding": "LARGE_400"
}
},
"orderSummary": {
"section": {
"colorScheme": "COLOR_SCHEME1",
"shadow": "LARGE_200",
"padding": "LARGE_400",
"border": "FULL"
}
}
}
}
},
},
});
session = ShopifyAPI::Auth::Session.new(
shop: "your-development-store.myshopify.com",
access_token: access_token
)
client = ShopifyAPI::Clients::Graphql::Admin.new(
session: session
)
query = <<~QUERY
mutation ApplySectionStyles($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {
checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {
checkoutBranding {
customizations {
main {
section {
cornerRadius
colorScheme
shadow
padding
}
}
orderSummary {
section {
colorScheme
shadow
padding
border
}
}
}
}
userErrors {
field
message
}
}
}
QUERY
variables = {
"checkoutProfileId": "gid://shopify/CheckoutProfile/235093654",
"input": {
"customizations": {
"main": {
"section": {
"cornerRadius": "LARGE",
"colorScheme": "COLOR_SCHEME2",
"shadow": "LARGE_200",
"padding": "LARGE_400"
}
},
"orderSummary": {
"section": {
"colorScheme": "COLOR_SCHEME1",
"shadow": "LARGE_200",
"padding": "LARGE_400",
"border": "FULL"
}
}
}
}
}
response = client.query(query: query, variables: variables)