{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/foxnfe-com-br/json-schema/foxnfe-com-br-post-api-v1-billing-payment-methods-request-schema.json",
  "title": "post_api_v1_billing_payment_methodsRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": [
    "app/app/Modules/Billing/Http/Controllers/PaymentMethodController.php:46"
  ],
  "type": "object",
  "properties": {
    "gateway": {
      "x-laravel-rules": [
        "required"
      ],
      "x-laravel-custom-validation": true,
      "description": "Validação adicional de domínio é aplicada pelo servidor (por exemplo dígitos verificadores e autorização)."
    },
    "type": {
      "x-laravel-rules": [
        "required",
        "string",
        "in:card,pix,boleto"
      ],
      "type": "string",
      "enum": [
        "card",
        "pix",
        "boleto"
      ]
    },
    "external_id": {
      "x-laravel-rules": [
        "required",
        "string",
        "max:200"
      ],
      "type": "string",
      "maxLength": 200
    },
    "last_four": {
      "x-laravel-rules": [
        "nullable",
        "string",
        "size:4"
      ],
      "type": [
        "string",
        "null"
      ],
      "minLength": 4,
      "maxLength": 4
    },
    "brand": {
      "x-laravel-rules": [
        "nullable",
        "string",
        "max:30"
      ],
      "type": [
        "string",
        "null"
      ],
      "maxLength": 30
    },
    "is_default": {
      "x-laravel-rules": [
        "boolean"
      ],
      "type": "boolean"
    },
    "metadata": {
      "x-laravel-rules": [
        "nullable",
        "array"
      ],
      "type": [
        "array",
        "object",
        "null"
      ],
      "items": {},
      "additionalProperties": true
    }
  },
  "required": [
    "gateway",
    "type",
    "external_id"
  ]
}