{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/payments-ai/json-schema/payments-ai-public-api-create-own-merchant-request-schema.json",
  "title": "PublicApiCreateOwnMerchantRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/payments-ai-public-api-api-openapi.yml#/components/schemas/PublicApiCreateOwnMerchantRequest",
  "type": "object",
  "required": [
    "name"
  ],
  "properties": {
    "name": {
      "type": "string",
      "maxLength": 145,
      "description": "Business name displayed to customers. `'s Merchant` is appended when stored. Capped at 145 so the provider company title fits."
    },
    "email": {
      "type": "string",
      "format": "email",
      "description": "Optional merchant contact email. Defaults to the signed-in user's email; 400 `invalid_request` when omitted and the user has no email on file. The signed-in user becomes Owner whatever this value is."
    },
    "phone": {
      "type": "string",
      "pattern": "^\\+[1-9]\\d{1,14}$",
      "description": "Optional E.164 phone. The identity-verification link is sent to it by SMS after go-live; if omitted, the merchant provides it during KYC."
    },
    "merchantId": {
      "type": "string",
      "description": "Optional client-supplied UUID v7 retry key. Re-submitting the same id with the same details returns the original merchant with `created: false`; the same id with different details returns 409. Without it, a user who already owns a merchant on this environment gets that merchant back with `created: false`."
    }
  }
}