Promotions
The promotions endpoint returns the best promotion for a given user, if any.

The promotion object

{
stripe_coupon_id: "exportator-fHRx6uXMjiti",
stripe_promo_code_id: "promo_1KJawAJGzpbQiBbmVd18ETVW",
promo_code_label: "Z4OV52SU",
percent_off: "20",
max_redemptions: "50",
currency: "eur",
duration: "forever",
duration_in_months: 3,
amount_off: nil,
expired: false,
display: {
type: "banner",
ends_at: 1642586858,
pages_to_display_on: ["https://www.yoursite.com/pricing", "https://www.yoursite.com/blog"],
background_color: "#123ABC",
text_color: "#CBA321",
text_template: "Hello visitor from #country#! Get #value#% off with #coupon#.",
display_proxy_check: false,
display_watermark: false
}
}
Copy link