GraphQL Billing API test charge

COChrisWong
Visitor
2 0 0

Hi guys, I'm using GraphQL billing API to do a app install payment and here is my query.

 

{
        "query": "mutation AppPurchaseOneTimeCreate($name: String!, $price: MoneyInput!, $returnUrl: URL!){ appPurchaseOneTimeCreate(name: $name, returnUrl: $returnUrl, price: $price) { userErrors { field message } appPurchaseOneTime { createdAt, id, }, confirmationUrl } }",
         "variables": {
            "name": "TEST one-time purchase",
            "test": true,
            "returnUrl": "my domain callback",
            "price": {
              "amount": 1.0,
              "currencyCode": "USD"
            }
          }
        }

 

 

I have set the "test" as true, but shopify still asking me to add credit card to my account, I cannot use the test charge.

 

image.png

 

Did I miss anything to do or is there any solution? shopify support only keep post me the document here

Reply 1 (1)
Georgekpc
Shopify Partner
17 0 2

Have a look at the documention

You have to pass "test" as an argument to "appPurchaseOneTimeCreate"