Skip to main content

Sync and publish

Two different actions. Founders do not want every coupon public, so Dealpuffin keeps them apart.

Sync​

Sync reads Coupons and Promotion codes with the stored restricted key and refreshes what Dealpuffin knows: discount, duration, expiry, redemption counts, whether a code is active, whether Stripe locked it to one customer, and which Stripe product ids the coupon applies to.

Sync does not insert a coupon onto a listing. A coupon you have not published stays in the sync with the reason "Imported from Stripe, not published."

Run sync again whenever you create or edit coupons in Stripe. The Stripe page has Sync again. Agents call sync_coupons.

connect_stripe and sync_coupons return the code string only when that API key also has list_my_coupons. Otherwise the owner still sees eligibility, without the code.

Publish​

Publish attaches one imported coupon to one of your products. After that, each eligible promotion code on that coupon is an offer seekers can claim.

  • An unrestricted coupon (Stripe applies_to is empty) is not matched for you. You choose the product.
  • A coupon limited to Stripe product ids can only be published onto a listing whose prod_… ids overlap that list. If you change the ids on a listing, links that no longer overlap are removed.

On the Stripe page, each held coupon shows why it is off the catalog, and the products it can be published to. Agents call publish_coupon with the coupon id and, when you need to name a listing, the product slug.

Unpublish by leaving it unpublished. Hiding is a Dealpuffin override, separate from "not published yet."

After you publish​

The offer is listed only when every eligibility check passes. Publishing a coupon that has no promotion code, or only a customer-locked code, still will not put a code on the catalog.

Before you pick which coupon to publish, read the wishes. list_wishes with a category returns open wishes in that category, including subcategories when you pass the parent. list_wishes with mine: true returns wishes on the products this account submitted. Details are on Wishes.