Storefront API checkoutCompleteWithCreditCardV2 access denied

Hello,

I am working on an app builder app. For it I have create a store and with a public app that uses the Storefront GRAPHQL API. Shopify Payments is enabled with Test Mode on , using the Bogus payment gateway.

Now I am trying to use checkoutCompleteWithCreditCardV2 mutation for credit card test payment. I had fetched the vault id https://deposit.us.shopifycs.com/sessions

https://help.shopify.com/en/partners/dashboard/managing-stores/test-orders-in-dev-stores#testing-usi…

{> “card”: {> “number”: “4242424242424242”,> “exp_month”: 12,> “exp_year”: 2022,> “cvc”: 123> }> }

Now I got vault id as

{> “id”: “east-810da884392267c3e664e575e00a638a”> }

But when I hit the mutation

mutation checkoutCompleteWithCreditCardV2($checkoutId: ID!, $payment: CreditCardPaymentInputV2!) {> checkoutCompleteWithCreditCardV2(checkoutId: $checkoutId, payment: $payment) {> checkout {> id> }> checkoutUserErrors {> code> field> message> }> payment {> id> }> }> }

I got this response

{> “data”: {> “checkoutCompleteWithCreditCardV2”: null> },> “errors”: [> {> “message”: “CheckoutCompleteWithCreditCardV2 access denied”,> “locations”: [> {> “line”: 2,> “column”: 3> }> ],> “path”: [> “checkoutCompleteWithCreditCardV2”> ]> }> ]> }

I had followed the steps:

created checkout using : checkoutCreate => associateCustomerWithCheckout => checkoutShippingLineUpdate => checkoutShippingAddressUpdateV2 => to create a checkout with all required information.

Please help me out to fix this issue. Or guide me with any proper example or link or resources or video or anything which helps.

1 Like