--- title: Update the maximum charge for a subscription description: >- Learn how to update the maximum amount that merchants can be charged for each purchase. source_url: html: >- https://shopify.dev/docs/apps/launch/billing/subscription-billing/update-max-charge md: >- https://shopify.dev/docs/apps/launch/billing/subscription-billing/update-max-charge.md --- ExpandOn this page * [Requirements](https://shopify.dev/docs/apps/launch/billing/subscription-billing/update-max-charge.md#requirements) * [Step 1: Retrieve charge data](https://shopify.dev/docs/apps/launch/billing/subscription-billing/update-max-charge.md#step-1-retrieve-charge-data) * [Step 2: Update the capped amount](https://shopify.dev/docs/apps/launch/billing/subscription-billing/update-max-charge.md#step-2-update-the-capped-amount) * [Next steps](https://shopify.dev/docs/apps/launch/billing/subscription-billing/update-max-charge.md#next-steps) # Update the maximum charge for a subscription Update the maximum amount that merchants can be charged for their subscription. You should do this if you change your pricing model. Note If you try to create a usage record for a usage pricing plan with an amount that's less than the new usage record, then the request fails. You need to increase the `cappedAmount`, and then obtain merchant approval before you can create more usage records. *** ## Requirements * Your app can make [authenticated requests](https://shopify.dev/docs/api/admin-graphql#authentication) to the GraphQL Admin API. *** ## Step 1: Retrieve charge data Make a request to the [`AppSubscription`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AppSubscription) object for the following data: * `id` * `cappedAmount` The `cappedAmount` is the maximum that a merchant is billed for during the 30-day billing cycle. The `currencyCode` must be one of the [supported currencies](https://shopify.dev/docs/apps/launch/billing#supported-currencies). * `balanceUsed` The following query is an example: ## POST https://{shop}.myshopify.com/api/{api\_version}/graphql.json ## JSON response ```json { "data": { "node": { "lineItems": [ { "plan": { "pricingDetails": { "terms": "$1 for 100 emails", "cappedAmount": { "amount": "20.0", "currencyCode": "USD" }, "balanceUsed": { "amount": "0.0", "currencyCode": "USD" } } } } ] } }, ... } ``` *** ## Step 2: Update the capped amount Update the app subscription's capped amount by passing the `AppSubscription` ID to the [`appSubscriptionLineItemUpdate`](https://shopify.dev/docs/api/admin-graphql/latest/mutations/appSubscriptionLineItemUpdate) mutation as an argument. The following mutation is an example: ## POST https://{shop}.myshopify.com/api/{api\_version}/graphql.json ## JSON response ```json { "data": { "appSubscriptionLineItemUpdate": { "userErrors": [], "confirmationUrl": "https://domain.myshopify.com/admin/charges/4019585080/confirm_update_capped_amount?signature=BAh7BzoHaWRsKwc4AJbvOhJhdXRvX2FjdGl2YXRlRg%3D%3D--a93b35054feb213f04f1ee35ef5b569617ce6823", "appSubscription": { "id": "gid://shopify/AppSubscription/4019585080" } } }, ... } ``` *** ## Next steps [Discounts\ \ ](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) [Learn about offering subscription discounts.](https://shopify.dev/docs/apps/launch/billing/subscription-billing/offer-subscription-discounts) *** * [Requirements](https://shopify.dev/docs/apps/launch/billing/subscription-billing/update-max-charge.md#requirements) * [Step 1: Retrieve charge data](https://shopify.dev/docs/apps/launch/billing/subscription-billing/update-max-charge.md#step-1-retrieve-charge-data) * [Step 2: Update the capped amount](https://shopify.dev/docs/apps/launch/billing/subscription-billing/update-max-charge.md#step-2-update-the-capped-amount) * [Next steps](https://shopify.dev/docs/apps/launch/billing/subscription-billing/update-max-charge.md#next-steps)