What it does
Start or change a site's shop. A site without a shop starts one when currency is sent, without Stripe: the catalog tables are made at once and only checkout waits for an active Stripe account. connection_id: one of the Hive's Stripe connections (from list_shop_connections), or null to stop the site taking payments (its shop stays; the connection stays for the Hive). currency: the shop's one currency, such as eur (prices are not converted). automatic_tax: Stripe Tax at checkout (the owner needs Stripe Tax set up). ship_countries: two-letter codes the shop ships to, such as NL, BE and DE; an empty list means the Stripe account's country. download_limit: downloads per file per order for digital products (default 5, null for no limit). download_days: days after payment the downloads work (default null, no end). Send any of them. A new Stripe account can't be made here; the owner connects one on the site's Shop tab in /hive (setup_url from get_site_shop). Needs can_shop.
Plans
Needs a paid plan: Pro or Ultra. On other plans your agent gets an error that says so. See Limits for what each plan includes.
Parameters
| Name | Type | About |
|---|---|---|
site_idrequired | string | The id of the site. list_sites gives the ids of your sites. |
connection_id | string or null | The id of one of the Hive's Stripe connections, from list_shop_connections, or null to stop the site selling. |
currency | string | The shop's one currency, a three-letter code such as eur or usd. Prices in the tables are not converted. |
automatic_tax | boolean | true to let Stripe calculate tax at checkout (the owner needs Stripe Tax set up in their Stripe account). |
ship_countries | array of string | Two-letter country codes the shop ships to, such as ["NL", "BE", "DE"]. An empty list means the Stripe account's country. Rates live in the shop's shipping table. |
download_limit | integer or null | Digital downloads: how often a buyer may download each file of an order, 1 to 1000, or null for no limit. Default 5. A download counts once it starts. |
download_days | integer or null | Digital downloads: days after payment that the order's downloads work, 1 to 3650, or null for no end (the default). |
Example
Call set_site_shop with these arguments:
{
"site_id": "01a1…",
"currency": "eur",
"ship_countries": ["NL", "BE", "DE"],
"download_limit": 5
}
Ids like 01a1… stand for your own. list_sites and list_tables give you the real ones.
Related guides
- Connect Stripe and get paidSet up Stripe once, then sell on as many sites as you like.
- Products, variants and stockYour catalog lives in tables your agent fills in.
- ShippingRates, free shipping over an amount, and where you ship.
- Digital downloadsSell files: ebooks, music, templates, courses.