> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quentli.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Filtro de solicitudes de pago

> Campos y operadores disponibles para filtrar solicitudes de pago.

export const ListFilterBuilder = ({filterType, showFilterGuide = true} = {}) => {
  const operatorLabels = {
    contains: 'Contiene',
    endsWith: 'Termina con',
    equals: 'Es igual a',
    gt: 'Es posterior a',
    gte: 'Es igual o posterior a',
    in: 'Es uno de',
    lt: 'Es anterior a',
    lte: 'Es igual o anterior a',
    not: 'No es',
    notIn: 'No es uno de',
    search: 'Busca',
    startsWith: 'Empieza con'
  };
  const ChevronDown = () => <svg aria-hidden="true" className="right-2 h-4 w-4 text-zinc-950/50 dark:text-white/50 top-2.5 pointer-events-none absolute" fill="none" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" viewBox="0 0 24 24">
  <path d="m6 9 6 6 6-6" />
</svg>;
  const [filterId, setFilterId] = useState(filterType ?? listFilterBuilderOptions[0].id);
  const selectedFilter = listFilterBuilderOptions.find(filter => filter.id === filterId) ?? listFilterBuilderOptions[0];
  const fields = selectedFilter.fields;
  const operatorsFor = field => {
    const operators = field.operators.map(operator => [operator, operatorLabels[operator] ?? operator]);
    if (field.type === 'scalar' && field.nullable && field.operators.includes('equals')) {
      operators.unshift(['isNull', 'No tiene valor']);
    }
    return operators;
  };
  const createRule = field => ({
    field: field.key,
    operator: operatorsFor(field)[0]?.[0] ?? '',
    value: ''
  });
  const [logic, setLogic] = useState('AND');
  const [rules, setRules] = useState([createRule(fields[0])]);
  const [advancedFilter, setAdvancedFilter] = useState('');
  const [filterInputMode, setFilterInputMode] = useState('visual');
  const [copied, setCopied] = useState(false);
  const selectFilter = id => {
    const nextFilter = listFilterBuilderOptions.find(filter => filter.id === id) ?? listFilterBuilderOptions[0];
    setFilterId(nextFilter.id);
    setLogic('AND');
    setRules([createRule(nextFilter.fields[0])]);
    setAdvancedFilter('');
    setFilterInputMode('visual');
    setCopied(false);
  };
  const updateRule = (index, property, value) => {
    setRules(current => current.map((rule, ruleIndex) => {
      if (ruleIndex !== index) return rule;
      if (property !== 'field') return {
        ...rule,
        [property]: value
      };
      const field = fields.find(candidate => candidate.key === value);
      return createRule(field);
    }));
  };
  const addRule = () => setRules(current => [...current, createRule(fields[0])]);
  const removeRule = index => setRules(current => current.filter((rule, ruleIndex) => ruleIndex !== index));
  const filterRules = rules.map(rule => {
    const field = fields.find(candidate => candidate.key === rule.field);
    if (rule.operator === 'isNull') return {
      [field.key]: {
        equals: null
      }
    };
    if (!rule.value) return null;
    const value = field.type === 'boolean' ? rule.value === 'true' : rule.value.trim();
    if (field.type !== 'boolean' && !value) return null;
    if (rule.operator === 'in' || rule.operator === 'notIn') {
      const values = rule.value.split(',').map(value => value.trim()).filter(Boolean);
      return values.length ? {
        [field.key]: {
          [rule.operator]: values
        }
      } : null;
    }
    return rule.operator ? {
      [field.key]: {
        [rule.operator]: value
      }
    } : {
      [field.key]: value
    };
  }).filter(Boolean);
  let visualFilter;
  if (filterRules.length === 1) {
    visualFilter = filterRules[0];
  } else if (filterRules.length > 1) {
    visualFilter = selectedFilter.allowsLogicalGroups ? {
      [logic]: filterRules
    } : Object.assign({}, ...filterRules);
  }
  let filter;
  let advancedFilterError = '';
  if (filterInputMode === 'json') {
    if (advancedFilter.trim()) {
      try {
        const parsedFilter = JSON.parse(advancedFilter);
        if (!parsedFilter || typeof parsedFilter !== 'object' || Array.isArray(parsedFilter)) {
          advancedFilterError = 'El filtro avanzado debe ser un objeto JSON.';
        } else {
          filter = parsedFilter;
        }
      } catch {
        advancedFilterError = 'El filtro avanzado debe ser JSON válido.';
      }
    }
  } else {
    filter = visualFilter;
  }
  const appendQueryParameter = (parts, key, value) => {
    if (value === null) {
      parts.push(key);
    } else if (Array.isArray(value)) {
      value.forEach((item, index) => appendQueryParameter(parts, `${key}[${index}]`, item));
    } else if (typeof value === 'object') {
      Object.entries(value).forEach(([childKey, childValue]) => {
        appendQueryParameter(parts, `${key}[${childKey}]`, childValue);
      });
    } else {
      parts.push(`${key}=${encodeURIComponent(String(value))}`);
    }
  };
  const parts = [];
  if (filter) appendQueryParameter(parts, 'filter', filter);
  const query = parts.join('&');
  const request = `GET ${selectedFilter.path}${query ? `?${query}` : ''}`;
  const selectFilterInputMode = mode => {
    if (mode === 'json' && filterInputMode === 'visual') {
      setAdvancedFilter(JSON.stringify(visualFilter ?? ({}), null, 2));
    }
    setFilterInputMode(mode);
    setCopied(false);
  };
  const copyQuery = async () => {
    if (!query) return;
    try {
      await navigator.clipboard.writeText(query);
      setCopied(true);
      window.setTimeout(() => setCopied(false), 2000);
    } catch {
      setCopied(false);
    }
  };
  return <div className="not-prose my-6 rounded-lg border border-zinc-950/15 p-4 dark:border-white/15">
    <div className="flex flex-wrap items-end justify-between gap-3">
      <div className="flex flex-wrap items-end gap-3">
        {filterType ? <p className="pb-1 text-sm text-zinc-950/65 dark:text-white/65">
            <code>GET {selectedFilter.path}</code>
          </p> : <label className="min-w-56 text-xs font-medium text-zinc-950/70 dark:text-white/70">
            Recurso
            <span className="relative mt-1 block">
              <select value={selectedFilter.id} onChange={event => selectFilter(event.target.value)} className="block w-full appearance-none rounded-md border border-zinc-950/20 bg-white px-2 py-1.5 pr-8 text-sm text-zinc-950 focus:border-[#4854bb] focus:outline-none focus:ring-2 focus:ring-[#4854bb]/20 dark:border-white/20 dark:bg-zinc-900 dark:text-white">
                {listFilterBuilderOptions.map(filter => <option key={filter.id} value={filter.id}>{filter.label}</option>)}
              </select>
              <ChevronDown />
            </span>
          </label>}
      </div>
      <div className="flex w-40 rounded-lg border border-zinc-950/15 p-0.5 dark:border-white/15" role="group" aria-label="Modo de filtro">
        <button type="button" onClick={() => selectFilterInputMode('visual')} aria-pressed={filterInputMode === 'visual'} className="flex-1 rounded-md px-3 py-1 text-sm font-medium text-zinc-950/65 hover:bg-zinc-950/5 focus:outline-none focus:ring-2 focus:ring-[#4854bb]/20 dark:text-white/65 dark:hover:bg-white/10" style={filterInputMode === 'visual' ? {
    backgroundColor: '#4854bb',
    color: 'white'
  } : undefined}>
          Visual
        </button>
        <button type="button" onClick={() => selectFilterInputMode('json')} aria-pressed={filterInputMode === 'json'} className="flex-1 rounded-md px-3 py-1 text-sm font-medium text-zinc-950/65 hover:bg-zinc-950/5 focus:outline-none focus:ring-2 focus:ring-[#4854bb]/20 dark:text-white/65 dark:hover:bg-white/10" style={filterInputMode === 'json' ? {
    backgroundColor: '#4854bb',
    color: 'white'
  } : undefined}>
          JSON
        </button>
      </div>
    </div>

    {filterInputMode === 'visual' ? <>
        <div className="mt-4">
          {rules.map((rule, index) => {
    const field = fields.find(candidate => candidate.key === rule.field);
    const operators = operatorsFor(field);
    const acceptsList = rule.operator === 'in' || rule.operator === 'notIn';
    const selectsEnum = field.type === 'enum' && !acceptsList && rule.operator !== 'isNull';
    return <div key={index} className={index ? 'mt-4 flex flex-wrap items-end gap-2 border-t border-zinc-950/10 pt-4 dark:border-white/10' : 'flex flex-wrap items-end gap-2'}>
                <label className="min-w-36 flex-1 text-xs font-medium text-zinc-950/70 dark:text-white/70">
                  Campo
                  <span className="relative mt-1 block">
                    <select value={rule.field} onChange={event => updateRule(index, 'field', event.target.value)} className="block w-full appearance-none rounded-md border border-zinc-950/20 bg-white px-2 py-1.5 pr-8 text-sm text-zinc-950 focus:border-[#4854bb] focus:outline-none focus:ring-2 focus:ring-[#4854bb]/20 dark:border-white/20 dark:bg-zinc-950 dark:text-white">
                      {fields.map(option => <option key={option.key} value={option.key}>{option.key}</option>)}
                    </select>
                    <ChevronDown />
                  </span>
                </label>

                {field.type !== 'boolean' && field.operators.length > 0 && <label className="min-w-36 flex-1 text-xs font-medium text-zinc-950/70 dark:text-white/70">
                    Operador
                    <span className="relative mt-1 block">
                      <select value={rule.operator} onChange={event => updateRule(index, 'operator', event.target.value)} className="block w-full appearance-none rounded-md border border-zinc-950/20 bg-white px-2 py-1.5 pr-8 text-sm text-zinc-950 focus:border-[#4854bb] focus:outline-none focus:ring-2 focus:ring-[#4854bb]/20 dark:border-white/20 dark:bg-zinc-950 dark:text-white">
                        {operators.map(([value, label]) => <option key={value} value={value}>{label}</option>)}
                      </select>
                      <ChevronDown />
                    </span>
                  </label>}

                {field.type === 'boolean' ? <label className="min-w-36 flex-1 text-xs font-medium text-zinc-950/70 dark:text-white/70">
                    Valor
                    <span className="relative mt-1 block">
                      <select value={rule.value} onChange={event => updateRule(index, 'value', event.target.value)} className="block w-full appearance-none rounded-md border border-zinc-950/20 bg-white px-2 py-1.5 pr-8 text-sm text-zinc-950 focus:border-[#4854bb] focus:outline-none focus:ring-2 focus:ring-[#4854bb]/20 dark:border-white/20 dark:bg-zinc-950 dark:text-white">
                        <option value="">Elige un valor</option>
                        <option value="true">Sí</option>
                        <option value="false">No</option>
                      </select>
                      <ChevronDown />
                    </span>
                  </label> : rule.operator === 'isNull' ? <p className="min-w-36 flex-1 pb-2 text-sm text-zinc-950/60 dark:text-white/60">No se necesita un valor.</p> : selectsEnum ? <label className="min-w-36 flex-1 text-xs font-medium text-zinc-950/70 dark:text-white/70">
                    Valor
                    <span className="relative mt-1 block">
                      <select value={rule.value} onChange={event => updateRule(index, 'value', event.target.value)} className="block w-full appearance-none rounded-md border border-zinc-950/20 bg-white px-2 py-1.5 pr-8 text-sm text-zinc-950 focus:border-[#4854bb] focus:outline-none focus:ring-2 focus:ring-[#4854bb]/20 dark:border-white/20 dark:bg-zinc-950 dark:text-white">
                        <option value="">Elige un valor</option>
                        {field.values.map(value => <option key={value} value={value}>{value}</option>)}
                      </select>
                      <ChevronDown />
                    </span>
                  </label> : <label className="min-w-36 flex-1 text-xs font-medium text-zinc-950/70 dark:text-white/70">
                    {acceptsList ? 'Valores separados por coma' : 'Valor'}
                    <input type="text" value={rule.value} onChange={event => updateRule(index, 'value', event.target.value)} placeholder={field.dateTime ? '2026-01-01T00:00:00.000Z' : acceptsList ? 'VIP, Prioridad' : 'Escribe un valor'} className="mt-1 block w-full rounded-md border border-zinc-950/20 bg-white px-2 py-1.5 text-sm text-zinc-950 focus:border-[#4854bb] focus:outline-none focus:ring-2 focus:ring-[#4854bb]/20 dark:border-white/20 dark:bg-zinc-950 dark:text-white" />
                  </label>}

                <button type="button" onClick={() => removeRule(index)} disabled={rules.length === 1} className="shrink-0 rounded-md px-2 py-1.5 text-sm text-zinc-950/70 hover:bg-zinc-950/5 disabled:cursor-not-allowed disabled:opacity-40 dark:text-white/70 dark:hover:bg-white/10" aria-label="Eliminar condición">
                  Eliminar
                </button>
              </div>;
  })}
        </div>

        <div className="mt-4 flex flex-wrap items-center gap-3 border-t border-zinc-950/10 pt-4 dark:border-white/10">
          <button type="button" onClick={addRule} className="rounded-md border border-[#4854bb]/35 px-3 py-1.5 text-sm font-medium text-[#4854bb] hover:bg-[#4854bb]/10 dark:border-[#4854bb]/70 dark:text-[#8f98ed] dark:hover:bg-[#4854bb]/20">
            Agregar condición
          </button>
          {rules.length > 1 && selectedFilter.allowsLogicalGroups ? <label className="flex items-center gap-2 text-xs font-medium text-zinc-950/70 dark:text-white/70">
              Combinar con
              <span className="relative inline-block">
                <select value={logic} onChange={event => setLogic(event.target.value)} className="appearance-none rounded-md border border-zinc-950/20 bg-white px-2 py-1.5 pr-8 text-sm text-zinc-950 focus:border-[#4854bb] focus:outline-none focus:ring-2 focus:ring-[#4854bb]/20 dark:border-white/20 dark:bg-zinc-900 dark:text-white">
                  <option value="AND">AND</option>
                  <option value="OR">OR</option>
                </select>
                <ChevronDown />
              </span>
            </label> : null}
          {!selectedFilter.allowsLogicalGroups && rules.length > 1 ? <p className="text-sm text-zinc-950/60 dark:text-white/60">
              Las condiciones se envían al nivel raíz.
            </p> : null}
        </div>
      </> : <div className="mt-4">
        <label className="block text-xs font-medium text-zinc-950/70 dark:text-white/70">
          Filtro en JSON
          <textarea value={advancedFilter} onChange={event => setAdvancedFilter(event.target.value)} placeholder={'{\n  "tags": { "some": { "name": { "equals": "VIP" } } }\n}'} rows={6} className="mt-1 block w-full rounded-md border border-zinc-950/20 bg-white px-3 py-2 font-mono text-xs text-zinc-950 focus:border-[#4854bb] focus:outline-none focus:ring-2 focus:ring-[#4854bb]/20 dark:border-white/20 dark:bg-zinc-950 dark:text-white" />
        </label>
        <p className="mt-2 text-sm text-zinc-950/60 dark:text-white/60">
          Usa JSON para relaciones, arreglos, metadatos o grupos anidados.
        </p>
        {advancedFilterError ? <p className="mt-2 text-sm text-red-700 dark:text-red-300">{advancedFilterError}</p> : null}
      </div>}

    <div className="mt-4 flex flex-col gap-2 sm:flex-row sm:items-stretch">
      <pre className="min-w-0 flex-1 overflow-x-auto rounded-lg bg-zinc-950 p-3 text-xs text-zinc-50 dark:bg-black"><code>{request}</code></pre>
      <button type="button" onClick={copyQuery} disabled={!query} className="flex shrink-0 items-center justify-center rounded-md bg-[#4854bb] px-3 py-1.5 text-sm font-medium text-white hover:bg-[#3d47a1] disabled:cursor-not-allowed disabled:opacity-40">
        {copied ? 'Copiado' : 'Copiar query'}
      </button>
    </div>
    <span aria-live="polite" className="mt-1 block text-sm text-zinc-950/60 dark:text-white/60">
      {copied ? 'Pega el query en el playground del endpoint.' : ''}
    </span>
    {filterType && showFilterGuide ? <p className="mt-3 text-sm text-zinc-950/60 dark:text-white/60">
        Para relaciones, grupos lógicos y más ejemplos, consulta la <a href="/api/filtros" className="font-medium text-[#4854bb] hover:underline dark:text-[#8f98ed]">guía de filtros</a>.
      </p> : null}

  </div>;
};

export const listFilterBuilderOptions = [{
  "allowsLogicalGroups": true,
  "id": "CustomerFilter",
  "label": "Clientes",
  "path": "/v1/customers",
  "fields": [{
    "key": "id",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "createdAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "updatedAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "name",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "archivedAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": true,
    "dateTime": true
  }, {
    "key": "email",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "phoneNumber",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "secondaryPhoneNumber",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "username",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "noPayments",
    "type": "boolean",
    "operators": []
  }, {
    "key": "hasTaxProfiles",
    "type": "boolean",
    "operators": []
  }]
}, {
  "allowsLogicalGroups": true,
  "id": "ConceptFilter",
  "label": "Conceptos de pago",
  "path": "/v1/payment-concepts",
  "fields": [{
    "key": "term",
    "type": "scalar",
    "operators": [],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "id",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "createdAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "updatedAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "displayName",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "sku",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "description",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "active",
    "type": "boolean",
    "operators": ["equals"]
  }, {
    "key": "amount",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "archivedAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": true,
    "dateTime": true
  }, {
    "key": "archivedById",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "recurrentDetailId",
    "type": "scalar",
    "operators": ["in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "groupId",
    "type": "scalar",
    "operators": ["in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }]
}, {
  "allowsLogicalGroups": true,
  "id": "DiscountFilter",
  "label": "Descuentos",
  "path": "/v1/discounts",
  "fields": [{
    "key": "id",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "createdAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "updatedAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "deletedAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": true,
    "dateTime": true
  }, {
    "key": "name",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "description",
    "type": "scalar",
    "operators": ["in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "type",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "amountOff",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "percentageOff",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "active",
    "type": "boolean",
    "operators": ["equals"]
  }, {
    "key": "oneOff",
    "type": "boolean",
    "operators": ["equals"]
  }, {
    "key": "expiresAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": true,
    "dateTime": true
  }]
}, {
  "allowsLogicalGroups": true,
  "id": "InvoiceFilter",
  "label": "Solicitudes de pago",
  "path": "/v1/invoices",
  "fields": [{
    "key": "id",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "isPaid",
    "type": "boolean",
    "operators": []
  }, {
    "key": "canceledAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": true,
    "dateTime": true
  }, {
    "key": "canceledById",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "createdAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "updatedAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "totalAmount",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "dueDate",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "expireDate",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": true,
    "dateTime": true
  }, {
    "key": "subscriptionId",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "customerId",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "refundedAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": true,
    "dateTime": true
  }, {
    "key": "refundedById",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "collectionMethod",
    "type": "enum",
    "operators": [],
    "values": ["AUTOMATIC", "SEND_REMINDER", "NONE"]
  }]
}, {
  "allowsLogicalGroups": true,
  "id": "TaxInvoiceFilter",
  "label": "Facturas fiscales",
  "path": "/v1/tax-invoices",
  "fields": [{
    "key": "id",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "createdAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "updatedAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "issueDate",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "customerId",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "taxId",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "isPublicInvoice",
    "type": "boolean",
    "operators": []
  }, {
    "key": "folio",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "canceledAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "canceledById",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "uuid",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "status",
    "type": "enum",
    "operators": [],
    "values": ["VALID", "CANCELED", "PENDING", "DRAFT", "PENDING_CANCELLATION", "FAILED"]
  }, {
    "key": "cancellationStatus",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "usage",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "paymentMethod",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "paymentForm",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "type",
    "type": "enum",
    "operators": [],
    "values": ["TAX_RECEIPT", "TAX_INVOICE_PPD", "TAX_INVOICE_PUE"]
  }]
}, {
  "allowsLogicalGroups": true,
  "id": "SubscriptionFilter",
  "label": "Suscripciones",
  "path": "/v1/subscriptions",
  "fields": [{
    "key": "id",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "createdAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "updatedAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "description",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "customerId",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "collectionMethod",
    "type": "enum",
    "operators": [],
    "values": ["AUTOMATIC", "SEND_REMINDER", "NONE"]
  }, {
    "key": "paymentMethodId",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "nextCollectionDate",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": true,
    "dateTime": true
  }, {
    "key": "firstCollectionDate",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "lastCollectionDate",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": true,
    "dateTime": true
  }, {
    "key": "generationMode",
    "type": "enum",
    "operators": [],
    "values": ["MANUAL", "AUTO"]
  }, {
    "key": "onlyAutomaticCollection",
    "type": "boolean",
    "operators": ["equals"]
  }, {
    "key": "isActive",
    "type": "boolean",
    "operators": ["equals"]
  }, {
    "key": "isCompleted",
    "type": "boolean",
    "operators": ["equals"]
  }, {
    "key": "status",
    "type": "enum",
    "operators": [],
    "values": ["INACTIVE", "ACTIVE", "CANCELED", "COMPLETED"]
  }, {
    "key": "customCancelReason",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }]
}, {
  "allowsLogicalGroups": true,
  "id": "PaymentFilter",
  "label": "Pagos",
  "path": "/v1/payments",
  "fields": [{
    "key": "id",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "createdAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "updatedAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "amount",
    "type": "scalar",
    "operators": [],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "status",
    "type": "enum",
    "operators": ["equals", "not", "in", "notIn"],
    "values": ["INCOMPLETE", "COMPLETE", "CANCELED", "INITIATED", "REFUNDED", "DISPUTED", "REVERTED"]
  }, {
    "key": "isCompleted",
    "type": "boolean",
    "operators": []
  }, {
    "key": "skipTaxInvoice",
    "type": "boolean",
    "operators": []
  }, {
    "key": "paymentTime",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "type",
    "type": "enum",
    "operators": ["equals", "not", "in", "notIn"],
    "values": ["TRANSFER", "CARD", "OXXO", "OTHER", "CASH", "DIRECT_DEBIT"]
  }, {
    "key": "processor",
    "type": "enum",
    "operators": ["equals", "not", "in", "notIn"],
    "values": ["FISERV", "KUSHKI", "QUENTLI", "SANTANDER", "STRIPE", "TAPI"]
  }, {
    "key": "payoutId",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "customerId",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "authorizationCode",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "hasRelatedInvoice",
    "type": "boolean",
    "operators": []
  }, {
    "key": "paymentConceptId",
    "type": "scalar",
    "operators": [],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "paymentConceptGroupIds",
    "type": "scalar",
    "operators": [],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "origin",
    "type": "enum",
    "operators": ["equals", "in", "notIn"],
    "values": ["INVOICE", "LISTING", "API"]
  }]
}, {
  "allowsLogicalGroups": false,
  "id": "WebhookFilter",
  "label": "Webhooks",
  "path": "/v1/webhooks",
  "fields": [{
    "key": "id",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "url",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "status",
    "type": "enum",
    "operators": [],
    "values": ["ENABLED", "DISABLED", "BROKEN", "DELETED"]
  }, {
    "key": "createdAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "updatedAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }]
}, {
  "allowsLogicalGroups": true,
  "id": "WebhookEventFilter",
  "label": "Eventos de webhook",
  "path": "/v1/webhook-events",
  "fields": [{
    "key": "id",
    "type": "scalar",
    "operators": ["equals", "in", "notIn", "lt", "lte", "gt", "gte", "contains", "startsWith", "endsWith", "search"],
    "nullable": false,
    "dateTime": false
  }, {
    "key": "type",
    "type": "enum",
    "operators": ["equals", "not", "in", "notIn"],
    "values": ["TAX_INVOICE_CREATED", "INVOICE_CREATED", "INVOICE_CANCELED", "INVOICE_PAID", "INVOICE_PAID_OTHER", "INVOICE_UPDATED", "PAYMENT_COMPLETED", "PAYMENT_REFUNDED", "PAYMENT_ATTEMPT_FAILED", "PAYMENT_ATTEMPT_SUCCEEDED", "DISPUTE_CREATED", "DISPUTE_RESPONSE_CREATED", "DISPUTE_RESOLVED", "CUSTOMER_CREATED", "CUSTOMER_UPDATED", "CUSTOMER_ARCHIVED", "SUBSCRIPTION_CREATED", "SUBSCRIPTION_UPDATED", "SUBSCRIPTION_CANCELED", "PAYMENT_METHOD_CREATED"]
  }, {
    "key": "status",
    "type": "enum",
    "operators": ["equals", "not", "in", "notIn"],
    "values": ["PENDING", "SUCCESSFUL", "RETRYING", "FAILED"]
  }, {
    "key": "createdAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }, {
    "key": "updatedAt",
    "type": "scalar",
    "operators": ["equals", "lt", "lte", "gt", "gte"],
    "nullable": false,
    "dateTime": true
  }]
}];

<ListFilterBuilder filterType="InvoiceFilter" />


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.