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

The promotion object

1
{
2
stripe_coupon_id: "exportator-fHRx6uXMjiti",
3
stripe_promo_code_id: "promo_1KJawAJGzpbQiBbmVd18ETVW",
4
promo_code_label: "Z4OV52SU",
5
percent_off: "20",
6
max_redemptions: "50",
7
currency: "eur",
8
duration: "forever",
9
duration_in_months: 3,
10
amount_off: nil,
11
expired: false,
12
display: {
13
type: "banner",
14
ends_at: 1642586858,
15
pages_to_display_on: ["https://www.yoursite.com/pricing", "https://www.yoursite.com/blog"],
16
background_color: "#123ABC",
17
text_color: "#CBA321",
18
text_template: "Hello visitor from #country#! Get #value#% off with #coupon#.",
19
display_proxy_check: false,
20
display_watermark: false
21
}
22
}
Copied!
Copy link