{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pluggy/json-schema/pluggy-payment-recipient-schema.json",
  "title": "PaymentRecipient",
  "description": "Bank-account payment recipient. Returned by `/payments/recipients` endpoints and embedded inside payment requests when the request targets a registered recipient.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pluggy-payment-recipient-api-openapi.yml#/components/schemas/PaymentRecipient",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "BANK_ACCOUNT"
      ],
      "description": "Recipient discriminator. Always `BANK_ACCOUNT` for this schema."
    },
    "id": {
      "type": "string",
      "description": "Primary identifier"
    },
    "taxNumber": {
      "type": "string",
      "description": "Account owner tax number. Can be CPF or CNPJ (only numbers)."
    },
    "name": {
      "type": "string",
      "description": "Account owner name."
    },
    "paymentInstitution": {
      "allOf": [
        {
          "$ref": "#/$defs/PaymentInstitution"
        }
      ],
      "description": "Institution that holds the recipient's bank account."
    },
    "isDefault": {
      "type": "boolean",
      "description": "Indicates if the recipient is the default one"
    },
    "account": {
      "$ref": "#/$defs/PaymentRecipientAccount"
    },
    "pixKey": {
      "type": [
        "string",
        "null"
      ],
      "description": "Pix key associated with the payment recipient"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Date when the payment recipient was created"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Date when the payment recipient was last updated"
    }
  },
  "type": "object",
  "required": [
    "type",
    "id",
    "name",
    "taxNumber",
    "paymentInstitution",
    "isDefault",
    "account",
    "createdAt",
    "updatedAt"
  ],
  "$defs": {
    "PaymentInstitution": {
      "description": "Response with information related to a payment institution",
      "properties": {
        "id": {
          "type": "string",
          "description": "Primary identifier"
        },
        "name": {
          "type": "string",
          "description": "Payment institution name"
        },
        "tradeName": {
          "type": "string",
          "description": "Payment institution trade name"
        },
        "ispb": {
          "type": "string",
          "description": "Payment institution ISPB"
        },
        "compe": {
          "type": "string",
          "description": "Payment institution COMPE"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "Date when the payment institution was created"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "Date when the payment institution was updated"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "ispb",
        "tradeName",
        "createdAt",
        "updatedAt"
      ]
    },
    "PaymentRecipientAccount": {
      "description": "Payment receiver bank account information",
      "properties": {
        "branch": {
          "type": "string",
          "description": "Receiver bank account branch (agency)"
        },
        "number": {
          "type": "string",
          "description": "Receiver bank account number"
        },
        "type": {
          "type": "string",
          "description": "Receiver bank account type, could be: 'CHECKING_ACCOUNT', 'SAVINGS_ACCOUNT' or 'GUARANTEED_ACCOUNT'"
        }
      },
      "type": "object",
      "required": [
        "branch",
        "number",
        "type"
      ]
    }
  }
}