Sandboxes
A sandbox is an isolated test copy of your merchant account, with its own orders, customers, catalog, webhook endpoints, settings, and request logs. Test requests go to the same https://api.withflintpay.com/v1/... routes as live ones. The flint_test_... key you send decides which sandbox handles the request: each test key is bound to one sandbox when it's issued, and that binding never changes. Test-mode responses name the sandbox in the Flint-Sandbox-Id header.
Use these routes to give CI, QA, or a partner demo data of its own, to start a sandbox over with clean data, and to issue test keys for a sandbox. The Sandboxes & test mode guide covers test mode end to end, including a per-run CI setup.
The default sandbox and the sandboxes you create#
Every merchant has one default sandbox, named Default Test, with is_default: true. Flint creates it with the account. It can be reset and stays the default afterward, but it can't be archived, so use it for long-lived development and put disposable work in sandboxes you create.
A sandbox you create with POST /v1/sandboxes starts empty, with no catalog, customers, or webhook endpoints. Its name must be unique among your active sandboxes, or the request returns 409 ALREADY_EXISTS. Send issue_test_key: true with the key's access, and scopes when access is restricted, to get a key bound to the new sandbox in the same response. test_key_name defaults to the sandbox name followed by Test Key. access, scopes, and test_key_name are accepted only with issue_test_key: true. The key's secret_key appears only in that response; see responses with one-time secrets.
Flint sets up test card payments in each new sandbox, which takes a short time. Before the first card payment, call GET /v1/merchant with a key bound to that sandbox and wait for readiness.payments.status to be ready. Testing shows the check.
To rehearse onboarding instead, create the sandbox with initial_onboarding: "not_started". Flint then doesn't verify its test account: requirements stay due, and readiness reports onboarding_not_started with the create_merchant_account_session action until you onboard the sandbox. initial_onboarding defaults to complete, every response echoes it, and a reset returns the sandbox to it; see Create a sandbox.
Who can manage sandboxes#
A live credential can call every route here for any of the merchant's sandboxes. A test credential (a test key, a sandbox CLI login, or a sandbox workload token) can get and reset only the sandbox it's bound to: any other sandbox_id returns 404 RESOURCE_NOT_FOUND, whether or not that sandbox exists, and listing, creating, and archiving return 403 FORBIDDEN with details[0].reason live_mode_required. During API-first setup, the onboarding session token can also call them.
| To | The credential needs | Test credentials |
|---|---|---|
| List sandboxes | developer.sandboxes.read or developer.sandboxes.write | Not allowed |
| Get a sandbox | developer.sandboxes.read or developer.sandboxes.write | Its own sandbox only |
| Reset a sandbox | developer.sandboxes.write | Its own sandbox only |
| Create or archive a sandbox | developer.sandboxes.write | Not allowed |
| Issue a test key, on either route | developer.sandboxes.write and accounts.api_keys.write, plus every scope a restricted key grants | See issue a key |
Both sandbox scopes are available to live and test keys, and full-access keys of either mode hold them; read-only keys hold developer.sandboxes.read.
Granting full or read_only access to a new key takes a full-access live key or a freshly verified user session; see credentials that can mint keys. With an onboarding session token, only a merchant owner or admin can create, reset, or archive sandboxes. Other users get 403 FORBIDDEN with reason merchant_role_insufficient.
Status#
status on sandboxactiveKeys bound to it authenticate. You can issue keys for it and reset it, and archive it unless it's the default sandbox.archivedFinalArchived. Every key bound to it returns401 INVALID_CREDENTIALwith reasonrevoked. You can still read it withGET /v1/sandboxes/{sandbox_id}, but nothing brings it back.
GET /v1/sandboxes leaves archived sandboxes out unless the status filter names archived.
Reset or archive#
Reset (POST /v1/sandboxes/{sandbox_id}/reset) deletes a sandbox's data and keeps the sandbox: its ID, name, keys, and webhook endpoints stay the same. Archive (DELETE /v1/sandboxes/{sandbox_id}) retires the sandbox and frees its name.
| Reset | Archive | |
|---|---|---|
| Returns | The same sandbox, active, with a new updated_at | The archived sandbox |
sandbox_id and name | Kept | ID kept; name freed for a new sandbox |
| Data | Deleted | Kept but unreadable, except after a stopped reset, when both sets of data are deleted |
| Test keys and other credentials | Keep working | Revoked |
| Webhook endpoints | Kept, with the same IDs and signing secrets | Stop delivering |
| Test card payments | Still set up when initial_onboarding is complete; set up again through onboarding when it's not_started | Not applicable |
Archiving renames the sandbox to its old name followed by (Archived and the last 8 characters of its ID, for example CI (Archived WTCV93GX).
After a reset, re-create the catalog and customers your tests rely on, because the IDs from before the reset return 404. Reset a sandbox lists exactly what a reset keeps and deletes.
Follow a reset#
Send an Idempotency-Key with every reset. If the response is lost, retrying with the same key within 24 hours returns the recorded response without resetting again. After 24 hours, the same key resets the sandbox again. A request with a new key resets the sandbox again, or resumes a reset that stopped after deletion started.
curl -X POST https://api.withflintpay.com/v1/sandboxes/test_01KWJS7ZW5YAC86HMHWTCV93GX/reset \
-H "Authorization: Bearer YOUR_TEST_API_KEY" \
-H "Idempotency-Key: reset-ci-run-4182"
{
"data": {
"sandbox_id": "test_01KWJS7ZW5YAC86HMHWTCV93GX",
"name": "CI",
"status": "active",
"is_default": false,
"initial_onboarding": "complete",
"reset_failed_at": null,
"created_at": "2026-08-12T09:02:11Z",
"updated_at": "2026-09-04T14:20:33Z"
},
"request_id": "req_01KWM6ZHRMW9K5XV66R5X74VRN"
}
While the reset runs, requests made with the sandbox's credentials get 409 OPERATION_IN_PROGRESS with reason sandbox_resetting and a Retry-After header. Retry them after Retry-After.
Each sandbox can be reset once every 10 seconds and 500 times per UTC day, across every credential that can reset it. Past either limit, the request gets 429 RATE_LIMIT_EXCEEDED with Retry-After; a retry with the same Idempotency-Key doesn't count again.
Failed resets retry after 1, 2, 4, 8, 16, 32, and 60 minutes. Flint allows at most eight attempts, counting each when it starts, including interrupted attempts. If none succeeds, Flint stops retrying and sets reset_failed_at on the sandbox:
- If deletion has not started, the sandbox keeps its previous data and credentials and accepts requests again. You can reset it again or archive it.
- If deletion has started, requests return
409 ACTION_NOT_ALLOWEDwith reasonsandbox_reset_failed, withoutRetry-After. Send anotherPOST /v1/sandboxes/{sandbox_id}/resetwith a new idempotency key to resume the reset. You can also archive a non-default sandbox with a live credential; both sets of data are then deleted in the background. Credential events wait until you retry or archive.
A successful reset clears reset_failed_at. Otherwise the timestamp records the last reset that stopped. null means no reset has stopped, or a later reset succeeded. The sandbox's status remains active until you archive it.
Errors specific to sandboxes#
- StatusHTTP 403CodeFORBIDDENWhat to doReason
live_mode_required: a test credential listed, created, or archived sandboxes. Reasonmerchant_role_insufficient: the onboarding session's user isn't a merchant owner or admin. - StatusHTTP 409CodeALREADY_
EXISTS What to doAn active sandbox already has thatname. Choose another name, or archive the existing sandbox first. - StatusHTTP 409What to doThe sandbox is being reset. Reason
sandbox_resetting: a request made with the sandbox's credentials during the reset. No reason: a second reset or an archive during it. Retry afterRetry-After. - StatusHTTP 409What to doReason
sandbox_reset_failed: the reset stopped after deletion started. Reset it again to retry, or archive a non-default sandbox. Reasonarchived: the sandbox is archived, so it can't be reset, archived again, or given keys. Reasonunsupported_state: the default sandbox can't be archived. - StatusHTTP 401What to doReason
revoked: the key's sandbox was archived. Issue a key for an active sandbox.
Request validation and scope errors are listed in Sandboxes & test mode.
Related guides#
Sandboxes & test modeHow keys select a sandbox, issuing keys, resets in CI, and the CLI commands.TestingTest cards, declines, 3D Secure, refunds, and disputes in a sandbox.Test clocksRun trials, renewals, and payment retries at a time you control.The Sandbox object#
An isolated environment for testing an integration.
Returned by GET /v1/sandboxes/{sandbox_id} and carried by the endpoints below.
Attributes
created_atstringRequiredRFC3339 timestamp.
initial_onboardingenumRequiredThe onboarding state the sandbox starts in, and returns to when you reset it. `complete` prefills a verified test identity; `not_started` leaves requirements due so you can rehearse onboarding.
completenot_started
is_defaultbooleanRequiredWhether this is the merchant's one default sandbox. It can be reset but cannot be archived.
namestringRequiredSandbox name. Archiving appends (Archived XXXXXXXX) to free the original name for reuse.
reset_failed_atstring or nullRequiredWhen the last reset stopped after repeated failures. Before data deletion starts, the sandbox keeps its previous data and remains usable. Once deletion starts, requests are blocked until you retry the reset or archive a non-default sandbox. Null when no reset has failed or a later reset succeeded.
sandbox_idstringRequiredUnique identifier for this sandbox, prefixed `test_`.
statusenumRequiredSandbox availability. Active sandboxes accept test requests. Archived sandboxes are retired, with their API keys revoked; reset preserves an active sandbox and its credentials.
activearchived
updated_atstringRequiredRFC3339 timestamp.
{
"created_at": "2026-03-18T19:45:00Z",
"initial_onboarding": "complete",
"is_default": true,
"name": "Default Test",
"reset_failed_at": null,
"sandbox_id": "test_01KEZF7C00EWKVN1WYFT3YJSS5",
"status": "active",
"updated_at": "2026-03-18T19:45:00Z"
}List sandboxes#
/v1/sandboxesRequires scope developer.sandboxes.read or developer.sandboxes.write
Rate limit: read
Returns the merchant's sandboxes. Flint guarantees a default test sandbox for every merchant. Use an onboarding session during setup or a live credential afterward. Test credentials cannot list sandboxes. Default order: is_default descending, then created_at descending, then sandbox_id descending.
Query parameters
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque, signed next_page_token from the previous response, bound to the list and caller. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An altered, invalid, expired, or mismatched token returns a validation error.
statusarray of enumFilter by status. Omitted, the list leaves out archived rows; name archived to include them. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
activearchived
Response · 200
The merchant's sandboxes.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
created_atstringRequiredRFC3339 timestamp.
initial_onboardingenumRequiredThe onboarding state the sandbox starts in, and returns to when you reset it. `complete` prefills a verified test identity; `not_started` leaves requirements due so you can rehearse onboarding.
completenot_started
is_defaultbooleanRequiredWhether this is the merchant's one default sandbox. It can be reset but cannot be archived.
namestringRequiredSandbox name. Archiving appends (Archived XXXXXXXX) to free the original name for reuse.
reset_failed_atstring or nullRequiredWhen the last reset stopped after repeated failures. Before data deletion starts, the sandbox keeps its previous data and remains usable. Once deletion starts, requests are blocked until you retry the reset or archive a non-default sandbox. Null when no reset has failed or a later reset succeeded.
sandbox_idstringRequiredUnique identifier for this sandbox, prefixed `test_`.
statusenumRequiredSandbox availability. Active sandboxes accept test requests. Archived sandboxes are retired, with their API keys revoked; reset preserves an active sandbox and its credentials.
activearchived
updated_atstringRequiredRFC3339 timestamp.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
next_page_tokenstringOpaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/sandboxes \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"The merchant's sandboxes.
{
"data": [
{
"created_at": "2026-03-18T19:45:00Z",
"initial_onboarding": "complete",
"is_default": true,
"name": "Default Test",
"reset_failed_at": null,
"sandbox_id": "test_01KEZF7C00EWKVN1WYFT3YJSS5",
"status": "active",
"updated_at": "2026-03-18T19:45:00Z"
},
{
"created_at": "2026-03-18T20:00:00Z",
"initial_onboarding": "not_started",
"is_default": false,
"name": "Partner Demo",
"reset_failed_at": null,
"sandbox_id": "test_01KEZF7C00BP1BVYGDKDERC0GM",
"status": "active",
"updated_at": "2026-03-18T20:00:00Z"
}
],
"meta": {
"api_version": "2026-09-07"
},
"next_page_token": "example",
"request_id": "req_01KWM6ZWCMGKVSSFSCZMZWFY21"
}Create sandbox#
/v1/sandboxesIdempotentRequires scope developer.sandboxes.write
Also requires accounts.api_keys.write when issue_test_key is true.
Rate limit: sensitive_write
Creates a new empty test sandbox for the current merchant. Send `issue_test_key: true` to also receive a test key bound to it; this also requires `accounts.api_keys.write`.
Request body
Send exactly one of these
Send exactly one of these
accessenumRequiredKey access. Full and read_only resolve from the current scope catalog for the key's mode; restricted holds only its listed scopes. Granting full or read_only requires a freshly verified authorized user session, or a full-access API key in the key's mode or a live full-access key granting a test key.
full
initial_onboardingenumThe onboarding state the sandbox starts in, and returns to when you reset it. `complete` prefills a verified test identity; `not_started` leaves requirements due so you can rehearse onboarding.
completenot_started
issue_test_keyenumRequiredWhether to issue a test API key for the new sandbox. Defaults to `false`. When `true`, the response includes the key and its one-time `secret_key`, and `access`, `scopes`, `test_key_name`, and `test_key_expires_at` apply. When `false`, sending any of them returns 400 NOT_ALLOWED.
true
namestringRequiredName of the new sandbox. Required. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.
test_key_expires_atstringFuture RFC 3339 timestamp when the issued test key expires. Allowed only with issue_test_key true. Omit for a key that doesn't expire.
test_key_namestringName for the issued test key, 1 to 100 characters. Allowed only with issue_test_key true. Defaults to the sandbox name followed by `Test Key`.
accessenumRequiredKey access. Full and read_only resolve from the current scope catalog for the key's mode; restricted holds only its listed scopes. Granting full or read_only requires a freshly verified authorized user session, or a full-access API key in the key's mode or a live full-access key granting a test key.
read_only
initial_onboardingenumThe onboarding state the sandbox starts in, and returns to when you reset it. `complete` prefills a verified test identity; `not_started` leaves requirements due so you can rehearse onboarding.
completenot_started
issue_test_keyenumRequiredWhether to issue a test API key for the new sandbox. Defaults to `false`. When `true`, the response includes the key and its one-time `secret_key`, and `access`, `scopes`, `test_key_name`, and `test_key_expires_at` apply. When `false`, sending any of them returns 400 NOT_ALLOWED.
true
namestringRequiredName of the new sandbox. Required. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.
test_key_expires_atstringFuture RFC 3339 timestamp when the issued test key expires. Allowed only with issue_test_key true. Omit for a key that doesn't expire.
test_key_namestringName for the issued test key, 1 to 100 characters. Allowed only with issue_test_key true. Defaults to the sandbox name followed by `Test Key`.
accessenumRequiredKey access. Full and read_only resolve from the current scope catalog for the key's mode; restricted holds only its listed scopes. Granting full or read_only requires a freshly verified authorized user session, or a full-access API key in the key's mode or a live full-access key granting a test key.
restricted
initial_onboardingenumThe onboarding state the sandbox starts in, and returns to when you reset it. `complete` prefills a verified test identity; `not_started` leaves requirements due so you can rehearse onboarding.
completenot_started
issue_test_keyenumRequiredWhether to issue a test API key for the new sandbox. Defaults to `false`. When `true`, the response includes the key and its one-time `secret_key`, and `access`, `scopes`, `test_key_name`, and `test_key_expires_at` apply. When `false`, sending any of them returns 400 NOT_ALLOWED.
true
namestringRequiredName of the new sandbox. Required. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.
scopesarray of enumRequiredThe scopes to grant. Required only with access restricted; forbidden with full or read_only. For a test key, use only scopes whose key_modes includes test in x-flint-scopes. The developer.sandboxes.read and developer.sandboxes.write scopes are valid on test keys; developer.partner_apps.read and developer.partner_apps.write are live-only.
accounts.api_keys.readaccounts.api_keys.writeaccounts.devices.readaccounts.devices.writeaccounts.workload_identities.readaccounts.workload_identities.writeanalytics.readcheckouts.checkout_sessions.readcheckouts.checkout_sessions.writecheckouts.payment_links.readcheckouts.payment_links.writecheckouts.shops.readcheckouts.shops.writecommerce.bundles.readcommerce.bundles.writecommerce.catalog.readcommerce.catalog.writecommerce.credit_notes.readcommerce.credit_notes.writecommerce.delivery.readcommerce.delivery.writecommerce.gift_cards.adjustments.writecommerce.gift_cards.readcommerce.gift_cards.redemptions.writecommerce.gift_cards.secrets.writecommerce.gift_cards.writecommerce.inventory.allocation.writecommerce.inventory.policies.writecommerce.inventory.readcommerce.inventory.writecommerce.invoices.readcommerce.invoices.writecommerce.license_keys.readcommerce.license_keys.secrets.writecommerce.license_keys.writecommerce.orders.readcommerce.orders.writecommerce.products.readcommerce.products.writecommerce.promotions.readcommerce.promotions.writecommerce.refunds.readcommerce.refunds.tax_overrides.writecommerce.refunds.writecommerce.returns.operations.writecommerce.returns.policies.writecommerce.returns.readcommerce.returns.reasons.writecommerce.returns.resolutions.writecommerce.returns.writecommerce.subscription_plans.readcommerce.subscription_plans.writecommerce.subscriptions.readcommerce.subscriptions.writecommerce.tickets.readcommerce.tickets.writecustomers.readcustomers.sessions.writecustomers.writedeveloper.merchant_signups.readdeveloper.merchant_signups.writedeveloper.partner_apps.readdeveloper.partner_apps.writedeveloper.request_logs.readdeveloper.request_logs.self.readdeveloper.resource_timelines.readdeveloper.sandboxes.readdeveloper.sandboxes.writedeveloper.test_clocks.readdeveloper.test_clocks.writemerchant_billing.readmerchants.account_sessions.writemerchants.locations.readmerchants.locations.writemerchants.onboarding.readmerchants.onboarding.writemerchants.profile.readmerchants.profile.writemoney_movement.balance_transactions.readmoney_movement.balances.readmoney_movement.payment_splits.readmoney_movement.payout_settings.readmoney_movement.payout_settings.writemoney_movement.payouts.readmoney_movement.payouts.writemoney_movement.platform_fees.readpayments.disputes.readpayments.disputes.writepayments.payment_intents.readpayments.payment_intents.writepayments.payment_method_domains.readpayments.payment_method_domains.writepayments.payment_methods.readpayments.payment_methods.writepayments.readers.readpayments.readers.writereports.readreports.writerisk.controls.writerisk.readrisk.reviews.writesettings.readsettings.writewebhooks.readwebhooks.write
test_key_expires_atstringFuture RFC 3339 timestamp when the issued test key expires. Allowed only with issue_test_key true. Omit for a key that doesn't expire.
test_key_namestringName for the issued test key, 1 to 100 characters. Allowed only with issue_test_key true. Defaults to the sandbox name followed by `Test Key`.
Leave out access, scopes, test_key_name, and test_key_expires_at.
initial_onboardingenumThe onboarding state the sandbox starts in, and returns to when you reset it. `complete` prefills a verified test identity; `not_started` leaves requirements due so you can rehearse onboarding.
completenot_started
issue_test_keyenumWhether to issue a test API key for the new sandbox. Defaults to `false`. When `true`, the response includes the key and its one-time `secret_key`, and `access`, `scopes`, `test_key_name`, and `test_key_expires_at` apply. When `false`, sending any of them returns 400 NOT_ALLOWED.
false
namestringRequiredName of the new sandbox. Required. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.
Response · 201
The created sandbox, optionally with a newly issued test key.
dataobjectRequiredResource, collection, or operation result returned by this request.
api_keyobjectThe newly issued test API key. Present exactly when issue_test_key is true.
sandboxobjectRequiredThe sandbox Flint created.
secret_keystringThe one-time secret for api_key. Present exactly when issue_test_key is true.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl -X POST https://api.withflintpay.com/v1/sandboxes \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"access": "restricted",
"issue_test_key": true,
"name": "QA",
"scopes": [
"commerce.orders.read",
"commerce.orders.write"
],
"test_key_name": "QA integration key"
}'Get sandbox#
/v1/sandboxes/{sandbox_id}Requires scope developer.sandboxes.read or developer.sandboxes.write
Rate limit: read
Returns a single sandbox by ID. A test credential (API key, CLI login, or workload token) can read only the sandbox it is bound to; any other `sandbox_id` gets 404 `RESOURCE_NOT_FOUND`.
Path parameters
sandbox_idstringRequiredFlint sandbox ID. Must be a valid ID with prefix test_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Response · 200
The requested sandbox.
dataobjectRequiredResource, collection, or operation result returned by this request.
created_atstringRequiredRFC3339 timestamp.
initial_onboardingenumRequiredThe onboarding state the sandbox starts in, and returns to when you reset it. `complete` prefills a verified test identity; `not_started` leaves requirements due so you can rehearse onboarding.
completenot_started
is_defaultbooleanRequiredWhether this is the merchant's one default sandbox. It can be reset but cannot be archived.
namestringRequiredSandbox name. Archiving appends (Archived XXXXXXXX) to free the original name for reuse.
reset_failed_atstring or nullRequiredWhen the last reset stopped after repeated failures. Before data deletion starts, the sandbox keeps its previous data and remains usable. Once deletion starts, requests are blocked until you retry the reset or archive a non-default sandbox. Null when no reset has failed or a later reset succeeded.
sandbox_idstringRequiredUnique identifier for this sandbox, prefixed `test_`.
statusenumRequiredSandbox availability. Active sandboxes accept test requests. Archived sandboxes are retired, with their API keys revoked; reset preserves an active sandbox and its credentials.
activearchived
updated_atstringRequiredRFC3339 timestamp.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/sandboxes/test_01KEZF7C00JC77HTMTB2XHNPE0 \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"The requested sandbox.
{
"data": {
"created_at": "2026-03-18T19:45:00Z",
"initial_onboarding": "complete",
"is_default": true,
"name": "Default Test",
"reset_failed_at": null,
"sandbox_id": "test_01KEZF7C00EWKVN1WYFT3YJSS5",
"status": "active",
"updated_at": "2026-03-18T19:45:00Z"
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM685SAGEG4N1S8P6JFXW05"
}Archive sandbox#
/v1/sandboxes/{sandbox_id}IdempotentRequires scope developer.sandboxes.write
Rate limit: sensitive_write
Archives a non-default sandbox and frees its original name for reuse. A sandbox whose reset stopped after deletion started can be archived; its previous and new data are then deleted in the background.
Path parameters
sandbox_idstringRequiredFlint sandbox ID. Must be a valid ID with prefix test_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
curl -X DELETE https://api.withflintpay.com/v1/sandboxes/test_01KEZF7C00JC77HTMTB2XHNPE0 \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Reset sandbox#
/v1/sandboxes/{sandbox_id}/resetIdempotentRequires scope developer.sandboxes.write
Rate limit: sensitive_write
Deletes a sandbox's data and keeps its identity and connections. The default sandbox can be reset too. A test credential (API key, CLI login, or workload token) with `developer.sandboxes.write` can reset only the sandbox it is bound to; any other `sandbox_id` gets 404 `RESOURCE_NOT_FOUND`, and the credential keeps working after the reset. The sandbox keeps its `sandbox_id`, name, and `is_default`; every credential bound to it, including API keys, workload identities, CLI logins, and connected app installs; its webhook endpoints with their secrets and API versions; its test payment account and readiness; its payment method, checkout, and custom domains; and its processing fee assignments. Everything else is deleted: catalog, customers, orders, payments, invoices, subscriptions, test clocks, settings, locations, risk lists, request logs, events, deliveries, and idempotency keys. Returns the same sandbox with `status` `active` and a new `updated_at`. Requests that start while the reset runs get 409 `OPERATION_IN_PROGRESS` with reason `sandbox_resetting`; retry them after Retry-After. A second reset while one is running gets 409 `OPERATION_IN_PROGRESS`. Failed resets retry with delays of 1, 2, 4, 8, 16, 32, and 60 minutes, with at most eight attempts. Each attempt counts when it starts, including interrupted attempts. `reset_failed_at` records when a reset stops. If deletion has not started, the sandbox keeps its previous data and accepts requests again. If deletion has started, requests get 409 `ACTION_NOT_ALLOWED` with reason `sandbox_reset_failed`, without Retry-After. Reset it again to resume, or archive a non-default sandbox. A successful reset clears `reset_failed_at`. Requests already running when the reset started finish against the old data, and their results don't survive the reset. A retry with the same Idempotency-Key returns the recorded response; a new key resets again. Each sandbox allows one reset every 10 seconds and 500 resets per UTC day, shared by every credential that can reset it; past either limit the request gets 429 `RATE_LIMIT_EXCEEDED` with Retry-After, and a same-key retry doesn't count again. See the [sandboxes guide](/docs/guides/sandboxes#reset-a-sandbox).
Path parameters
sandbox_idstringRequiredFlint sandbox ID. Must be a valid ID with prefix test_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
curl -X POST https://api.withflintpay.com/v1/sandboxes/test_01KEZF7C00JC77HTMTB2XHNPE0/reset \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Was this helpful?