modempay.coupons.create()
to provide percentage or fixed-amount discounts (in GMD), set duration, redemption limits, and restrictions like minimum purchase amounts. Manage them with methods like retrieve
, list
, update
, or delete
. Apply coupons to a PaymentIntent
to instantly reduce the transaction amount, perfect for promotions or loyalty rewards. Simple, flexible, and developer-friendly!
modempay.coupons.create()
to create a coupon. Coupons can offer a fixed amount or percentage discount and support options like duration, redemption limits, and restrictions.
Example: Creating a 15% Off Coupon for a Market Promotion
name
: Descriptive name (e.g., “Market Fest”).percent_off
: Percentage discount (e.g., 15 for 15%). Use amount_off for fixed amounts.currency
: Set to “GMD” for all amounts.duration
: “once”, “repeating”, or “forever”.duration_in_months
: Required if duration is “repeating”.max_redemptions
: Maximum uses of the coupon.redeem_by
: Expiry date.restrictions
: Conditions like minimum_amount or first_time_transaction.modempay.coupons.retrieve()
.
modempay.coupons.list()
, with options to paginate or filter.
modempay.coupons.update()
.
modempay.coupons.delete()
.
coupon
field when creating a PaymentIntent.
minimum_amount
, first_time_transaction
).percent_off
or amount_off
) is applied to the PaymentIntent
’s amount.times_redeemed
increments upon successful application.minimum_amount
aligns with your pricing.modempay.coupons.list()
.valid: true
.PaymentIntent
meets minimum_amount
or first_time_transaction
requirements.