Billing

What a promotion code does to a plan

Public, and deliberately so: a promo advertised on social media is read by people who have no account yet, and the price they were promised has to be on the pricing page before they make one. It resolves a Stripe promotion code and one configured plan price; no tenant data is reachable through it.

Distinct from /v1/billing/promo/validate, which answers for the promo_codes grants an authenticated org can redeem in place. This one describes a checkout discount, which needs a card and therefore has to go through POST /v1/billing/subscribe with promo_code.

get/v1/billing/promo/preview

Request

  • Base URL: https://api.1claw.co
  • URL: https://api.1claw.co/v1/billing/promo/preview
  • Auth: none required

Query parameters

codestring required

The promotion code, as advertised.

tier'pro' | 'team' | 'business'
interval'monthly' | 'annual'

Response

The offer, or why the code cannot be used. A code that does not apply answers 200 with valid: false and a message, not an error status — "this code is not for annual billing" is an answer, not a failure.

validboolean required
codestring nullable

The code as Stripe stores it, not the caller's casing.

headlinestring nullable

The offer in one sentence, derived from the coupon — e.g. "$5/mo for your first 6 months, then $29/mo". Rendered rather than composed by the client, so a page cannot advertise terms different from the ones charged.

tierstring required
intervalstring required
list_centsinteger nullable
first_centsinteger nullable

What the first invoice comes to, after the discount.

duration_monthsinteger nullable

How many invoices the discount covers.

expires_atstring date-time nullable

Last moment the code can be redeemed. Someone who subscribes before this keeps the discount for its full length.

messagestring nullable

Changes

No recorded changes to this operation across all 1 revision of this API.