AppPurchaseOneTimeCreate does not respect `test` field value

I’m testing single purchase AppPurchaseOneTimeCreate, setting test: true according to the docs

```variables: {
name: ‘App Subscription Single Purchase Charge’,
returnUrl: ‘’,
price: { amount: 190, currencyCode: ‘USD’ },
test: true
}```

When I query the id, says test: false so I can’t test my full flow, I get error The shop cannot accept the provided charge.

Anyone else having this problem? Any solution?

1 Like

Hi @William_Belk

The Shopify Remix template I’m using supports billing.

const billingCheck = await billing.require({
      plans: [MONTHLY_0_5_PLAN, MONTHLY_1_5_PLAN, MONTHLY_2_5_PLAN, PURCHASE_ONE_TIME_PLAN],
      isTest: true,
      returnUrl: '/app/subscription',
      onFailure: () => redirect('/app/subscription'),
    });

You can try using `isTest: true`.

thanks @kyle_liu already tried that from another thread, doesn’t seem to work either

Hey William, according to the appPurchaseOneTimeCreate docs, test: true should work. I’d like to help replicate this on my end. Could you share:

  1. The full GraphQL mutation you’re sending (not just the variables). I’ve seen cases where the test field gets ignored due to syntax issues
  2. The complete API response when you create the charge (including any userErrors and the x-request-id from the response headers)
  3. The query you’re using to check the charge afterward that shows test: false

Once I can see the exact request/response, I can try to reproduce it and figure out what’s going on.