{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pluggy/json-schema/pluggy-create-or-update-payment-customer-schema.json",
  "title": "CreateOrUpdatePaymentCustomer",
  "description": "Body to update a payment customer. All fields are optional.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pluggy-payment-customer-api-openapi.yml#/components/schemas/CreateOrUpdatePaymentCustomer",
  "properties": {
    "type": {
      "$ref": "#/$defs/PaymentCustomerType"
    },
    "name": {
      "type": "string",
      "description": "Customer name"
    },
    "email": {
      "type": "string",
      "description": "Customer email"
    },
    "cpf": {
      "type": "string",
      "description": "Customer CPF"
    },
    "cnpj": {
      "type": "string",
      "description": "Customer CNPJ, if type is `BUSINESS`"
    }
  },
  "type": "object",
  "$defs": {
    "PaymentCustomerType": {
      "type": "string",
      "enum": [
        "INDIVIDUAL",
        "BUSINESS"
      ],
      "description": "Customer type.\n- `INDIVIDUAL`: identified by `cpf`.\n- `BUSINESS`: identified by `cnpj`."
    }
  }
}