Skip to content

Map Stripe prices and products

A product mapping says which Stripe price or product grants which of your Sealcord products, and on what terms. Map each price or product you sell, in the Console on the product’s page, or with the Admin API. A checkout for a price and product without a mapping issues nothing, and Sealcord tells you.

A mapping names a Stripe price (price_…) or a Stripe product (prod_…). When a checkout arrives, Sealcord looks for a mapping for each line’s price first, then for its product, so a price mapping wins.

  • Map the product to cover every price it has, with one set of terms.
  • Map a price when it needs terms of its own. One Stripe product often carries a monthly and a yearly price that should grant different things, such as a key that lasts a month and one that lasts a year.

Sealcord supports one mapped item per checkout. If a checkout has a second mapped item, Sealcord issues the licence for the first, notes the rest as ignored in the delivery and emails your owners and admins.

Field Default Meaning
product_id required Your Sealcord product, such as acme-notes
limit_kind seats seats or machines (which)
limit_count 1 How many. Stripe’s line item quantity multiplies it: 5 bought at a count of 2 is 10
key_valid_days none Put an expiry this many days (1 to 36500) after purchase in the key. None makes a perpetual key
on_refund revoke revoke ends the licence on a full refund of its payment; none leaves it
on_subscription_end expire expire or revoke, what happens when the subscription ends
renewal_url none Where a customer renews, one of your Stripe Payment Links (rules)

A subscription’s key carries no expiry unless you set key_valid_days, because an embedded expiry would force a new key at every renewal. The subscription’s end is enforced online, through the verdict.

Open the product, find its payment products, and choose to map one: pick the Stripe integration, paste the price or product id from Stripe, then set the terms and optionally the renewal link. Saving reads the price or product from your Stripe account, in the integration’s mode, so an id that is not there, or belongs to the other mode, is refused. Owners and admins can change mappings.

With an admin API key that has payments:write:

Terminal window
curl -X PUT \
"https://api.sealcord.com/v1/admin/integrations/$INTEGRATION_ID/mappings/$STRIPE_PRICE_ID" \
-H "authorization: Bearer $SEALCORD_TOKEN" \
-H 'content-type: application/json' \
-d '{
"product_id": "acme-notes",
"limit_kind": "machines",
"limit_count": 2,
"key_valid_days": null,
"on_refund": "revoke",
"on_subscription_end": "expire"
}'

$INTEGRATION_ID is the id the Console shows for the integration, or GET /v1/admin/integrations lists (scope payments:read); $STRIPE_PRICE_ID is a price or product id from Stripe. The answer is the mapping. GET /v1/admin/integrations/{id}/mappings lists an integration’s mappings and DELETE on the same path as the PUT removes one (204).