Skip to content

Commerce settings

The E-commerce settings screen holds the workspace-wide defaults of the e-commerce module: the default currency and tax rate, the prefixes of order and invoice numbers, the payment terms, and the Stripe account that checkouts charge.

You find it in the sidebar under Settings › E-commerce (/t/<workspace>/settings/commerce). The sidebar entry and the Save button are available to Owners and Admins (settings:manage).

The screen has three cards: Currency and tax, Numbering and terms, and Stripe payments. There are no fields for your business address or tax ID. Without Stripe connected, amabledata only records payments (see Payments); with Stripe connected, checkouts collect them too.

Settings are defaults used when new records are created. Changing them never rewrites existing products, orders or invoices.

Setting Used when
Default currency A new product is created in the editor (pre-selected) or through the API without a currency; an order has only custom lines; a new promo code is created (pre-selected)
Default tax rate A new product is created in the editor (pre-filled) or through the API without a tax rate; a custom line is added in the order wizard (pre-filled)
Order number prefix Every new order, drafts included, gets <prefix><6-digit counter>
Invoice number prefix Every new invoice gets <prefix><year>-<5-digit sequence>
Payment terms (days) An order is finalized without a due date: due date = finalization + this many days

Notes:

  • The order counter never restarts and is shared by all prefixes: changing the prefix from ORD- to SO- continues the same sequence (for example SO-000124).
  • The invoice sequence restarts every year (UTC) and is gapless; see Invoices.
  • Subscription renewal orders are always due on the first day of their billing period, regardless of the payment terms.

For how amounts and currencies are stored and rounded, see Money, dates and time zones.

“Connect your own Stripe account with its API keys to accept card payments in checkouts and charge subscription renewals automatically. Keys are stored encrypted and never shown again.”

  • The keys belong to your Stripe account: the money goes straight to it, and amabledata adds no fee on top of Stripe’s.
  • The secret key is encrypted before it is stored and the screen only ever shows its last characters (“Saved (…abcd). Leave empty to keep it.”). Saving the keys verifies the secret against Stripe and requires a step-up verification.
  • The card shows a Test mode / Live mode badge, read from the key prefix. Both keys must belong to the same mode (“The secret key and the publishable key must be both test or both live.”).
  • amabledata remembers which Stripe account and mode the saved customers and cards belong to (it survives a disconnect). Saving keys of a different mode or account asks for confirmation (“Switch Stripe to live mode?”), requires the secret key of the new mode, and then drops the saved customers and cards, stops the automatic renewal charges that relied on them and closes the purchases still in progress — the warning tells you how many subscriptions are affected.
  • The webhook keeps amabledata in sync with Stripe for anything the buyer’s browser cannot report: payments confirmed after a redirect or asynchronously, and refunds made in the Stripe dashboard. Without it the card warns: “Webhook not configured: payments completed after a redirect or refunds will not be synced.”

Connecting and disconnecting are recorded in the audit log (commerce.stripe_connected, commerce.stripe_disconnected); Stripe refunds as commerce.stripe_refunded.

  1. Go to Settings › E-commerce.
  2. In Currency and tax:
    • Default currency: pick from the searchable list (search by code, name or symbol). The hint shows an example amount in that currency, for example “Example: €1,234.56”.
    • Default tax rate: a percentage with up to two decimals. “Used for new products and custom order lines.”
  3. In Numbering and terms:
    • Order number prefix: the hint shows an example, for example “Example: ORD-000123”.
    • Invoice number prefix: for example “Example: INV-2026-00001”.
    • Payment terms (days): “Days between the invoice and its due date.”
  4. Click Save in the toolbar. You see Saved.

The Save button stays disabled while a field is invalid. Without settings:manage the fields are read-only and Save is hidden.

  1. In your Stripe dashboard, open Developers › API keys and copy the publishable key (pk_…) and a secret key — “A secret key (sk_…) or a restricted key (rk_…) with write access to PaymentIntents, SetupIntents, Customers and PaymentMethods.”
  2. In Settings › E-commerce, card Stripe payments, paste them into Publishable key and Secret key, then click Save. Confirm the step-up verification. The secret is checked against Stripe before it is accepted; you see Stripe settings saved and the mode badge.
  3. Create the webhook: in Stripe, Developers › Webhooks › Add endpoint, paste the Webhook endpoint URL shown on the card (https://<edge domain>/c/<workspace>/stripe/webhook) and select the events listed there: payment_intent.succeeded, payment_intent.payment_failed, setup_intent.succeeded, charge.refunded.
  4. Copy the endpoint’s signing secret (whsec_…) into Webhook signing secret and click Save again.
  5. Click Test connection at any time: you see “Stripe accepted the keys.” or “Stripe rejected the keys: …”.

Start with test keys, rehearse a purchase on a checkout, then replace them with the live keys (and the live webhook secret: test and live endpoints are separate in Stripe).

  1. In the Stripe payments card, click Disconnect.
  2. The confirmation Disconnect Stripe? reads “Checkouts stop accepting payments and renewals are no longer charged automatically. Existing orders are kept.” Confirm with the step-up verification.

Checkout pages then show “Payments are not configured yet.” until you connect an account again. Saved cards and customers are kept: scheduled renewal charges wait (rechecked daily, without consuming their retry attempts) and resume when you reconnect the same account. Reconnecting a different account or mode drops them, as described above.

Field Default Rules
Default currency EUR An active ISO 4217 code
Default tax rate 0 % 0–100%, up to two decimals
Order number prefix ORD- Up to 12 characters: letters, digits, _, -; may be empty
Invoice number prefix INV- Up to 12 characters: letters, digits, _, -; may be empty
Payment terms (days) 14 Whole number from 0 to 365; 0 makes orders due on finalization
Field Rules
Publishable key pk_test_… or pk_live_…; shown in full (it is public)
Secret key sk_… or rk_…, same mode as the publishable key; verified against Stripe; stored encrypted, only a hint is shown
Webhook signing secret whsec_…, optional but strongly recommended; stored encrypted
Webhook endpoint Read-only: the URL to register in Stripe
Method and path Permission Body
GET /api/v2/t/<workspace>/commerce/settings orders:read Returns default_currency, order_prefix, invoice_prefix, payment_terms_days, default_tax_rate_bps
PATCH /api/v2/t/<workspace>/commerce/settings settings:manage Any of the same fields; the tax rate in basis points (2200 = 22%)
GET /api/v2/t/<workspace>/commerce/stripe settings:manage Stripe settings: configured, mode, publishable_key, key hints, webhook_url, saved_payment_methods (subscriptions with a card on file)
PUT /api/v2/t/<workspace>/commerce/stripe settings:manage + step-up publishable_key, optional secret_key and webhook_secret (omitted = keep the stored ones). Switching mode or account requires secret_key; the answer carries account_changed: true when saved cards were dropped
POST /api/v2/t/<workspace>/commerce/stripe/check settings:manage Verifies the stored secret against Stripe
DELETE /api/v2/t/<workspace>/commerce/stripe settings:manage + step-up Disconnect
Action Permission Roles
Read the settings (through the API, and as defaults in other screens) orders:read Owner, Admin, Marketer, Sales, Analyst, Viewer
Open the screen from the sidebar and save settings:manage Owner, Admin
Connect, check or disconnect Stripe settings:manage (+ step-up to save or disconnect) Owner, Admin
Symptom Cause Fix
“Use a 3-letter ISO 4217 code (EUR, USD, …).” The currency is not a valid active code Pick a currency from the list
“Up to 12 letters, digits, _ or -.” The prefix is too long or has spaces or other symbols Shorten it or remove the characters
Save stays disabled A field is invalid, or the payment terms are empty or outside 0–365 Fix the highlighted field
Existing products still show the old currency Settings do not change existing records Edit the products (products with plans cannot change currency)
New products start at 0% tax The Default tax rate is 0 (never set) Set it here; new products then start from it. Existing products keep their rate
The E-commerce entry is missing under Settings Your role lacks settings:manage Ask an Owner or Admin
“Expected a publishable key (pk_test_… or pk_live_…).” / “Expected a secret key (sk_… or rk_…).” A key was pasted in the wrong field Swap them
“The secret key and the publishable key must be both test or both live.” Mixed test and live keys Copy both keys from the same mode
“Enter the secret key of the new mode.” You changed the publishable key’s mode (or account) keeping the stored secret Paste the secret key that belongs to the new keys
“Stripe rejected the keys: …” on save or Test connection The secret was revoked or a restricted key lacks the needed permissions Create a new key with write access to PaymentIntents, SetupIntents, Customers and PaymentMethods
“Webhook not configured: …” on the card No Webhook signing secret saved Create the endpoint in Stripe and paste its whsec_… secret
Payments made after a redirect stay processing, or refunds made in Stripe never appear The webhook URL or secret is wrong, or the events are missing Check the endpoint URL, the selected events and the secret in Stripe → Developers → Webhooks