---
title: "Go live: from sandbox to production"
description: "Move a Flowie Exchange integration from sandbox to production: rehearse in the sandbox, validate documents, switch to a live key and the production URL, re-register webhooks, monitor requests. Checklists for small businesses, mid-market, large groups and platforms."
canonical: "https://docs.get-flowie.com/guides/go-live"
source: "https://docs.get-flowie.com/guides/go-live.html"
---

# Go live: from sandbox to production

Guides

# Go live: from sandbox to production

The playbook to move a working sandbox integration to production without surprises: rehearse, validate, switch key and URL, re-register webhooks, then watch the first live documents.

For
    Small business · Mid-market · Large group · Platform — Sellers and Buyers

Time
    ≈ 1 h once your sandbox tests pass

You need
    A sandbox key ([get one](<../sandbox/keys.html>)) and access to your production Flowie organization

Updated
    30 Nov 2026

Which path is yours?

**Small business** — one company, one key, one webhook: steps 1, 3, 4 and 5 are enough, then tick the [5-item checklist](<#checklist-small>).  
**Mid-market** — run every step once for your ERP connector, then the [mid-market checklist](<#checklist-mid>) for each entity.  
**Large group** — run steps 1 to 6 once centrally, then the [per-entity checklist](<#checklist-large>) for each legal entity you switch.  
**Platform** — your live key is a platform key; run the [per-managed-company checklist](<#checklist-platform>) for every customer you switch. 

## 1 · Rehearse the whole flow in the sandbox

The sandbox (`https://back.flowie.ink/exchange`, keys `flw_test_…`) answers with the same API contract and never sends anything on a real network. Get a key in one call, without signing up:
[code] 
    curl -X POST https://back.flowie.ink/exchange/v1/sandbox/bootstrap \
      -H "Content-Type: application/json" \
      -d '{"label": "go-live-rehearsal"}'
[/code]

Expected response (trimmed) — the `apiKey` is shown only once, and comes with a starter company:
[code] 
    {
      "apiKey": "flw_test_4f8a1c2d…",
      "keyType": "personal",
      "company": {
        "id": "comp_sbx_4f8a1c2d3e7b9a5c6d8e",
        "peppolId": "0208:0000000001",
        "vatNumber": "BE0000000001",
        "status": "active"
      },
      "expiresAt": "2026-12-07T09:14:22Z"
    }
[/code]

Send a first document from that starter company to the test recipient `0208:TEST_OK`:
[code] 
    curl -X POST https://back.flowie.ink/exchange/v1/documents/send \
      -H "Authorization: Bearer $FLOWIE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "type": "invoice",
        "from": "vat:BE0000000001",
        "to": "0208:TEST_OK",
        "document": {
          "number": "REHEARSAL-001",
          "issueDate": "2026-11-30",
          "currency": "EUR",
          "lines": [{"description": "Go-live rehearsal", "quantity": 1, "unitPrice": 100.00, "vatRate": 21}]
        }
      }'
[/code]

Expected response:
[code] 
    {
      "id": "doc_sbx_5c1e9a…",
      "status": "sent",
      "type": "invoice",
      "number": "REHEARSAL-001",
      "from": {"peppolId": "0208:0000000001", "vatNumber": "BE0000000001"},
      "to": {"peppolId": "0208:TEST_OK"},
      "deliveryStatus": "pending",
      "sentAt": "2026-11-30T10:02:11Z"
    }
[/code]

`status: "sent"` means Flowie accepted the document. `deliveryStatus` is the network state: `pending` until the recipient's access point confirms, then `delivered` or `failed`; `stored` is for a file kept without routing (format `raw` or an unrecognised file). Keep the `doc_sbx_…` id: you will use it for the lifecycle.

Then replay your own cases with the sandbox's deterministic test data. The [sandbox page](<../sandbox/index.html>) has the full list.

What to rehearse| How, in the sandbox  
---|---  
Approval and payment| `POST /v1/documents/{documentId}/lifecycle` on the `doc_sbx_…` id. A sandbox document starts in `received`, so `approved` then `paid` walk the state machine — see the [lifecycle guide](<lifecycle.html>).  
Company onboarding errors| `POST /v1/companies` with the [test VAT](<../sandbox/index.html#test-vats>) `BE0000000099` (`422 VAT_INACTIVE`) or `BE0000000404` (`422 VAT_NOT_FOUND`); `BE0000000001` succeeds.  
Error handling| Add `X-Sandbox-Force-Error: UPSTREAM_UNAVAILABLE` (or `RATE_LIMITED`, `EXPIRED_TOKEN`, `INTERNAL_ERROR` …) to any call — [list of values](<../sandbox/index.html#test-errors>).  
Back-off on rate limits| `POST /v1/sandbox/rate-limit/exhaust` with `{"durationSeconds": 60}`: every call then returns `429` with a real `Retry-After`.  
Webhook signature| Check your verifier against the [signature checker](<../reference/webhooks.html#verifier>) on the webhooks reference.  
A clean slate| `POST /v1/sandbox/reset` with `{"confirm": "yes"}` wipes your sandbox documents.  
  
## 2 · Validate documents before you switch

`POST /v1/documents/validate` checks a document without storing or sending it. Run it in your CI on a sample of real documents produced by your ERP or billing tool.
[code] 
    curl -X POST https://back.flowie.ink/exchange/v1/documents/validate \
      -H "Authorization: Bearer $FLOWIE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "type": "invoice",
        "format": "json",
        "from": "vat:BE0000000001",
        "to": "0208:TEST_OK",
        "document": {
          "number": "REHEARSAL-002",
          "issueDate": "2026-11-30",
          "currency": "EUR",
          "lines": [{"description": "Go-live rehearsal", "quantity": 1, "unitPrice": 100.00, "vatRate": 21}]
        }
      }'
[/code]

Expected response:
[code] 
    {"valid": true, "errors": [], "warnings": [], "preview": null}
[/code]

An invalid document still answers `200`: read `valid` and `errors`, not the HTTP status.
[code] 
    {
      "valid": false,
      "errors": [
        {"field": "document.lines", "rule": "min_items", "message": "at least one line required"}
      ],
      "warnings": [],
      "preview": null
    }
[/code]

What is checked

With `"format": "json"`, validate only checks the structure (a `document` is present, with at least one line); the UBL is rendered and fully validated when you send. To run the complete rule set (EN 16931, Peppol BIS, national rules) before going live, validate the XML itself: `"format": "ubl-xml"` with the document in `xml`. 

## 3 · Switch the key and the base URL

| Sandbox| Production  
---|---|---  
Base URL| `https://back.flowie.ink/exchange`| `https://back.p2p-flowie.com/exchange`  
Company key| `flw_test_…`| `flw_live_…`  
Platform key| `flw_plat_test_…`| `flw_plat_live_…`  
  
Create the live key on the **production** backend: sign in on the [API keys page](<../sandbox/keys.html>) and pick production. A key belongs to the backend it was created on — used against the other one, it returns `401`. Keep both values in configuration, never in code:
[code] 
    # production
    export FLOWIE_BASE_URL="https://back.p2p-flowie.com/exchange"
    export FLOWIE_API_KEY="flw_live_…"   # read it from your secret store
[/code]

Paths, bodies and responses do not change between the two environments: only these two values do.

## 4 · Register your webhooks on production

Webhooks live on one backend: the ones you created in the sandbox do not exist in production. Register them again with the live key and the production base URL. Pass your own `secret` (for example the output of `openssl rand -hex 32`) and store it: if you leave it out, Flowie generates one and never returns it. The curl below targets the sandbox so you can try it; the Node and Python versions read `FLOWIE_BASE_URL`.
[code] 
    curl -X POST https://back.flowie.ink/exchange/v1/webhooks \
      -H "Authorization: Bearer $FLOWIE_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "url": "https://erp.example.com/hooks/flowie",
        "events": ["document.received", "document.delivered", "document.failed", "lifecycle.updated", "compliance.reported", "compliance.reported.failed"],
        "secret": "whsec_9f2c6e0b5a7d41e3b8c2"
      }'
[/code]

Expected response:
[code] 
    {
      "id": "wh_abc123",
      "url": "https://erp.example.com/hooks/flowie",
      "events": ["document.received", "document.delivered", "document.failed", "lifecycle.updated", "compliance.reported", "compliance.reported.failed"],
      "status": "active",
      "createdAt": "2026-11-30T10:15:00Z",
      "failureCount": 0
    }
[/code]

Verify `X-Flowie-Signature` on every delivery — the recipe and the retry schedule are on the [webhooks reference](<../reference/webhooks.html#signing>). No public endpoint? Poll `GET /v1/events` instead ([polling](<receive-invoices.html#polling>)).

## 5 · Send a first live document

Send one real document to a counterparty who expects it — a customer you can call, or a second entity of your own group — and follow it:

  * the send response returns `status: "sent"` (Flowie accepted it) with `deliveryStatus: "pending"` while the recipient's access point has not confirmed;
  * `document.delivered`, or `document.failed` with an error code, reaches your webhook;
  * as a buyer, ask one supplier to send you a document and check that `document.received` reaches your system.



You can also read the document at any time:
[code] 
    curl https://back.flowie.ink/exchange/v1/documents/{documentId} \
      -H "Authorization: Bearer $FLOWIE_API_KEY"
[/code]

Expected response (trimmed):
[code] 
    {
      "id": "doc_01HY7AB9C2DE3FG",
      "direction": "outgoing",
      "number": "INV-2026-1001",
      "deliveryStatus": "delivered",
      "sentAt": "2026-11-30T10:20:03Z",
      …
    }
[/code]

## 6 · Monitor production

Every response carries an `X-Request-Id` header (`req_…`). Log it next to your own record: it opens the request inspector, which keeps every write call and every error for 7 days, secrets redacted.
[code] 
    curl https://back.flowie.ink/exchange/v1/requests/{requestId} \
      -H "Authorization: Bearer $FLOWIE_API_KEY"
[/code]

Expected response (trimmed):
[code] 
    {
      "requestId": "req_7f3a9c1e2b4d6f8a0c1e3b5d",
      "method": "POST",
      "path": "/exchange/v1/documents/send",
      "request": {
        "headers": {"authorization": "Bearer flw_live_…(redacted)", "content-type": "application/json"},
        "body": {"type": "invoice", "from": "vat:BE0000000001", "to": "0208:0123456789", …}
      },
      "response": {
        "statusCode": 502,
        "body": {"code": "upstream_error", "message": "Upstream Peppol AP refused the document", …}
      },
      "durationMs": 543,
      "createdAt": "2026-11-30T08:24:11Z",
      "viewerUrl": "https://docs.get-flowie.com/playground/requests.html?id=req_7f3a9c1e2b4d6f8a0c1e3b5d"
    }
[/code]

  * List recent failures with `GET /v1/requests?status=502` (any exact status code), or open one in the [request viewer](<../playground/requests.html>).
  * Alert on `document.failed` and `compliance.reported.failed`.
  * On `429`, wait the `Retry-After` seconds before retrying — [rate limits](<../reference/index.html#rate-limits>).
  * Retry a send with the same `Idempotency-Key` so it can never create a duplicate — [idempotency](<../reference/index.html#idempotency>).



## France: the extra steps

For French companies, Flowie is the Plateforme Agréée (Flowie SAS, SIREN 921 376 265, PA matricule 0064). On top of the steps above:

  * be ready to **receive** before you send, and check each company's directory (annuaire) entry — [receive](<../compliance/fr/integration.html#receive>), [onboarding and annuaire](<../compliance/fr/integration.html#onboard>);
  * implement the two mandatory lifecycle statuses: `210 Refusée` as a buyer, `212 Encaissée` as a seller — [who owes which status](<../compliance/fr/integration.html#lifecycle>);
  * run the [French go-live checklist](<../compliance/fr/integration.html#golive>).



## Checklist by company size

### Small business

✓| Item  
---|---  
☐| Live key created on production and kept in a secret store (not in code, not in a spreadsheet).  
☐| Base URL set to `https://back.p2p-flowie.com/exchange`.  
☐| Your company exists in production and can send and receive (`GET /v1/companies/{company_id}`).  
☐| A production webhook — or a polling job — for `document.received` and `document.failed`.  
☐| A first real invoice reached `delivered`.  
  
### Mid-market

✓| Item| Why  
---|---|---  
☐| Everything in the small-business list, for each entity.| Each legal entity is its own company.  
☐| `POST /v1/documents/validate` runs in CI on real ERP output.| Catches mapping regressions before they reach a customer.  
☐| One persistent `Idempotency-Key` per outgoing ERP document.| Retries after a timeout or a deploy never duplicate an invoice.  
☐| `429` handled with `Retry-After`.| Month-end batches stay within your budget.  
☐| `X-Request-Id` logged next to each ERP record.| Support starts from it.  
☐| Webhook signature verified; lifecycle statuses mapped to ERP statuses.| Approvals and payments show up in the ERP.  
☐| Error codes mapped to messages your users understand.| Accounts payable and receivable can act without IT.  
  
### Large group — per entity

✓| Item| Why  
---|---|---  
☐| Entity created (`POST /v1/companies`) or imported from its previous platform (`POST /v1/companies/import`, then `/register`).| Each entity needs its own network registration.  
☐| Webhook routing decided: one webhook per entity (`companyId`) or one group-wide endpoint.| Your shared-service centre gets the right events.  
☐| Owner named for buyer-side statuses (refuse, approve, pay) and seller-side payment statuses.| In France, 210 and 212 are mandatory.  
☐| High volumes go through `POST /v1/documents/send/batch` and `POST /v1/documents/lifecycle/batch`.| Fewer calls, same idempotency rules.  
☐| Per-country rules checked on the [compliance pages](<../compliance/index.html>) for each country the entity invoices in.| Clearance countries add steps.  
☐| First live document sent and received for this entity.| Proves the registration, not only the code.  
  
### Platform — per managed company

✓| Item| Why  
---|---|---  
☐| Live platform key (`flw_plat_live_…`) created on production.| Only a platform key can manage companies.  
☐| Customer onboarded with `POST /v1/platform/companies` and listed by `GET /v1/platform/companies`.| The company is managed by your platform.  
☐| Calls made on its behalf send `X-Flowie-Organization-Id` with its id.| Otherwise `403`.  
☐| Its events reach you: its own webhook, or the cross-tenant stream `GET /v1/platform/events`.| You see every customer's failures.  
☐| Usage followed with `GET /v1/platform/usage`.| Billing and capacity per customer.  
☐| First live document sent and received for this customer.| Same proof as for your own entities.  
  
## Errors you may hit

Status / code| What it means| Fix  
---|---|---  
`401` `Invalid or revoked API key`| The key belongs to the other environment, or was revoked.| Create a key on the production backend and check `FLOWIE_BASE_URL`.  
`429`| Your per-minute budget is spent.| Wait `Retry-After` seconds, then retry.  
`422` `VAT_NOT_FOUND` / `VAT_INACTIVE`| The VAT number is unknown or inactive in the national registry.| Check the number with the company; new entities can take a few days to appear.  
`503` `UPSTREAM_UNAVAILABLE`| A dependency (directory, regulator) is down.| Retry after `Retry-After`, with the same `Idempotency-Key`.  
`document.failed` · `AP_REJECTED`| The recipient's access point refused the document.| Read `errorMessage`; validate the UBL with `"format": "ubl-xml"`.  
`compliance.reported.failed` · PPF `00058`| France: service exécutant missing for a public buyer.| Add the buyer reference the public buyer expects and send again.  
  
Full list: [error reference](<../reference/errors.html>).

## Next steps

  * [Track the invoice lifecycle](<lifecycle.html>) — approvals, refusals and payments.
  * [Receive invoices](<receive-invoices.html>) — webhooks, signature, structured view.
  * [Webhooks reference](<../reference/webhooks.html>) — payloads and retry schedule.
  * [France integration playbook](<../compliance/fr/integration.html>) — the French reform, end to end.
