appSubscriptionCreate confirmationUrl fails

Hi,
I am trying to test my app on my dev store. However, when I try to test the payment system on my subscriptions using GraphGL API, I get an error saying “The shop cannot accept the provided charge”. The credit card info is real even though I would prefer to use test credit card but cant find a way to do so (I only found a way to use test credit card if I need to charge customers instead of merchants).

I looked into FAQ area and googled a lot but can`t find a way to accomplish this.

Please help me understand the way to test my subscription API in my app.

Here is the part of the code:

const ADD_SUBSCRIPTION = gql`
  mutation appSubscriptionCreate($lineItems: [AppSubscriptionLineItemInput!]!, $name: String!, $returnUrl: URL!) {
    appSubscriptionCreate(lineItems: $lineItems, name: $name, returnUrl: $returnUrl) {
      appSubscription {
        id
        status
      }
      confirmationUrl
      userErrors {
        field
        message
      }
    }
  }
`;
......
const [createSubscription] = useMutation(ADD_SUBSCRIPTION);
......
const param = {
                        variables: {
                          lineItems: {
                            plan: {
                              appRecurringPricingDetails: {
                                price: {
                                  amount: 0.3, //30 cents
                                  currencyCode: 'USD'
                                },
                                interval: 'EVERY_30_DAYS'
                              }
                            }
                          },
                          name,
                          returnUrl: 'https://returnurl.com',
                        }
                      };
                      await createSubscription(param);

Once I go to the confirmationUrl and click approve or cancel, I get the error “The shop cannot accept the provided charge” (see attachment)

Thanks

Hi,

Unfortunately I don’t really have any insight on this error.

This board is about Subscriptions API as for selling product as a subscription but not app subscription.

Maybe try moving the question to Shopify APIs and Technology board. I’m sure there’s expert there would help you with this.

thanks

moving to here