Hello I’m building Billing plans for my App. But I can’t test it since the created charge is not for for test which I can’t proceed on confirmationUrl since it needs real credit card.
Already added test: true on the variable but still it return test: false on response.
// Request GrapQL
const response: Response = await admin.graphql(
`#graphql
mutation AppSubscriptionCreate($name: String!, $lineItems: [AppSubscriptionLineItemInput!]!, $returnUrl: URL!) {
appSubscriptionCreate(name: $name, returnUrl: $returnUrl, lineItems: $lineItems) {
userErrors {
field
message
}
appSubscription {
id
name
status
test
}
confirmationUrl
}
}`,
{
variables: {
"name": "Super Duper Recurring Plan",
"returnUrl": "http://super-duper.shopifyapps.com/",
"lineItems": [
{
"plan": {
"appRecurringPricingDetails": {
"price": {
"amount": 10,
"currencyCode": "USD"
},
"interval": "EVERY_30_DAYS"
}
}
},
],
"test": true
}
,
}
);
const responseJson = await response.json();
return responseJson;
// Response
05:58:58 │ remix │ appSubscriptionCreateResponse: {
05:58:58 │ remix │ userErrors: [],
05:58:58 │ remix │ appSubscription: {
05:58:58 │ remix │ id: 'gid://shopify/AppSubscription/xxxxxx',
05:58:58 │ remix │ name: 'Super Duper Recurring Plan',
05:58:58 │ remix │ status: 'PENDING',
05:58:58 │ remix │ test: false
05:58:58 │ remix │ },
05:58:58 │ remix │ confirmationUrl: 'https://xxxxx.myshopify.com/admin/charges/84537933825/35213082904/RecurringApplicationCharge/confirm_recurring_application_charge?signature=BAh
7BzoHaWRsKwgYAd0yCAA6EmF1dG9fYWN0aXZhdGVU--xxxxxxxxx'
05:58:58 │ remix │ }
Also click cancel button return this error:

While using Remix billing does redirect to test charged billing.
Can you help me guys?

