---
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`

## Request

- Base URL: `https://core.quidkey.com`
- URL: `https://core.quidkey.com/api/v1/admin/dev/merchants/{merchantId}/revert-to-sandbox`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/banqzinc/apis/quidkey-api/docs/api/v1/admin/dev/merchants/:merchantId/revert-to-sandbox/post.ts> (a function with typed inputs; its response is checked against the schema)

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

## Changes

- **2026-06-17** `b372e7d5563d`: 1 info
  - endpoint added
- **2025-11-02** `919eb7a392aa`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/banqzinc/apis/quidkey-api/changes/api/v1/admin/dev/merchants/:merchantId/revert-to-sandbox/post.md)

---

[API](https://skmtc.dev/banqzinc/apis/quidkey-api.md) - [All operations](https://skmtc.dev/banqzinc/apis/quidkey-api/llms.txt) - [OpenAPI document](https://skmtc.dev/banqzinc/apis/quidkey-api/revisions/f86d2bdbcb08?raw)
