Launch offer for the first 500 accounts: $10K MTR free for 24 months + $100 credit →
    .io
    Monetization
    Any platform
    Intermediate
    39 min

    Run a scheduled sale with promo codes

    To run a time-boxed sale with BillDog, publish a sale paywall, then create a campaign under Engagement → Campaigns that serves it on your placement between a Start Date and an End Date. A Countdown component in the paywall builder shows the time left. For web checkout, create codes under Monetization → Promotion Codes; on iOS, BillDog.shared.presentCodeRedemptionSheet() opens Apple's offer-code sheet.

    Steps last checked against the SDK source on 16 Nov 2026.

    What you'll build

    • A sale paywall that replaces your normal paywall on onboarding for a fixed window, then switches back by itself
    • A countdown to the end of the sale inside the paywall
    • A Stripe promotion code customers can type at web checkout, or that your server applies for them
    • An in-app button that opens the App Store offer-code sheet

    What you'll need

    • An app that shows a paywall from the onboarding placement (the iOS, Android, Flutter or React Native codelab)
    • For web promotion codes: Stripe connected and a product with a Stripe price (steps 1 and 2 of the headless web paywall codelab)
    • For App Store promotional offers: your In-App Purchase key under Project Settings → Settings → Store Setup (App Store setup)

    1. Decide where the discount comes from

    3 min

    BillDog decides which paywall a user sees and when. It doesn't change store prices. The discount itself comes from each store, so set it up there first:

    • App Store: an introductory offer (new subscribers) or a promotional offer on the subscription in App Store Connect. BillDog signs promotional offers with your In-App Purchase key. Apple has limited promotional offers to current and past subscribers, so check Apple's current eligibility rules before you aim one at new users.
    • Google Play: an offer on the subscription's base plan in Play Console. Note its offer ID. Set its eligibility to developer determined and add the tag bd-ignore-offer, so your normal paywall doesn't pick it up automatically. A tagged offer can still be pinned to the sale package.
    • Web (Stripe): a promotion code you create in BillDog (step 5), or a cheaper Stripe price on a separate product.
    • Any store: a separate, cheaper product. It needs its own store product, so plan for review time.

    2. Build the sale offering and paywall

    12 min
    1. Open Monetization → Offerings and click New Offering, for example black_friday. Leave Mark as current offering off. Add the same products as your normal offering (or the sale products) with Add Product, then Save Changes.
    2. In Paywalls & Funnels, duplicate the paywall your placement serves today. The copy is an inactive draft named "(Copy)". Open it and, in the Products panel (the box icon in the left rail), choose the black_friday offering under Offering.
    3. To sell a store offer, open a package's menu in the Products panel and click Edit preferred offer IDs. Fill in Preferred Play offer ID with the Play offer ID. It is saved on the offering's package, which is why the sale uses its own offering: your normal paywall keeps full price. For the App Store, click Settings in the left rail and type the promotional offer identifier into Promo Offer Identifier (iOS) under App Store Integration. Use that rather than the package's Preferred App Store promo offer ID: on iOS the package pin is missed when the same product is also in your current offering.
    4. Add a Countdown component from the component palette. Under Countdown Settings, set End Time to the moment the sale ends as an ISO date, for example 2026-11-30T23:59:59Z, and set Expired Text to something like Sale ended.
    5. Change the headline and button copy, then click Publish (then Save & Publish). Check it shows Live under Paywalls & Funnels → All Paywalls.

    Use a fixed ISO date for a sale. A relative End Time such as +1d counts from the moment the paywall opens, so every user sees a fresh full day.

    3. Schedule it with a campaign

    8 min

    A campaign serves a paywall on one or more placements, for an audience, inside a date window. Outside the window the placement serves its own linked offering again, so the sale ends without anyone touching it.

    1. Open Engagement → Campaigns and click New Campaign.
    2. Under Basic Info, enter a Campaign Name, choose Campaign Type: Promotional and Content Type: Paywall, then click Next. This saves a draft.
    3. Under Placements, click Add Placement and choose onboarding from Available Placements. Click Next.
    4. Under Audiences, click Add Audience. Enter an Audience Name, choose Paywall under Content Type, pick the sale paywall in Select Paywall and keep Allocation at 100%. Leave the conditions empty to include everyone, then click Create Audience and Next.
    5. Under Schedule, set Start Date and End Date. Click Next, check the Review step and click Save & Activate.

    Dates are whole days in UTC: the campaign starts at 00:00 UTC on the start date and ends at 23:59:59 UTC on the end date. Match the countdown's End Time to that, or pick dates that fit your time zone.

    Only one active campaign can use a placement at a time (default campaigns aside), and the dates don't change that. If another active campaign already owns onboarding, the placement shows Used by active campaign and activation is refused. Pause the other campaign or use a different placement.

    To test before launch, set the Start Date to today, switch the dashboard header to Sandbox and open the placement on a test device. Your app code doesn't change: register returns the campaign's paywall while it runs.

    4. Create a promotion code for web checkout

    6 min

    Promotion codes discount BillDog web checkout (Stripe). They live in your own Stripe account, in the mode your Stripe key is in. App Store and Google Play purchases use the stores' own offer codes (step 7).

    1. Open Monetization → Promotion Codes and click Create Coupon.
    2. In Create Promotion Code, enter a Name (shown in Stripe and on this page) and a Promotion Code such as BLACKFRIDAY30. That is what customers type. Leave it empty for a coupon only your server can apply.
    3. Choose a Discount Type: Percentage with Percentage Off, or Fixed Amount with Amount Off and a Currency (it only applies to checkouts in that currency).
    4. Choose a Duration: Once (first payment only), Multiple months (then Duration in Months) or Forever (all payments).
    5. Optionally set Max Redemptions and a Last Day. The code works until the end of that day in your time zone. Set it to the last day of the sale.
    6. Click Create Coupon.

    Customers can only type a code if Stripe Checkout shows the field. Turn on Customers can enter promotion codes on web checkout under Code entry at checkout on the same page. That project default applies to in-app web checkouts and web SDK checkouts. A placement's hosted checkout page can override it on the placement's Web tab (Promotion code field).

    Codes you made in the Stripe dashboard appear after you click Sync with Stripe. The page also shows redemptions: Checkouts with a code, Discounts given and Revenue with a code.

    5. Apply a code from your server

    5 min

    To give a sale price without asking the buyer to type anything, start the checkout from your server with a secret key and name the code. The code is matched case-insensitively against active codes in BillDog. The answer's data.url is the Stripe Checkout page to redirect the buyer to.

    Terminal
    curl -X POST https://api.billdog.io/v1/create-web-checkout \
      -H "X-BillDog-API-Key: bd_secret_test_YOUR_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "source": "web_paywall",
        "product_id": "premium_monthly",
        "app_user_id": "user_123",
        "promotion_code": "BLACKFRIDAY30",
        "success_url": "https://example.com/thanks",
        "cancel_url": "https://example.com/pricing"
      }'
    • product_id is the product's Product Identifier (its BillDog ID or Stripe price ID also work).
    • Send coupon_id (the BillDog coupon ID) instead of promotion_code for a coupon with no code. Send one or the other, not both.
    • With a code applied, Stripe hides the code field, so don't also send allow_promotion_codes: true. That's refused.
    • A public key can't apply codes: the server answers 403 ACCESS_DENIED with reason server_only.
    • An expired or wrong-mode code is refused with 400 and reason coupon_expired or coupon_wrong_mode; an unknown or deactivated code with 404. (coupon_inactive is the reason for a deactivated coupon_id.)

    6. Let users redeem store offer codes

    5 min

    App Store offer codes are created in App Store Connect and redeemed through Apple's own sheet. On iOS, presentCodeRedemptionSheet() opens it. It runs on the main actor and throws if there is no window scene to present in.

    RedeemCodeButton.swift
    import SwiftUI
    import BillDogFull
    
    struct RedeemCodeButton: View {
        var body: some View {
            Button("Redeem a code") {
                Task {
                    do {
                        try await BillDog.shared.presentCodeRedemptionSheet()
                    } catch {
                        print("Could not open the code sheet: \(error)")
                    }
                }
            }
        }
    }

    The redeemed subscription arrives as a StoreKit transaction outside your purchase flow. The SDK listens for those and records them, so the entitlement follows. Refresh with getCustomerInfo(forceRefresh: true) after the sheet closes if you show the plan on screen.

    Google Play promo codes are redeemed in the Play Store app, not in yours, and the Android SDK has no call for them. When the purchase reaches your app's billing listener, the SDK records it like any other. Set up Play's real-time notifications (Google Play setup) so the server hears about it even before the app opens.

    Frequently asked questions

    Publish the sale paywall, then create a campaign under Engagement → Campaigns with Content Type Paywall, add your placement, add an audience that shows the sale paywall, set a Start Date and End Date, and click Save & Activate. Outside those dates the placement serves its normal offering.

    Yes. The server checks the campaign's dates on every placement request, so after 23:59:59 UTC on the end date users get the placement's own offering again. The countdown's End Time is separate, so set it to the same moment.

    No. BillDog promotion codes are Stripe coupons for web checkout. App Store purchases use offer codes from App Store Connect, which iOS users redeem with presentCodeRedemptionSheet(). Google Play promo codes are redeemed in the Play Store app.

    The field is off by default. Turn on Customers can enter promotion codes on web checkout under Monetization → Promotion Codes. A hosted checkout page can override this on the placement's Web tab, and a server checkout decides for itself with allow_promotion_codes.

    Not at the same time. Only one active campaign can own a placement, whatever its dates. Pause the other campaign for the sale, or use a default campaign for your evergreen paywall, since a default campaign only serves when the placement's own campaign matches no one.

    Reference

    Ship it on a free project

    Create a project, grab your SDK key and follow along. Sandbox purchases and data stay separate from production, so test transactions never mix with real revenue.

    We use cookies and process your data to provide our services. By continuing, you agree to our Terms and Privacy Policy.