# Upsert Receipt Configuration

Create or update the per-merchant receipt configuration.

Endpoint: PUT /config
Version: 1.0.0
Security: OAuth2

## Security:

  - `OAuth2` (unknown)
    oauth2

## Request fields (application/json):

  - `entityId` (integer, required)
    Merchant/tenant identifier for tenant isolation

  - `enabled` (boolean, required)
    Whether receipt generation is enabled for this merchant

  - `defaultCurrency` (string, required)
    ISO 4217 currency code
    Example: USD

  - `branding` (object)

  - `branding.logoUrl` (string)
    Merchant logo URL displayed on receipts

  - `branding.primaryColor` (string)
    Primary brand color hex code
    Example: #003366

  - `branding.merchantName` (string)
    Merchant display name on receipts

  - `branding.receiptTemplateId` (string)
    Active template ID for receipt rendering. References a template
from the /templates endpoint. If omitted, the system default
template (standard) is used.

  - `branding.emailTemplateId` (string)
    Active template ID for receipt notification emails. References
a template from the /templates endpoint. If omitted, the system
default email template is used.

  - `receiptNumberFormat` (string)
    Receipt number format with placeholders:
{YEAR} - 4-digit year, {MONTH} - 2-digit month,
{SEQ} - sequential number, {PREFIX} - merchant prefix
    Example: RCP-{YEAR}{MONTH}-{SEQ}

  - `receiptNumberPrefix` (string)
    Merchant-specific prefix for receipt numbers
    Example: RCP

  - `minDigits` (integer)
    Minimum digits for the sequential number (zero-padded)

  - `autoSendOnPayment` (boolean)
    Automatically send receipt after successful payment

  - `defaultSendChannels` (array)
    Default channels for sending receipts

## Response 200:

  - `200` (unknown)
    Configuration saved successfully

## Response 200 fields (application/json):

  - `responseCode` (string, required)
    Example: A100

  - `responseMessage` (string, required)
    Example: Approved

  - `responseDetails` (null, required)

  - `object` (object, required)

  - `object.id` (string)

  - `object.entityId` (integer)
    Merchant/tenant identifier for tenant isolation

  - `object.enabled` (boolean)

  - `object.defaultCurrency` (string, required)
    ISO 4217 currency code
    Example: USD

  - `object.branding` (object)

  - `object.branding.logoUrl` (string)

  - `object.branding.primaryColor` (string)

  - `object.branding.merchantName` (string)

  - `object.branding.receiptTemplateId` (string)
    Active template for receipt rendering

  - `object.branding.emailTemplateId` (string)
    Active template for receipt notification emails

  - `object.receiptNumberFormat` (string)

  - `object.receiptNumberPrefix` (string)

  - `object.minDigits` (integer)

  - `object.autoSendOnPayment` (boolean)

  - `object.defaultSendChannels` (array)

  - `object.createdAt` (string)

  - `object.updatedAt` (string)

