Regoria API docs

Getting started

Regoria is a merchant of record: your buyers pay Regoria, Regoria collects US sales tax, holds a rolling reserve and pays you out monthly. The API gives your server what it needs around that: a catalog, hosted checkout sessions, orders to fulfil, customers and their saved cards, subscriptions, refunds, your balance and payouts, and webhooks that tell you when something happened.

What you need

Two environments

Live Sandbox
Base URL https://api.staging.regoria.com https://api.sandbox.staging.regoria.com
Keys mor_live_… mor_test_…
Money real cards, real payouts test cards, nothing moves

A test key is refused on the live base URL and a live key on the sandbox. Everything in these guides runs on the sandbox until you say otherwise. See Test mode and the sandbox.

Conventions in one minute

1. Your first call

curl https://api.sandbox.staging.regoria.com/v1/merchants/me \
  -H "Authorization: Bearer $API_KEY"

You get your merchant profile back: id (mer_…), display_name, status, support_email, timezone. If you get 401, the key is wrong or on the wrong base URL; 403 insufficient_scope means the key lacks v1.merchants.read.

2. A product with a price

curl -X POST https://api.sandbox.staging.regoria.com/v1/products \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Starter pack", "type": "one_off", "amount_cents": 2900}'

The answer is the product with its active_price (prc_…). A product is one_off (bought once) or plan (billed on a schedule; add a plan with POST /v1/plans). A new price for the same product is POST /v1/prices; the old one stays on the orders that used it.

3. A hosted checkout

curl -X POST https://api.sandbox.staging.regoria.com/v1/checkout-sessions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "lines": [{"price_id": "prc_…", "quantity": 1}],
    "customer_ref": "cus_A1B2",
    "reference": "INV-1001",
    "success_url": "https://shop.example.com/thanks",
    "cancel_url": "https://shop.example.com/cart"
  }'

Send the buyer to the session's url. Regoria shows the hosted page, quotes the sales tax for the buyer's address, takes the card and captures. The buyer lands on your success_url; your server learns about the sale from the order.paid webhook, never from the redirect alone. Sessions expire after 30 minutes. The whole flow, with the webhook handler, is in Hosted checkout end to end.

4. A webhook endpoint

curl -X POST https://api.sandbox.staging.regoria.com/v1/webhook-endpoints \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://shop.example.com/webhooks", "events": ["order.paid", "refund.issued"]}'

The answer carries the signing secret once. Store it; every delivery is signed with it. Webhooks has the verification code and the retry schedule.

Where next