Introduction
Getting Started
- Apps
- Pagination
- Authentication
- Environments
- Definitions
Checkout
- Overview
- Getting Started
- Merchants
- Catalog
- Carts and Bags
- Discounts
- Payments
- Payouts
- Webhooks
- Guides
- FAQs
- Resources
- Current Platforms
Violet Connect
- Overview
- Setup
- Payouts
- Commissions
- Guides
- Testing
- FAQs
Relay
Product Info
Discounts FAQs
Can I use a discount code on platforms that don’t support them?
It’s possible to add discount codes to unsupported platforms, they will have the NOT_SUPPORTED
status and will be ignored during order submission. This will not cause any errors blocking checkout.
Are discount codes case sensitive?
While some ecommerce platforms do support case insensitive discount codes, this is not universal and some platforms do treat codes as case sensitive. Therefore, since you might not know which platform a code is being applied to and what that platform’s rules are, it is best to treat codes as case sensitive and message that to your shoppers.
What does the discounted order look like inside of the e-commerce platform?
BigCommerce
Magento
WooCommerce (Accepts multiple discount codes)
How does commission work with discount codes?
The commission is calculated based on the discounted item price. During final order submission, after a cart has been fully populated and any discounts are applied we request the final pricing for the cart from the external commerce platform and calculate the commission from those values.
How long does the API call usually take to add a discount?
Most platforms allow adding discount codes during cart creation, so this approach doesn’t add relevant time to the API call, assuming you send in the discounts as part of create cart.
The stand alone add discount API varies per platform, but averages around 1 second.
What’s the best architectural approach for using the discount code on add cart versus using the dedicated endpoint?
For a channel just posting orders for the user, it’s recommended to add all discounts during cart creation saving the extra call.
For checkout style channels allowing users to add/remove discounts to the cart themselves, it can still make sense to wait to create the cart in Violet until all discounts are added. However, for maximum responsiveness to user inputs and flows, using the standalone endpoint may make the most sense.
How is a discount code different from a promo code? Or other promotion?
Discount codes and promo codes are used interchangeably in platforms, the same as coupons.
Some platforms may also offer promotions that are added to carts automatically based on preset rules. This is typically just a “retail price” and a “sale price” with the traditional strike through of the retail price.
How can I test these different scenarios and statuses in Test Mode so I know my app is handling each error and case correctly?
You can test each of the different statuses using the following approaches
PENDING
- Add a discount code to a platform that doesn’t process it right away, like WooCommerce.
APPLIED
- Add a valid discount code to a platform that process it right away, like BigCommerce or Magento.
- Or price a cart with a valid
PENDING
discount code.
INVALID
- Add any invalid discount code to a platform that process it right away, like BigCommerce or Magento.
- Or price a cart with a invalid
PENDING
discount code.
NOT_SUPPORTED
- Add a discount code to any platform that is not listed in our supported platforms table.
ERROR
- Not reproducible in normal circumstances.
EXPIRED
- Prepare a cart with an
APPLIED
discount, go to merchant platform and disable that discount code, price the cart through the API again.
- Prepare a cart with an
Can I use discount codes with Apple Pay?
While most discount codes can be used with Apple Pay, there is limited support for Free Shipping discount codes when using the full Apple Pay Checkout flow. Note these limitations do not apply to the Apple Pay Payment flow.
The issue is that many free shipping codes require a shipping method to have been selected before being applied, but the shopper only selects shipping in the Apple Pay screen, which does not have native support for discount code entry and is thus after your experience’s discount entry screen.
One alternative you could consider is storing the shipping code locally until the shipping method is selected and then applying it, while informing the user that it will be applied at checkout.
Was this page helpful?
- Can I use a discount code on platforms that don’t support them?
- Are discount codes case sensitive?
- What does the discounted order look like inside of the e-commerce platform?
- How does commission work with discount codes?
- How long does the API call usually take to add a discount?
- What’s the best architectural approach for using the discount code on add cart versus using the dedicated endpoint?
- How is a discount code different from a promo code? Or other promotion?
- How can I test these different scenarios and statuses in Test Mode so I know my app is handling each error and case correctly?
- Can I use discount codes with Apple Pay?