Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Available tap actions are:
- **Purchase:** Begins the purchase flow for a specific product. Choose a product directly, or use **Selected** to purchase whichever product the user selected earlier in the paywall.
- **Select Product:** Puts the chosen product in a selected state. Useful for scenarios such as focusing a product in a paywall drawer, for example, when something is tapped or clicked.
- **Restore:** Begins a purchase restore operation. Useful for restoring purchases someone may have made prior.
- **Redeem Discount:** For web checkout paywalls, validates a Stripe promotion code, re-prices the paywall's products in place, and applies the code at Stripe checkout. Point its **code** at a state variable bound to a text input (for customer-entered codes) or at a hardcoded literal (for a fixed promotion). See [Discount Codes](/web-checkout/web-checkout-discount-codes).
- **Apply Discount:** For web checkout paywalls, validates a Stripe promotion code, re-prices the paywall's products in place, and applies the code at Stripe checkout. Point its **code** at a state variable bound to a text input (for customer-entered codes) or at a hardcoded literal (for a fixed promotion). See [Discount Codes](/web-checkout/web-checkout-discount-codes).

#### Purchase outcome actions

Expand Down
8 changes: 4 additions & 4 deletions content/docs/web-checkout/web-checkout-discount-codes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: "Let customers enter a Stripe promotion code on your web paywall, u

Discount codes let a customer type a promotion code into your web paywall, have it validated against Stripe, and see the price update before they check out. The code is then carried through to the Stripe checkout session, so the discount is applied to the purchase they complete.

This works entirely on your paywall — there is no separate discount widget to configure. You add a normal text **Input** for the customer to type into, then a button whose tap behavior runs the **Redeem Discount** action. When the customer taps it, Superwall resolves the code against your Stripe promotion codes, re-prices the products on the paywall, and applies the code at checkout.
This works entirely on your paywall — there is no separate discount widget to configure. You add a normal text **Input** for the customer to type into, then a button whose tap behavior runs the **Apply Discount** action. When the customer taps it, Superwall resolves the code against your Stripe promotion codes, re-prices the products on the paywall, and applies the code at checkout.

<Note>
Discount codes are a Stripe web checkout feature. The customer redeems a promotion code you have
Expand All @@ -31,13 +31,13 @@ You will add a text input for the customer to type into, then a button that rede

<Steps>
<Step title="Add an input for the code">
Add an [Input element](/dashboard/dashboard-creating-paywalls/paywall-editor-input-component) where the customer will type their code, and give it a helpful placeholder such as "Promo code". Bind the input to a state variable — for example, `state.discountCode` — so the value the customer types is available to the redeem action.
Add an [Input element](/dashboard/dashboard-creating-paywalls/paywall-editor-input-component) where the customer will type their code, and give it a helpful placeholder such as "Promo code". Bind the input to a state variable — for example, `state.discountCode` — so the value the customer types is available to the Apply Discount action.
</Step>
<Step title="Add a button to redeem">
Add a button (or reuse an existing one) next to the input. This is the element the customer taps to apply their code.
</Step>
<Step title="Add the Redeem Discount action">
Select the button and, under [Tap Behavior](/dashboard/dashboard-creating-paywalls/paywall-editor-styling-elements#tap-behaviors), click **+ Add Action**. In the **Purchases** group, choose **Redeem Discount**.
<Step title="Add the Apply Discount action">
Select the button and, under [Tap Behavior](/dashboard/dashboard-creating-paywalls/paywall-editor-styling-elements#tap-behaviors), click **+ Add Action**. In the **Purchases** group, choose **Apply Discount**.
</Step>
<Step title="Point the action at the code">
Set the action's **code** to reference the input's state variable using Liquid, for example `{{ state.discountCode }}`. This redeems whatever the customer typed.
Expand Down
Loading