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