Managed Pricing Apps cannot use the Billing API (to create charges).

Topic summary

A developer encountered an error when attempting to create app charges using Shopify’s Billing API. The error message states “Managed Pricing Apps cannot use the Billing API (to create charges).”

The Issue:

  • The error occurred when executing an appSubscriptionCreate GraphQL mutation
  • The mutation included standard billing parameters: subscription name, line items, return URL, trial days, and test mode

The Solution:

  • By default, Shopify manages app payments automatically
  • Developers must disable “Managed Pricing” in their app settings to use the Billing API directly
  • The developer resolved the issue by adjusting these settings

Status: Resolved - the developer identified that managed pricing needed to be disabled to gain direct access to the Billing API.

Summarized with AI on November 3. AI used: claude-sonnet-4-5-20250929.

When I try to request a link to charge my app to the user it throws me this error:

userErrors: [
 {
  field: null,
  message: 'Managed Pricing Apps cannot use the Billing API (to create charges).'
 }
],

This is my query:

const response = await admin.graphql(
    `#graphql
     mutation AppSubscriptionCreate($name: String!, $lineItems: [AppSubscriptionLineItemInput!]!, $returnUrl: URL!, $trialDays: Int, $test: Boolean) {
       appSubscriptionCreate(name: $name, returnUrl: $returnUrl, lineItems: $lineItems, trialDays: $trialDays, test: $test) {
         userErrors {
           field
           message
         }
         appSubscription {
           id
         }
         confirmationUrl
       }
     }`,
    {
      variables: {
        "name": "APP PROVA",
        "returnUrl": `https://admin.shopify.com/store/${session.shop.replace('.myshopify.com', '')}`,
        "trialDays": 14,
        "test": true,
        "lineItems": [
          {
            "plan": {
              "appUsagePricingDetails": {
                "cappedAmount": {
                  "amount": 5.99,
                  "currencyCode": "USD"
                },
                "terms": "Terms info"
              }
            }
          }
        ]
      },
    },
  );

Apparently by default Shopify manages your payments, so it should be disabled from the settings

https://shopify.dev/docs/apps/launch/billing/managed-pricing