Test charge not being applied

Need help regarding subscription api, I am using a dev store with basic plan.
I am also using appSubscriptionCreate to create appSubscriptionCreate - GraphQL Admin , with test argument as true. Still the payment for the subscription doesn’t show as a test charge.

Hey @Samir_Hembrom,

Can you share the full graphql request you are making? If possible, can you also share the x-request-id from the response headers. I would expect this to show as a test if marked as test in your input.

I tried logging the headers, but it doesn’t have the request id field. It only shows User-Agent and X-Shopify-Access-Token

Hey @Samir_Hembrom, looking at your mutation, I don’t see the test argument. Your mutation signature has $name, $lineItems, and $returnUrl - but no $test: Boolean parameter being passed to appSubscriptionCreate.

To create a test charge, you need to include test: true in the mutation input:

appSubscriptionCreate(
  name: $name,
  returnUrl: $returnUrl,
  lineItems: $lineItems,
  test: true  # Add this
) {
  ...
}

Can you double-check your code is actually passing test: true?

On the x-request-id: that’s in the response headers from Shopify, not the request headers you send. Check the HTTP response instead of your outgoing request.

I am dumb, I didn’t see the mutation at all. Thanks, I need to look through stuff before posting.