# INTERNAL_COMGATE_PRODUCTION_NOT_ENABLED: Comgate merchant is configured for production but only test mode is enabled on the gateway side.

- Category: Platform
- HTTP status: 503
- Reference: https://docs.bizkithub.com/en/errors/INTERNAL_COMGATE_PRODUCTION_NOT_ENABLED

## What happened

BizKitHub holds the Comgate gateway instance with environment="p" (production), but a pre-flight probe against the Comgate API returned error code 1308 ("Production environment is not enabled for you, it is enabled testing environment only"). Forwarding a customer to the gateway in this state would produce a broken payment page for every order. The platform refuses to create the payment until the misconfiguration is fixed.

## How to resolve

1. Open the Comgate client portal and activate production mode for the affected merchant id.
2. Or, until production is activated, change the gateway environment in BizKitHub admin (Payment gateways) from "p" to "t" so the customer is routed to the Comgate test environment.
3. Verify that the BizKitHub merchant id and secret in the gateway instance match the Comgate portal exactly — a stale or swapped credential triggers the same code.

## Example response

```json
{
  "state": "error",
  "code": 503,
  "message": "Comgate merchant is configured for production but only test mode is enabled on the gateway side.",
  "errorCode": "INTERNAL_COMGATE_PRODUCTION_NOT_ENABLED",
  "hint": "BizKitHub holds the Comgate gateway instance with environment=\"p\" (production), but a pre-flight probe against the Comgate API returned error code 1308 (\"Production environment is not enabled for you, it is enabled testing environment only\"). Forwarding a customer to the gateway in this state would produce a broken payment page for every order. The platform refuses to create the payment until the misconfiguration is fixed.",
  "documentationUrl": "https://docs.bizkithub.com/errors/INTERNAL_COMGATE_PRODUCTION_NOT_ENABLED"
}
```
