anyshop docs homeStatusOpen the dashboard

ReferenceChangelog and versioning

Changelog
and versioning.

What changed in the API, the checkout and these docs, newest first, and what you can count on while the API is v1. anyshop is in beta, so the promises below are kept deliberately modest.

  • One version: v1
  • Additive changes within v1
  • Breaking changes announced here first

Versioning

There is one version, v1: every endpoint is under https://api.anyshop.io/v1, and GET /v1 says so. The OpenAPI document at /v1/openapi.json is generated from the same table of routes the API runs on, so it describes what is live.

Within v1, we add things:

  • new endpoints, and new optional fields in requests;
  • new fields in answers and in event bodies;
  • new event types, new error codes, and new values in fields that name a state or a kind, such as a status.

So write your code to ignore fields it does not know, to act on an unknown error code by its type and status, and to handle the event types it knows by name. An endpoint subscribed to "all" gets new event types as they come.

Within v1, we intend not to remove or rename an endpoint, a field or an event type, and not to change what a field means or its type. If one ever has to change, for security or the law, it is announced on this page first, with what changes and what to do, unless a security fix cannot wait. A change too big for that would come as a new version beside v1. There is no other version today, and no date for one.

This is how we intend to work while in beta, not a guarantee of how long anything lasts.

23 November 2026

  • One Stripe account for several of your stores. A store without Stripe can use the Stripe account another of your stores connected with a key ("Use the Stripe account of" on the Stripe page, nothing to paste), or you paste a key of that account. Every store on it shares one webhook, named "anyshop: payments for your stores", and one key: a new key pasted on one store is used by all of them. Disconnecting one store leaves the account and its webhook to the others. A Stripe account that takes payments for a store in another anyshop account is still refused. See Take payments with Stripe.
  • Products have no category any more. The product editor no longer asks for one, and creating a store no longer asks "What will you sell?": a store can sell any kind of product. Store pages lose their category links and filters; an old link with ?category= opens the whole list, with no error.
  • `category` on products is deprecated. POST /v1/products and PATCH /v1/products/{id} still accept category, now optional, and ignore it, so existing integrations keep working. A product's answer still has category: the value it had before, or digital_files for a product made from now on. Nothing depends on it. Imports read past an export's category column, and data exports keep it, so their files keep their columns.
  • Only the legal name is required. Under Settings, Business details, the address, city, country and phone number are optional, and Address line 2, State or region and Postal code are gone. Review and live checkout need the legal name only. Checkout shows the legal name before the buyer pays, and the address, country and phone number when you give them. Values you saved in the removed fields keep showing at checkout until you save the business details again, which clears them.
  • Store pages. The featured product shows its image on the left and its name, price and Buy now on the right again, with space above it; since 19 November the words had dropped under the image. A store whose only product is the featured one no longer shows an empty "All products" list with "Nothing matches" under it. Every store page starts 40 px under the header, with a tagline or without, and a search says what it found ("Results for", how many products, "Clear search"). A store without a logo shows its initial on its own colour with a larger name, and "Reviewed store" is a small check under the name. On a product page the image takes about two fifths of the width, at most 560 px, the buy box the rest, and the description is headed "About this product".

Questions for the buyer

  • Up to 3 questions at checkout. In the dashboard's product editor, under Checkout, a product can ask the buyer up to 3 questions: a short text, an email, or a choice from a list, each required or optional, with a help text. The hosted checkout, the buy button's overlay and demo stores ask them after Email. Questions asking for passwords, payment card details, government ID numbers or health information are refused. A bundle asks its own questions, never its products'.
  • `questions` on products, read only. A product's answer lists them: id, label, kind (short_text, email or choice), choices, required and help_text.
  • `answers` on checkout sessions. A session takes the answers your page asked, keyed by question ID. A required one unanswered, or an answer its question does not take, starts nothing: 400 invalid_answers, error.param answers.{question ID}.
  • `answers` on order items. In order answers, order.paid and order.fulfilled, every item has answers: [{ question_id, question, kind, answer }], empty for none. The request to your server for a "From your server" product carries them in data.item.answers, inside the signed body.
  • Stored encrypted, never emailed. anyshop keeps the answers encrypted with the order, and deletes them with it or when a buyer's data is deleted (the webhook records then show answers: []). They are never in an email, your store's data exports or the timeline; a buyer's own data export (Customers, Export their data) includes them.

Key products are never free

  • A price of 0 refused for serial key products. As a minimum_price of 0 already was, a fixed price of 0 for a serial key product (or one of its options) is now refused with "Key products cannot be free", in the dashboard and the API. Every other type can still be free.

Sales

  • Sales with a start and an end. In the dashboard's product editor, under Price and options, a variant can have a sale: a lower price for a set time, up to 90 days, that starts and ends by itself. Sales are made, cancelled and ended in the dashboard only: the API, which sets a variant's price only when it creates a product, reads them.
  • `current_price` and `sale` on variants, read only. Every variant in a product's answer has current_price, what buyers pay per unit now (the sale price while a sale runs, else price), and sale: null, or the running sale's id, price, reference_price, starts_at and ends_at (when it stops running, also when you end it early). price stays the variant's own price, so code that reads it keeps working.
  • The reference price. A sale's price must be below the variant's lowest price of the 30 days before the sale starts, counting earlier sales of the variant at their sale price. Buyers see that price struck through beside the sale price, in place of compare_at_price, with "Lowest price in the 30 days before the sale: $59.00". Outside a sale, compare_at_price is yours to keep right, as before.
  • Checkout charges the sale price. Quantity discounts, then coupons, apply to the sale price. A sale that starts or ends between a quote and the payment changes the total: a checkout session with expected_amount answers price_changed with the new total, as for any price change.
  • Order items say so. In order answers and order.paid, every item has sale: null, or the sale's id and reference_amount (that lowest price, in minor units) when the item was priced at a sale. unit_amount is then the sale price and base_unit_amount the variant's own price. Data exports carry the same in orders.json and in order_items.csv's new sale_id and sale_reference_price columns.
  • Not for every price. A variant whose price the buyer chooses, and a free one, take no sale. Bundles take sales like any product with a fixed price.

Bundles

  • A new product type, `bundle`. It sells 2 to 10 of your other products together at one price. Its items list them in order: product_id, variant_id (one of that product's variants, at a fixed price) and quantity (how many one bundle gives, up to that product's max_quantity_per_order), each variant once. POST /v1/products with type bundle and PATCH /v1/products/{id} take items (the whole list, replacing the one before); a draft may hold fewer than 2, and publishing needs 2 or more, each on sale. A bundle cannot hold another bundle or a variant whose price the buyer chooses, has one variant, at a fixed price, and no stock_limit. items is null for every other type.
  • Sold as one line, delivered item by item. Coupons and quantity discounts apply to the bundle's price as to any product's. A bundle can be bought only while every product in it can: one sold out makes it sold out, and one archived, unpublished, held, or whose type or variant changed takes it off sale until you restore that product or save the bundle without it. Each product is delivered as it is on its own: keys from its own stock (its variant's, with stock per option), licenses issued, its file, your server's answer, its instructions.
  • `bundle_items` on order items. In order answers, order.paid and order.fulfilled, every item has bundle_items: for a bundle, the products it holds, each with its id, product, variant, quantity (the bundle's quantity times how many one bundle gives), base_unit_amount (its own price per unit), revenue_share_amount (its share of the bundle line's total, split by those prices) and delivery_state; empty for every other item. The money is the bundle's line, as before.
  • A product in a bundle cannot be deleted. Take it out of the bundle first, or archive it.

Pay what you want

  • Buyers can choose the price. A product's variants have price_kind: fixed (every variant until now) or chosen, with minimum_price and suggested_price in minor units (null for a fixed price). The buyer pays from minimum_price up to 100 times suggested_price, per unit. A chosen variant's price is its suggested_price, so code that reads price keeps working. POST /v1/products takes price_kind, minimum_price and suggested_price for its Standard variant: with chosen, leave price out (or send the suggested price). The minimum is at most the suggested price, and the suggested price is 1 or more.
  • Free when the minimum is 0. A minimum_price of 0 lets buyers take it for free, except for serial key products (refused: "Key products cannot be free"). A free order is paid at once with no payment method, delivered as usual, and sends the same emails and order.paid as any other.
  • No discounts on a chosen price. Coupons, quantity discounts and compare_at_price do not apply to a variant whose price the buyer chooses. A coupon sent with one is refused (invalid_coupon: "Coupons do not apply when you choose the price").
  • `price` on checkout sessions. For a chosen variant, POST /v1/checkout_sessions requires price: what the buyer chose to pay per unit, in minor units. Outside the variant's bounds it is refused with 400 invalid_price. For a fixed price it is ignored, as before: your price is the price. expected_amount is compared as before. A session at a price of 0 needs no payment method.
  • Payment methods' minimums. A total above 0 but below the smallest payment the method takes (Stripe's minimum charge in your currency, a crypto wallet's) is refused before anything is held: 400 below_payment_minimum on a session that names its payment_method, and on anyshop's checkout "Card payments start at $0.50. Choose $0.50 or more, or pay another way."
  • Order items say so. price_kind is chosen for an item whose price the buyer chose: unit_amount is their amount, base_unit_amount the variant's suggested price, and it has no discount.
  • Checkout links take `?amount=`. For a chosen variant, a checkout link may carry the buyer's amount per unit in minor units (?amount=1200 is $12.00): the checkout opens at it, kept within the variant's bounds, and starts at the suggested price without one.

Quantity discounts, thank-you messages and offers after purchase

  • Quantity discounts. Products have quantity_discounts: up to 4 steps, each { "min_quantity", "percent_off" }, for every variant. A step starts at 2 units or more (at most max_quantity_per_order) and takes 1 to 90 percent off, with a bigger discount at each bigger step. POST /v1/products and PATCH /v1/products/{id} take them; send [] for none. They are refused while max_quantity_per_order is 1, and lowering max_quantity_per_order below a step is refused until you change the steps too.
  • How a line is priced. The variant's price times the quantity, less the quantity discount of the highest step the quantity reaches, then the coupon on what is left. A quantity discount is rounded per unit to the nearest minor unit, halves up, then multiplied by the quantity, so the price per unit your product page shows times the quantity is exactly what the buyer pays: 5 units at $14.99 with 15% off are 5 × $12.74 = $63.70. The coupon is rounded once per line, halves up. Checkout, checkout sessions, buy buttons and every page and email work the price out the same way.
  • Order items say how their price was made. Beside unit_amount and total_amount, order items have price_kind (fixed for now), base_unit_amount, subtotal_amount, quantity_discount (percent_off and amount, or null), coupon_discount_amount and discount_amount, in the API and in order.paid.
  • An order's `discount` now includes quantity discounts. Until now it was the coupon's discount only. From this release, an order's discount (in the API and in order.paid) and the discount column of a data export's orders.csv are every discount together: the items' quantity discounts as well as the coupon's. To tell them apart, read each order item's quantity_discount.amount and coupon_discount_amount, which add up to its discount_amount.
  • `expected_amount` on checkout sessions. Send the total your page showed the buyer: when the price works out to another amount now, no session starts and the answer is 409 price_changed, with the new total in the error's new amount field. anyshop's own checkout does the same: a buyer who presses Pay after the price changed sees the new total and pays again.
  • A thank-you message. Products have thank_you_message: up to 1,000 characters of text with **bold**, *italic*, [links](https://...), - and 1. lists and paragraphs. HTML is never used: it shows as the text it is, and links must be https. The buyer reads it after paying on the thank-you and order pages and in the delivery email. Each order keeps the message as it was when it was bought. It is checked like the product's description, and so are the delivery instructions now: a live product edited into something our acceptable use policy does not allow is held for a review.
  • An offer after purchase. Products have upsell: { "product_id", "coupon_id" }, another of your products that is on sale, and a coupon of yours that applies to it or null; null for no offer. The thank-you page shows it with Buy with my email, unless that product is sold out, hidden from your store page or already in the order. A coupon that ended or ran out is left off.
  • Coupons in checkout links. A checkout link takes ?coupon=CODE: the checkout opens with the coupon applied when it is valid for the product, and without it otherwise. Put it in your own emails and pages. A link may also carry the buyer's email after #email=, which fills in the email field without ever reaching a server.

Stock per option

  • A serial key product can keep each option's keys apart. Products have stock_mode: shared, one stock every option sells from (every product until now, and the default), or per_option, each option its own keys. You switch it in the dashboard, on the product's stock. With stock per option, a checkout of an option takes only that option's keys, an option without keys is sold out, and the product is sold out only when every option is.
  • Keys name their option. Stock items have variant_id: the option the key sells, or null for a shared stock. GET /v1/products/{id}/stock_items takes variant_id to list one option's keys.
  • Adding keys to an option. POST /v1/products/{id}/stock_items takes variant_id: required when the product keeps stock per option, refused when it has one stock. Its answer says the option the keys went to (variant_id).
  • Stock per option in the summary. GET /v1/products/{id}/stock has stock_mode, and variants: each option's keys per state with the level it warns below, empty for a shared stock.
  • Options have a description and their own alert level. A product's variants have description (one line, up to 140 characters, shown with the option on the product page, at checkout and on the order) and low_stock_threshold (with stock per option: below this many of the option's keys you get the low stock email and a stock.low event; null uses the product's).
  • `stock.low` names the option. Its body has variant, the option that runs low (id and name), or null for a shared stock.

Your store's header on the payment pages

  • Every payment page carries your store's header. The checkout, the thank-you and order pages, Find my order and the headless checkout's page show your logo and store name, which lead back to your store, with Back to the store and Find my order beside them. Below, a footer says Checkout secured by anyshop. On a headless checkout, Back to the store leads to your session's cancel_url. Elsewhere it leads to your storefront, so a store that sells only from its own site has no link back there.
  • No close button on the checkout panel. The header leads back to your store instead. The buy button's overlay is unchanged: it keeps its own close.
  • Products without a picture show your store's logo on the checkout, or your store's first letter when it has no logo.

Sending your own order emails

  • Your store can email its buyers itself. In Storefront, Delivery email now has a third choice, Our own. anyshop then sends your buyers no email after they pay, nor later when a key is restocked, your server delivers, a key is replaced or keys are rotated. You confirm first that you send each buyer the confirmation the Terms of Service describe. Resend on an order, and POST /v1/orders/{id}/resend_delivery_email, still send anyshop's email when you ask.
  • The cancellation sentence for your email. withdrawal_consent has confirmation_text, in order answers and in order.paid: the sentence anyshop's delivery email confirms the buyer's request with. Put it in your own confirmation when the buyer asked for their order right away.
  • The buyer's order page link. GET /v1/orders/{id}/buyer_link answers the link anyshop's delivery email would carry, for a paid order. It is made when you ask and not kept by anyshop, so it is not in any event body. Anyone with it can open the order, keys included: send it to the buyer only.
  • On the order page. An order paid while your store sends its own emails says so in its timeline: No delivery email from anyshop.

Search text and after-purchase links

  • A product's own search title and description. Products have seo_title (up to 70 characters) and seo_description (up to 155), in POST /v1/products, PATCH /v1/products/{id} and every product answer. When set, the product page uses them for its title and description in search results and link previews. Null or empty uses the product's name and the start of its description, as before.
  • An after-purchase link. Products have after_purchase_url: a full https address, up to 500 characters, without a user name or password. Once an order is paid, the buyer's order page offers a button, Continue to and the site's name, that leads there. When an order's products have different links, no button is shown. Null or empty for none.

No test mode

  • Every store is live from day one, and every key is a live key. Test API keys (as_test_) are gone: Developers no longer makes them, and the API refuses one made before, with "anyshop has no test keys: use a live key".
  • Set up before approval, try it for real after. Before anyshop approves your store, a live key creates products, adds stock and adds webhook endpoints, and POST /v1/checkout_sessions answers store_not_approved (409). Once your store is approved, try your integration with one real purchase and refund it, from the order's page or with POST /v1/orders/{id}/refund. The quickstart now ends that way.
  • Gone from Developers: the Test data switch, the Test orders page, and test webhook endpoints with their events and deliveries.
  • No simulated payment for seller stores. A seller's checkout no longer offers payment_method: "simulated". Anyone can still try anyshop's checkout on the demo store at demo.anyshop.io without paying.
  • `livemode` stays, always `true`. Orders, stock uploads, licenses, webhook endpoints and events keep the field, because v1 does not remove fields.
  • Two buttons renamed. On a webhook endpoint's page, Send test event is now Send a sample event. In the product editor, a dynamic delivery product's Send a test order is now Send a sample request: it still posts one signed request to your server, marked "test": true, and creates nothing.

Order numbers on the payment page

  • Payments name the order, not the products. Stripe's and PayPal's pages, and the seller's Stripe and PayPal accounts, show Order #1001 with "Powered by anyshop.io" under it, instead of the products bought. See What the payment lists.
  • An order is numbered when the buyer chooses to pay, not when it is paid: an order's number is set once it is pending_payment, and stays the same when it is paid. A payment the buyer never finishes leaves a gap in the numbers.

Agreement on your own checkout

  • Buyers can agree on your own checkout. POST /v1/checkout_sessions takes terms_accepted and immediate_delivery_requested: send them when the buyer ticked the box above your own Pay button, in the words of the session's new agreement.text, and the buyer goes straight on to the payment. They count once your store's owner has agreed to the Terms of Service of 14 November 2026; before that they are taken and ignored, and agreement.collected_by says anyshop. See The box above Pay.
  • Every buyer's agreement is recorded. An order records the buyer's agreement to the terms of sale, and where they gave it, whatever it sells: terms_agreement in the API and in order.paid, beside withdrawal_consent. A headless checkout whose products have no immediate delivery setting now shows the box above Pay on anyshop's page too, unless your page asked it.
  • Terms of sale, wording version 5. The terms of sale now say a buyer may also agree on the seller's own site. The box's words are unchanged; orders record version 5 in terms_agreement.wording_version, withdrawal_consent.wording_version and agreement.version.

Live from day one

  • Your store works in live mode from the start. The dashboard no longer starts in test mode before review: your catalog, stock, payment methods and API keys are the live ones from the day you create your store. Review decides when your store sells, not which mode it is in.
  • Connect before review. Stripe (your live key), PayPal and Bitcoin and Litecoin connect in live mode before anyshop has reviewed your store. Live API keys can be made before review too, and catalog and stock writes with them work at once.
  • New error code `store_not_approved` (409, conflict): POST /v1/checkout_sessions answers it with a live key until anyshop has reviewed your store. Buy buttons, pay links and the hosted checkout say the store opens soon instead, and a live order's page takes no payment. Test keys start test checkouts as before.
  • Test mode stays for as_test_ keys and their test webhooks, the simulated payment (payment_method: "simulated") and demo stores.
  • Test data lives in Developers. The dashboard's own test checkout ("Buy it yourself", /test-purchase) and the buy button builder's test checkout are gone. Turn on Test data at the top of Developers to see what your as_test_ keys made: test API keys, test webhook endpoints with their events and deliveries, and a new Test orders page listing test orders and checkout sessions, each opening its order. Orders, Customers, Stock and the home figures always show live data. The quickstart now ends with a test checkout started with the test key.

PayPal live as soon as it connects

  • No test payment. PayPal is live in checkout as soon as PayPal accepts your app's keys, in test mode with sandbox keys and in live mode with live keys. The 1.00 test payment, its refund and the "Connected, test payment next" step are gone, and a PayPal connection that was still waiting for one is now live.
  • Every payment is still checked against your PayPal account. anyshop records the account your app pays into when you connect it. If PayPal does not name it then, anyshop records it from your first PayPal sale, and from then on a payment that goes to any other account is never captured or marked paid.

Seller basics

  • Store visibility. Sellers choose who reaches a reviewed store: Public, Hidden (no product list; each product sells by its link), Own site only (the store page is closed; buy buttons, pay links and the API sell) or Paused. See Store visibility.
  • New error code `store_paused` (409, conflict): POST /v1/checkout_sessions answers it with a live key while the store is paused. Sessions and payments already started finish as before.
  • A minimum quantity. Products have min_quantity_per_order, the fewest units one order takes (1 by default, at most max_quantity_per_order), in POST /v1/products, PATCH /v1/products/{id} and every product answer. A checkout below it, or above the maximum, is refused with "You can buy between {min} and {max} at a time"; a checkout session or buy button without a quantity takes the minimum. A product with fewer keys or units left than its minimum shows as sold out.
  • Products off the store page. Products have listed (true by default). False hides a product from your store page's list, search and categories; its own link, buy buttons, checkout sessions and the API still sell it. A data export's products.csv has a listed column.
  • Platform, up to 40 characters. The reference now says 40 for platform, as products always kept (it said 60, and 41 to 60 were refused). In the dashboard it is free text too, with suggestions such as Windows or Microsoft Store.
  • Region up to 40 characters, and `delivery_instructions` up to 2,000. The reference said 60 and 4,000; longer values were always refused when saved.
  • Docs for AI assistants: llms.txt, llms-full.txt and a Markdown version of every page.

Stripe with your own key

  • Connect Stripe with a restricted key. Sellers connect their own Stripe account by pasting a restricted key that can do only what anyshop needs. anyshop checks each permission, adds a webhook to the account and encrypts the key. Payments, refunds, disputes and the checkout work as before. See Connect your Stripe account.

11 November 2026

  • Customers in the API. GET /v1/customers, POST /v1/customers, GET /v1/customers/{id} and PATCH /v1/customers/{id}, with the customers:read and customers:write scopes. Customer records are live mode only, so they need a live key. Erasing a customer and exporting their data stay in the dashboard, behind the owner's fresh two-factor check.
  • Coupons in the API. GET /v1/coupons, POST /v1/coupons, GET /v1/coupons/{id}, PATCH /v1/coupons/{id} and POST /v1/coupons/{id}/archive, with the coupons:read and coupons:write scopes. Coupons are catalog, shared by both modes, so changing them needs a live key; their uses are counted in each mode.
  • API keys can have the new scopes: Developers, API keys, New API key.
  • License checks from a web page. The four public license checks answer browsers on any site, without credentials. See Check licenses.

10 November 2026

  • Stripe's own checkout page, with every way to pay. A buyer who pays with Stripe now goes on to Stripe's hosted checkout page, which offers every way to pay the seller turned on in their Stripe Dashboard: cards, Apple Pay, Google Pay, Link, bank debits, bank redirects, vouchers and more. Before, the checkout took cards, wallets and Link in a form on anyshop's page. See Payments with Stripe.
  • Payments on their way. A bank debit is confirmed days later. Meanwhile the order waits, held up to 14 days; order.paid arrives when the money clears, and nothing is sent before. There is no new status or event for it: a checkout session stays open, with a later expires_at. See Bank debits and vouchers.
  • Headless checkout. With no payment_method, a session starts Stripe by itself when Stripe is the store's first way to pay. A buyer who leaves Stripe's page without paying comes back to the session's page, which offers Stripe's page again or cancelling.
  • The box above Pay. Every buyer of a product with immediate delivery on sees it, wherever they are, in the words of version 4: "I agree to the terms of sale and want my key right away." withdrawal_consent.wording_version says which words a buyer agreed to.