mutation {
checkoutCompleteWithCreditCardV2(
checkoutId: “gid://shopify/Checkout/eb6d03825ad479d2d92bba993a2a7704?key=9282da4901528da4de3afd1ddcef6108”,
vaultId:“682281968a007d4af32cd648cee44sb9”,
payment: {
idempotencyKey: “682281968a007d4af32cd648cee44db9”,
paymentAmount: {
amount: 1539.60,
currencyCode: INR
},
billingAddress: {
lastName: “abc”,
address1: “Abc circle”,
city: “surat”,
province: “GJ”,
country: “IN”,
zip: “395006”
},
creditCard: {
number: “1”,
name: “shavitri dhameliya”,
verification_value: “111”,
year: 2024,
month: 5
}
}
) {
checkout {
id
order {
id
}
shippingAddress {
address1
city
country
firstName
lastName
phone
province
zip
}
lineItems(first: 5) {
edges {
node {
quantity
variant {
id
title
priceV2 {
amount
currencyCode
}
}
}
}
}
subtotalPriceV2 {
amount
currencyCode
}
totalTaxV2 {
amount
currencyCode
}
totalPriceV2 {
amount
currencyCode
}
}
userErrors {
field
message
}
payment {
creditCard {
brand
expiryMonth
expiryYear
firstName
lastName
}
transaction {
amount {
amount
currencyCode
}
test
statusV2
}
}
}
}
it gives me error and how to create vault id
{
“errors”: [
{
“message”: “Field ‘checkoutCompleteWithCreditCardV2’ doesn’t accept argument ‘vaultId’”,
“locations”: [
{
“line”: 7,
“column”: 5
}
],
“path”: [
“mutation”,
“checkoutCompleteWithCreditCardV2”,
“vaultId”
],
“extensions”: {
“code”: “argumentNotAccepted”,
“name”: “checkoutCompleteWithCreditCardV2”,
“typeName”: “Field”,
“argumentName”: “vaultId”
}
},
{
“message”: “Argument ‘vaultId’ on InputObject ‘CreditCardPaymentInputV2’ is required. Expected type String!”,
“locations”: [
{
“line”: 9,
“column”: 14
}
],
“path”: [
“mutation”,
“checkoutCompleteWithCreditCardV2”,
“payment”,
“vaultId”
],
“extensions”: {
“code”: “missingRequiredInputObjectAttribute”,
“argumentName”: “vaultId”,
“argumentType”: “String!”,
“inputObjectType”: “CreditCardPaymentInputV2”
}
},
{
“message”: “InputObject ‘CreditCardPaymentInputV2’ doesn’t accept argument ‘creditCard’”,
“locations”: [
{
“line”: 37,
“column”: 7
}
],
“path”: [
“mutation”,
“checkoutCompleteWithCreditCardV2”,
“payment”,
“creditCard”
],
“extensions”: {
“code”: “argumentNotAccepted”,
“name”: “CreditCardPaymentInputV2”,
“typeName”: “InputObject”,
“argumentName”: “creditCard”
}
}
]
}