Discount codes

Run promos on your storefront — percent or fixed-amount codes buyers enter on the order form. Discount codes are the Marketing module, powered by Ripllo (the Forjio family's marketing service), and available on Starter and up (plans).

Enable the module

Flip on Marketing at /dashboard/integrations. The first enable provisions a Ripllo workspace for your storefront automatically — no Ripllo sign-up needed. A 0.3% module fee applies on discounted orders. On the Free plan the toggle answers 403 UPGRADE_REQUIRED.

Disabling later just flips the module off — your codes and redemption history stay in the Ripllo workspace and come back on re-enable.

Create and manage codes

Manage codes at /dashboard/discounts: code, type (percent or fixed IDR amount), value, optional description, usage limits, and expiry. Codes live in your Ripllo workspace; the dashboard talks to them through Serront's proxy:

# List your codes
curl -H "Authorization: Bearer sk_live_xxx" \
  "https://serront.com/api/v1/ripllo/discount-codes?limit=100"

# Create one
curl -X POST https://serront.com/api/v1/ripllo/discount-codes \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"code": "LAUNCH20", "type": "percent", "value": 20}'

Everything under /api/v1/ripllo/* forwards verbatim to the matching Ripllo endpoint, scoped to your workspace. While the module is off, these answer 409 MARKETING_MODULE_DISABLED.

What buyers see

With the module on, the order form on your storefront grows a discount code field:

  • The form previews the code before submitting ("you save Rp …, new total Rp …") via a read-only validation call.
  • At submission the code is validated for real. A valid code is locked in: the order's quote is stored net of the discount, and the order records the code and the amount saved.
  • An invalid, expired, or used-up code rejects the order with a clear reason — the buyer can resubmit without the code.

Redemptions

A code's redemption is counted when the order's payment is confirmed (manually by you, or by an online payment settling) — not at order creation. So an abandoned requested order never burns a max-uses slot. Counting is idempotent: a payment confirmed manually and by webhook still counts once.

Honestly: the redemption stamp is best-effort — if Ripllo is briefly unreachable at confirm time, the payment confirmation still goes through and the redemption may go uncounted. Usage counters are promo bookkeeping, not billing-grade accounting.

See also