Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Storefront API checkoutCompleteWithCreditCardV2 access denied

Storefront API checkoutCompleteWithCreditCardV2 access denied

VishalSatwara
Visitor
2 0 2

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.

Replies 0 (0)