Headless commerce and custom storefronts with Shopify APIs and SDKs
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
{
"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.
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023