Skip to content

Overview

Neocarts adds product subscriptions with recurring delivery to an online shop. The catalogue, cart and prices stay with the shop; Neocarts takes the subscribe button, checkout, payment, the saved card and the recurring charges.

Subscribe buttons under the «Add to cart» buttons on product cards

  1. The shop server creates an order from the cart through the Shop API and gets its id.
  2. The shop page opens the widget with that id — the shopper enters contacts and delivery and pays.
  3. After payment Neocarts creates the subscriptions and charges on schedule by itself.
  4. The shop server learns about every event (payment, renewal, pause, refund) from webhooks.
Who What Authentication
Shop server → Neocarts Shop API https://core.neocarts.com/v1/shop/* Authorization: Bearer nc_live_…
Shop page Widget https://cdn.neocarts.com/bundle.js data-shop-id — the shop UUID, not a secret
Neocarts → shop server Webhooks — POST to the URL from the «Integration» tab X-Neocarts-Signature — HMAC-SHA256 with the whsec_… secret

The Shop API is server-to-server only: the key never reaches the browser. The shop does not poll Neocarts — webhooks report changes.

Concept What it is
Order A snapshot of the cart: lines, prices, discount, contact, delivery, totals. In draft status it is the cart. Must contain at least one mode: "subscription" line.
Subscription Created only after a successful payment. Holds the price, quantity, discount, interval and the shopper’s card.
Payment One payment attempt. A retry is a new payment on the same order.

Structure — order document; transitions — statuses.

  • The catalogue does not store prices. PUT /v1/shop/products/{external_id} sends title, variant, image and link. Repricing live subscriptions is a separate call, PUT /v1/shop/products/{external_id}/price.
  • Money is integer kopecks, currency UAH. 249000 = 2,490.00 ₴. See Money and rounding.
  • Two languages: uk and en. The Accept-Language header sets the API response language; the order locale field sets the language of emails and checkout.