---
title: "Dev-only: revert a merchant back to sandbox mode and re-flag every one of its payment_requests as test. Refused in production. Idempotent."
method: POST
path: "/api/v1/admin/dev/merchants/{merchantId}/revert-to-sandbox"
tags: ["Merchants", "Admin", "Dev"]
---

# Dev-only: revert a merchant back to sandbox mode and re-flag every one of its payment_requests as test. Refused in production. Idempotent.

`POST /api/v1/admin/dev/merchants/{merchantId}/revert-to-sandbox`

Dev-only: revert a merchant back to sandbox mode and re-flag every one of its payment_requests as test. Refused in production. Idempotent.

## Path parameters

- `merchantId` string, uuid, required

## Response `200`

Success

- DevMerchantModeFlipResponse
  - `success` boolean, required — Indicates if the request was successful
  - `data` object, required — Result of a dev-only `promote-to-live` / `revert-to-sandbox` operation: how many payment_request rows were re-flagged alongside the merchant itself.
    - `merchantId` string, uuid, required
    - `previousMode` union, required — Merchant operating mode
      - 'live'
      - 'sandbox'
    - `newMode` union, required — Merchant operating mode
      - 'live'
      - 'sandbox'
    - `paymentRequestsAffected` integer, required — Number of payment_request rows whose flags were updated

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/banqzinc/apis/quidkey-api.md) · [All operations](https://skmtc.net/banqzinc/apis/quidkey-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/banqzinc/quidkey-api/revisions/f86d2bdbcb08/schema)
