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.

Cart transform API and discount codes

Cart transform API and discount codes

dduenas-acidlab
Shopify Partner
5 0 0

Hello!

I'm looking for a way to access to discounts which will be applied to a line item using Cart Transform. 
I'm using the following RunInput, but, unlike Cart & Checkout Validation, the amounts do not vary when the user enters discount coupons. Which does not allow me to detect if they are applying discounts at checkout or not.

 

 

query RunInput {
  cart {
    lines {
      id
      quantity
      cost {
        amountPerQuantity {
          amount
          currencyCode
        }
        compareAtAmountPerQuantity  {
          amount
          currencyCode
        }
        subtotalAmount  {
          amount
          currencyCode
        }
        totalAmount  {
          amount
          currencyCode
        }
      }
      merchandise {
        ... on ProductVariant {
          id
        }
      }
    }
  }
}

 

 

 

Replies 0 (0)