Skip to main content
PayBridgeNP uses a two-level discount model: a coupon is a reusable discount template; a promotion code is a customer-facing string (like LAUNCH50) that redeems a coupon.

Concepts

Coupon

The template. Defines:
  • Discount: percent (1-100%) or amount (fixed paisa off)
  • Duration: once (next invoice only), repeating (N cycles), or forever
  • Caps: maxRedemptions, redeemBy expiry
  • Scope: appliesToPlanIds (nullable = all plans)

Promotion code

A public handle pointing at a coupon. Has its own independent limits:
  • maxRedemptions
  • expiresAt
  • minimumAmount (order floor in paisa)
  • customerIds restriction
A single coupon can have multiple promotion codes - useful for split tests (LAUNCH50 vs WELCOME50).

Creating a coupon

Creating a promotion code

The code is case-insensitive and stored uppercase.

Validating before applying

Returns { valid: true, coupon, promotion_code, discount_preview } or { valid: false, reason }. This is read-only and safe to call on every keystroke.

Applying to a subscription

Or pass couponId directly to skip the promo-code layer.

Duration semantics

Redemption atomicity

Coupon and promotion code counters update atomically against the redemption cap - racing N parallel applies can never exceed it. The N-1 losers get an error like "Promotion code redemption limit reached". Safe to retry.

Invoice math

When an invoice is generated for a subscription with an active discount, PayBridgeNP emits line items in this order:
  1. Subscription (plan amount, positive)
  2. Discount (coupon discount, negative)
  3. Tax (VAT on the discounted amount - see Tax guide)
Totals apply the discount before tax:

Webhooks

Disabling the feature

Want coupons switched off for your account? Contact support@paybridgenp.com and we’ll disable them; existing subscriptions then invoice exactly as they did before coupons were introduced.