Skip to Content
StoreOSv0.27.1
Storefront GraphQL APIReferenceMutations

Verify Coupon

MUTATIONverifyCoupon(input: VerifyCouponInput!): VerifyCouponResponse!

Arguments

input*

Returns

  1. verifyCoupon
valid*Boolean!
message*String!
couponCode?String
discountAmount?Float
subtotal?Float
totalAfterDiscount?Float
Example Request
mutation VerifyCoupon($input: VerifyCouponInput!) {  verifyCoupon(input: $input) {    valid    message    couponCode    discountAmount    subtotal    totalAfterDiscount  }}
Variables
{  "input": {    "code": "string",    "lineItems": [      {        "productId": "1",        "quantity": 10      }    ]  }}
Example Response
{  "data": {    "verifyCoupon": {      "valid": true,      "message": "string",      "couponCode": "string",      "discountAmount": 10.5,      "subtotal": 10.5,      "totalAfterDiscount": 10.5    }  }}