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

# MovingPay as a data source

> Bring data from MovingPay to your Lakehouse.

MovingPay is the back office platform used by sub-acquirers, payment facilitators, and marketplaces to run their payment operation. The connector extracts your transactions and their installments, the payment schedule of your merchants, anticipations, chargebacks, cancellations, and adjustments, along with the registry around them: merchants, sellers, bank accounts, devices, split rules, fee plans, acquirer agreements, card brands, acquirers, and MCC categories. With it you can analyze your sales volume, costs and margins, receivables, and settlements in your Lakehouse.

<Note>The connector reads the MovingPay API documented at [documentacao.movingpay.com.br](https://documentacao.movingpay.com.br/). MovingPay has no test environment, so the connector always reads your production data (read-only).</Note>

## Configuring MovingPay as a Source

In the [Sources](https://app.nekt.ai/sources) tab, click on the "Add source" button located on the top right of your screen. Then, select the MovingPay option from the list of connectors.

Click **Next** and you'll be prompted to add your access.

### 1. Add account access

The connector signs in with the e-mail and password of a MovingPay user of your company, the same credentials used to access the MovingPay console. If MovingPay issued an access token for your integration, you can use it instead.

<Tip>Create a MovingPay user dedicated to this integration. Its profile must be able to see the data of every stream you select. If it cannot see a stream, the run log names the stream: give the user access to it in MovingPay or deselect that stream.</Tip>

The following configurations are available:

* **Authentication Method**: choose **E-mail and password** (recommended) or **Access token issued by MovingPay**. Required.

* **E-mail** and **Password**: the credentials of the MovingPay user. Shown when the method is e-mail and password.

* **Access Token**: the token issued by MovingPay. Shown when the method is access token.

* **Customer ID**: the MovingPay code of your company. MovingPay asks for it on every request (in a `Customer` header) to know whose data to return. With e-mail and password the connector takes it from the sign-in, so fill it in only when the user has access to more than one company. With an access token it is required.

* **Start Date**: on the first sync, transactions, anticipations, and acquirer adjustments from this date on are extracted. Later syncs continue from where the previous one stopped. Required.

* **Lookback Days** (advanced): how many days before the last synced date are read again on every sync, so recent records whose status changed (for example, a sale cancelled a few days later) are updated. The default is 30.

* **Installments Lookback Days** (advanced): the installments of a sale are read for the sales of this many days before today, when the Transaction Installments stream is selected. The connector makes one request per sale, so a large value makes syncs much slower. The default is 2.

* **Payment Schedule Past Days** and **Payment Schedule Future Days** (advanced): the range of the payment schedule, in days before and after today. The defaults are 30 and 365.

* **Requests Per Minute** (advanced): how fast the connector may call MovingPay. The default is 300.

<Warning>MovingPay may only accept API sign-ins from IP addresses it has allowed. If so, the first sync fails with a message saying the sign-in was refused because of the IP address. Ask MovingPay support to allow Nekt's IP addresses for your company's API access (contact Nekt support for the list), then run the sync again. Doing this before the first sync avoids the failed run.</Warning>

Once you're done, click **Next**.

### 2. Select streams

Choose which data streams you want to sync. For faster extractions, select only the streams that are relevant to your analysis. You can select entire groups of streams or pick specific ones.

> Tip: The stream can be found more easily by typing its name.

Select the streams and click **Next**.

### 3. Configure data streams

Customize how you want your data to appear in your catalog. Select the desired layer where the data will be placed, a folder to organize it inside the layer, a name for each table (which will effectively contain the fetched data) and the type of sync.

* **Layer**: choose between the existing layers on your catalog. This is where you will find your new extracted tables as the extraction runs successfully.
* **Folder**: a folder can be created inside the selected layer to group all tables being created from this new data source.
* **Table name**: we suggest a name, but feel free to customize it. You have the option to add a **prefix** to all tables at once and make this process faster!
* **Sync Type**: Transactions, Transaction Installments, Anticipations, Chargebacks, Cancellations, and Acquirer Adjustments support INCREMENTAL. The other streams are FULL\_TABLE. Read more about Sync Types [here](https://docs.nekt.com/get-started/core-concepts/types-of-sync).

Once you are done configuring, click **Next**.

### 4. Configure data source

Describe your data source for easy identification within your organization, not exceeding 140 characters.

To define your [Trigger](https://docs.nekt.com/get-started/core-concepts/triggers), consider how often you want data to be extracted from this source. This decision usually depends on how frequently you need the new table data updated (every day, once a week, or only at specific times).

Optionally, you can define some additional settings:

* Configure Delta Log Retention and determine for how long we should store old states of this table as it gets updated. Read more about this resource [here](https://docs.nekt.com/get-started/core-concepts/resource-control).
* Determine when to execute an **Additional [Full Sync](https://docs.nekt.com/get-started/core-concepts/types-of-sync#additional-full-sync)**. This will complement the incremental data extractions, ensuring that your data is completely synchronized with your source every once in a while.

<Warning>Transaction Installments can't be fully synced: the connector only reads the installments of recent sales, so a full sync would replace the table with a few days of installments. If that stream is selected, a full sync stops with a message before anything is synced. So don't schedule an Additional Full Sync while Transaction Installments is selected: every one of those runs would fail. When you need a full sync, either deselect Transaction Installments for that run (its table keeps its data) and select it again afterwards, or run the full sync only for the other streams.</Warning>

Once you are ready, click **Next** to finalize the setup.

### 5. Check your new source

You can view your new source on the [Sources](https://app.nekt.ai/sources) page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.

<Warning>For you to be able to see it on your [Catalog](https://app.nekt.ai/catalog), you need at least one successful source run.</Warning>

# Streams and Fields

Below you'll find all available data streams from MovingPay and their corresponding fields. API reference: [MovingPay API](https://documentacao.movingpay.com.br/).

<Note>Timestamps are stored in UTC, the time zone MovingPay records them in. Amounts are in cents, as MovingPay returns them. Objects and lists (such as split rules) are stored as JSON text, and every table also has a `raw_payload` column with the whole record as MovingPay returned it.</Note>

<Note>A transaction's status can change after the sale (cancellation, chargeback). Each sync re-reads the last Lookback Days of sales to capture these changes; a sale older than that keeps the status it had when it was last read. For later events, use the Chargebacks and Cancellations streams, which are read in full on every sync, and the Payment Schedule for the payment status of receivables.</Note>

<AccordionGroup>
  <Accordion title="Merchants">
    Merchants (establishments) accredited by your company, with their fee plan, seller, anticipation settings, and status (`GET /estabelecimentos`).

    Table: `merchants` · Primary key: `codigo_cliente` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `codigo_cliente` | Integer | MovingPay code of the merchant (establishment). |
    | `referencia_externa` | String | External reference of the merchant (used for imports). |
    | `recipient_id` | String | Recipient identifier (UUID) of the merchant. |
    | `descricao` | String | Notes about the merchant. |
    | `razao_social` | String | Legal name of the merchant. |
    | `nome_fantasia` | String | Trade name of the merchant. |
    | `cpf_cnpj` | String | CPF or CNPJ (tax ID) of the merchant. |
    | `inscricao_estadual` | String | State registration number. |
    | `inscricao_fazenda` | String | Registration number at the finance secretariat. |
    | `tipo_empresa` | String | Type of company (the API documents 1 individual, 2 legal entity). |
    | `data_fundacao` | Datetime | Foundation date of the merchant. |
    | `contato_principal` | String | Main contact. |
    | `horario_funcionamento` | Integer | Business hours code. |
    | `localizado_shopping` | Integer | Whether the merchant is in a shopping mall (1 yes, 0 no). |
    | `faturamento_mensal` | Number | Declared monthly revenue. |
    | `bloquear_liquidacao` | Integer | Whether settlements to the merchant are blocked (1 yes, 0 no). |
    | `plano_id` | Integer | Identifier of the merchant's fee plan. |
    | `plano_nome` | String | Name of the merchant's fee plan. |
    | `unidade_negocio_id` | Integer | Identifier of the business unit. |
    | `unidade_negocio_nome` | String | Name of the business unit. |
    | `codigo_vendedor` | Integer | Identifier of the seller (distributor) linked to the merchant. |
    | `nome_vendedor` | String | Name of the seller (distributor) linked to the merchant. |
    | `url_ecommerce` | String | Website of the merchant. |
    | `transferencia_automatica` | Integer | Whether transfers to the merchant are automatic (1 yes, 0 no). |
    | `transferencia_valor_minimo` | Number | Minimum amount for an automatic transfer. |
    | `transferencia_periodicidade` | String | Frequency of the automatic transfers. |
    | `divisao_transferencia_entre_contas_bancarias` | Integer | Whether transfers are split between bank accounts (1 yes, 0 no). |
    | `antecipacao_recebiveis` | Integer | Whether receivables are anticipated automatically (1 yes, 0 no). |
    | `percentual_antecipacao` | Number | Percentage of the receivables anticipated. |
    | `tipo_antecipacao` | String | Type of automatic anticipation. |
    | `periodo_carencia` | Integer | Grace period before anticipation. |
    | `ordem_antecipacao` | String | State of the automatic anticipation (start, pause). |
    | `data_antecipacao` | Datetime | Date the automatic anticipation started. |
    | `antecipacao_app_ec` | Integer | Whether the merchant can anticipate in the merchant app (1 yes, 0 no). |
    | `antecipar_apos` | Integer | Days after the sale when receivables are anticipated. |
    | `juros_composto_antecipacao` | Integer | Whether anticipation uses compound interest (1 yes, 0 no). |
    | `data_inicio_vigor_juros_composto` | Datetime | When compound interest on anticipations took effect. |
    | `valor_patrimonio` | Number | Declared net worth. |
    | `sincronizar_edi` | String | Whether the merchant is synchronised through EDI files. |
    | `sincronizar_data` | Datetime | When the EDI synchronisation starts. |
    | `sincronizacao` | String | Key used to synchronise the merchant (for example cpf\_cnpj). |
    | `informe_registradora` | Integer | Whether the merchant is reported to the registrar (1 yes, 0 no). |
    | `analista_relacionamento` | String | Relationship analyst in charge of the merchant. |
    | `modelo_cobranca_chargeback` | String | How chargebacks are charged to the merchant. |
    | `modelo_cobranca_cancelamento` | String | How cancellations are charged to the merchant. |
    | `situacao` | Integer | Status of the merchant: 0 blocked, 1 released, 2 pending review, 3 pending documents, 4 unaccredited. |
    | `motivo_descredenciamento` | String | Reason the merchant was unaccredited. |
    | `data_descredenciamento` | Datetime | When the merchant was unaccredited (UTC). |
    | `created_at` | Datetime | When the record was created in MovingPay (UTC). |
    | `updated_at` | Datetime | When the record was last updated in MovingPay (UTC). |
    | `raw_payload` | String (JSON) | The whole record exactly as MovingPay returned it (JSON object), including fields that have no column of their own. |
  </Accordion>

  <Accordion title="Transactions">
    Card and payment transactions (`GET /transacoes`), with amounts, costs, card, capture, and status. Read by sale date: each sync reads the sales since the previous one and re-reads the lookback days before it, so recent sales that were cancelled or disputed are updated.

    Table: `transactions` · Primary key: `id` · Sync: Incremental on `start_date`

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the transaction. |
    | `original_id` | Integer | Identifier of the original transaction, when this one derives from it. |
    | `status` | String | Transaction status: APPR approved, DEVOL cancelled, DECL declined, REFD undone, PEDT pending, CONST disputed. As of the last time the sale was read (sales are re-read for the lookback days). |
    | `status_capture` | String | Status of the capture. |
    | `status_edi` | String | Status of the transaction in the acquirer's EDI files. |
    | `refuse_reason` | String | Reason given when the sale was refused. |
    | `acquirer_response_code` | String | Response code returned by the acquirer. |
    | `acquirer_name` | String | Name of the acquirer. |
    | `acquirer_id` | String | Code of the acquirer. |
    | `authorization_code` | String | Authorization code of the sale. |
    | `tef_nsu` | String | TEF NSU identifying the transaction. |
    | `nsu` | String | NSU identifying the transaction. |
    | `nsu_lancamento` | String | NSU of the financial entry of the sale. |
    | `uuid` | String | UUID of the transaction. |
    | `split_rules` | String | Split rules applied to the transaction (JSON array). |
    | `amount` | Number | Transaction amount (in cents). |
    | `authorized_amount` | Number | Amount authorized by the issuer (in cents). |
    | `amount_operation` | Number | Amount of the operation (in cents). |
    | `fee_operation` | Number | Fee charged on the operation (in cents). |
    | `refunded_amount` | Number | Amount refunded (in cents). |
    | `custo_mdr` | Number | MDR cost of the transaction (in cents). |
    | `custo_adquirente` | Number | Cost charged by the acquirer (in cents). |
    | `valor_interchange` | Number | Interchange fee (in cents). |
    | `valor_taxa_administracao` | Number | Administration fee (in cents). |
    | `installments` | Integer | Number of installments. |
    | `merchant_id` | Integer | MovingPay code of the merchant (establishment) that made the sale. |
    | `merchant_key` | String | Key of the merchant. |
    | `merchant_ref_externa` | String | External reference of the merchant. |
    | `merchant_name` | String | Name of the merchant. |
    | `merchant_document_number` | String | CPF or CNPJ (tax ID) of the merchant. |
    | `card_holder_name` | String | Name printed on the card. |
    | `card_first_digits` | String | First digits of the card number. |
    | `card_last_digits` | String | Last digits of the card number. |
    | `card_brand` | String | Card brand (VISA, ELO, ...). |
    | `card_pin_mode` | Integer | Card PIN entry mode. |
    | `payment_method` | String | Payment method: CHCK debit, CRDT credit, CRDT\_PARC installment credit. |
    | `capture_method` | String | How the transaction was captured (smart\_pos, pos, ecommerce, ...). |
    | `capture_partner` | String | Provider that captured the transaction (phoebus, ...). |
    | `device_serial_number` | String | Serial number of the device that captured the sale. |
    | `simcard_provider` | String | Carrier of the device's SIM card. |
    | `simcard_serial_number` | String | Serial number of the device's SIM card. |
    | `vl_comissao` | Number | Commission amount (in cents). |
    | `boleto_valor` | Number | Amount of the boleto, for boleto payments (in cents). |
    | `codigo_barras` | String | Barcode of the boleto, when there is one. |
    | `ecommerce` | String | E-commerce data of the transaction (JSON when it is an object). |
    | `conta_adquirente` | String | Acquirer account of the transaction. |
    | `codigo_transacao` | String | Transaction code at the capture provider. |
    | `nsu_sitef` | String | SiTef NSU of the transaction. |
    | `merchant_code_sitef` | String | SiTef code of the merchant. |
    | `pv` | String | Point-of-sale (PV) code at the acquirer. |
    | `logic_number` | String | Logical number of the capture terminal. |
    | `codigo_pedido` | String | Order code of the sale. |
    | `nsu_host` | String | Host NSU of the transaction. |
    | `valor_cancelado` | Number | Amount cancelled (in cents). |
    | `blocked_payables_count` | Integer | Number of receivables of the transaction that are blocked. |
    | `custo_adicional` | Number | Additional cost (in cents). |
    | `resolucao_captura` | Integer | Resolution flag of the capture reconciliation. |
    | `resolucao_adquirente` | Integer | Resolution flag of the acquirer reconciliation. |
    | `tipo_resolucao` | String | Type of the resolution. |
    | `mensagem_resolucao` | String | Message of the resolution. |
    | `start_date` | Datetime | When the sale started (UTC); incremental replication key. |
    | `finish_date` | Datetime | When the sale finished (UTC). |
    | `confirmation_date` | Datetime | When the sale was confirmed (UTC). |
    | `payment_date` | Datetime | Payment confirmation date (UTC). |
    | `status_capture_date` | Datetime | When the capture status last changed (UTC). |
    | `status_edi_date` | Datetime | When the EDI status last changed (UTC). |
    | `created_at` | Datetime | When the record was created (UTC). |
    | `updated_at` | Datetime | When the record was last updated (UTC). |
    | `deleted_at` | Datetime | When the record was deleted (UTC). |
    | `raw_payload` | String (JSON) | The whole record exactly as MovingPay returned it (JSON object), including fields that have no column of their own. |
  </Accordion>

  <Accordion title="Transaction Installments">
    Installments (receivables) of recent transactions, with gross and net amounts, fees, payment dates, and split data (`GET /transacoes/parcelas`). This stream makes one request per transaction, so it is not selected by default and only reads the sales of the last Installments Lookback Days; each installment is read shortly after its sale and not refreshed afterwards. For the same reason it only runs incrementally: a full sync with this stream selected stops before anything is synced, so don't combine it with an Additional Full Sync (see step 4).

    Table: `transaction_installments` · Primary key: `id` · Sync: Incremental on `transaction_start_date`

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the installment. |
    | `transacao_id` | Integer | Identifier of the transaction the installment belongs to. |
    | `transacao_original_id` | Integer | Identifier of the original transaction. |
    | `transacao_status` | String | Status of the transaction. |
    | `transaction_start_date` | Datetime | Sale date of the transaction (UTC); incremental replication key. |
    | `valor_bruto` | Number | Gross amount of the installment (in cents). |
    | `valor_liquido` | Number | Net amount of the installment (in cents). |
    | `mdr` | Number | MDR fee of the installment (in cents). |
    | `mdr_antecipacao` | Number | MDR rate applied when the installment is anticipated. |
    | `custo_antecipacao` | Number | Anticipation cost of the installment (in cents). |
    | `parcela_nr` | Integer | Number of the installment. |
    | `data_pagto` | Datetime | Scheduled payment date (UTC). |
    | `data_pgto_original` | Datetime | Original payment date, before any anticipation (UTC). |
    | `data_antecipacao` | Datetime | When the installment was anticipated (UTC). |
    | `data_cancelamento` | Datetime | When the installment was cancelled (UTC). |
    | `dias_rav` | Integer | Days anticipated (RAV) on the installment. |
    | `tipo` | String | Type of the installment. |
    | `situacao` | String | Status of the installment when it was read, shortly after the sale (the payment schedule stream carries the current payment status). |
    | `split_rule_id` | Integer | Split rule the receivable belongs to; empty when it belongs to the owner of the transaction. |
    | `vl_cancelamento` | Number | Amount cancelled (in cents). |
    | `liable` | String | Whether the recipient is liable for chargebacks (split rule). |
    | `charge_processing_fee` | String | Whether the recipient pays the processing fee (split rule). |
    | `is_primary` | String | Whether the recipient is the primary one of the split ('primary'). |
    | `merchants_id` | Integer | MovingPay code of the merchant that receives the installment. |
    | `social_reason` | String | Legal name of the merchant that receives the installment. |
    | `chave_registro` | String | Registration key of the receivable at the registrar. |
    | `chave_liquidacao` | String | Settlement key of the receivable. |
    | `inativar_ur` | Integer | Whether the receivable unit (UR) was deactivated (1 yes, 0 no). |
    | `data_inativacao_ur` | Datetime | When the receivable unit (UR) was deactivated (UTC). |
    | `created_at` | Datetime | When the record was created (UTC). |
    | `updated_at` | Datetime | When the record was last updated (UTC). |
    | `raw_payload` | String (JSON) | The whole record exactly as MovingPay returned it (JSON object), including fields that have no column of their own. |
  </Accordion>

  <Accordion title="Payment Schedule">
    Payments scheduled to the merchants (`GET /financeiro/detalhado`), both waiting for funds and already paid. The table is rebuilt on every sync with the entries from Payment Schedule Past Days before today to Payment Schedule Future Days after it.

    Table: `payment_schedule` · Primary key: `row_key` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `row_key` | String | Surrogate key of the schedule entry: a hash of its status and every field, since MovingPay returns no identifier for it. |
    | `status` | String | Status of the entry: waiting\_funds (to be paid) or paid. |
    | `id_estabelecimento` | Integer | MovingPay code of the merchant that receives the payment. |
    | `cpf_cnpj` | String | CPF or CNPJ (tax ID) of the merchant. |
    | `razao_social` | String | Legal name of the merchant. |
    | `tipo_lancamento` | String | Type of entry: C credit, D debit. |
    | `valor_bruto` | Number | Gross amount of the entry (in cents). |
    | `valor_liquido` | Number | Net amount of the entry (in cents). |
    | `data_pagamento` | Datetime | Payment date of the entry (UTC). |
    | `nsu_parc` | String | NSUs of the installments paid in the entry, separated by semicolons. |
    | `codigo_banco` | String | Bank code (COMPE). |
    | `banco` | String | Name of the bank. |
    | `tipo_conta` | String | Type of the bank account. |
    | `agencia` | String | Branch number. |
    | `agencia_dv` | String | Branch check digit. |
    | `conta` | String | Account number. |
    | `conta_dv` | String | Account check digit. |
    | `numero_cartao` | String | Prepaid card number, when the payment goes to a card. |
    | `raw_payload` | String (JSON) | The whole record exactly as MovingPay returned it (JSON object), including fields that have no column of their own. |
  </Accordion>

  <Accordion title="Anticipations">
    Receivable anticipations, spot and automatic (`GET /relatorios/antecipacoes`). Read incrementally by their last update.

    Table: `anticipations` · Primary key: `id` · Sync: Incremental on `updated_at`

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the anticipation. |
    | `merchants_id` | Integer | MovingPay code of the merchant that anticipated. |
    | `document_number` | String | CPF or CNPJ (tax ID) of the merchant. |
    | `social_reason` | String | Legal name of the merchant. |
    | `solicitation_key` | String | Key of the anticipation request. |
    | `identifier` | String | Identifier of the anticipation. |
    | `transaction_id` | Integer | Identifier of the transaction whose receivable was anticipated. |
    | `payable_id` | Integer | Identifier of the receivable (installment) anticipated. |
    | `nsu` | String | NSU of the transaction. |
    | `authorization_code` | String | Authorization code of the transaction. |
    | `installment` | Integer | Number of the installment anticipated. |
    | `amount` | Number | Gross amount anticipated (in cents). |
    | `fee` | Number | Anticipation fee charged (in cents). |
    | `cost_acquirer_anticipation` | Number | Anticipation cost charged by the acquirer (in cents). |
    | `net_amount` | Number | Net amount paid to the merchant (in cents). |
    | `tax_applied` | Number | Anticipation rate applied (%). |
    | `anticipation_days` | Integer | Days by which payment was brought forward. |
    | `status` | String | Status of the anticipation (approved, pending, declined). |
    | `timeframe` | String | Timeframe of the anticipation. |
    | `type` | String | Type of request: spot (one-off) or automatic. |
    | `approved_user_id` | Integer | Identifier of the user who approved the anticipation. |
    | `approved_date` | Datetime | When the anticipation was approved. |
    | `approval_limit` | Datetime | Deadline to approve the anticipation. |
    | `transaction_date` | Datetime | Date of the original sale. |
    | `original_payment_date` | Datetime | Payment date of the receivable before the anticipation. |
    | `payment_date` | Datetime | Payment date of the receivable after the anticipation. |
    | `payment_status` | String | Payment status of the anticipated receivable. |
    | `capture_partner` | String | Provider that captured the original transaction. |
    | `created_at` | Datetime | When the anticipation was requested (UTC). |
    | `updated_at` | Datetime | When the anticipation was last updated (UTC); incremental replication key. |
    | `raw_payload` | String (JSON) | The whole record exactly as MovingPay returned it (JSON object), including fields that have no column of their own. |
  </Accordion>

  <Accordion title="Chargebacks">
    Chargebacks registered for your transactions (`GET /relatorios/chargebacks`). The whole list is read on every sync and merged into the table.

    Table: `chargebacks` · Primary key: `id` · Sync: Incremental on `data_contestacao`

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the record. |
    | `nsu_lancamento` | String | NSU of the financial entry. |
    | `codigo_adquirente` | Integer | Code of the acquirer. |
    | `nsu_transacao` | String | NSU of the transaction. |
    | `codigo_autorizacao` | String | Authorization code of the transaction. |
    | `valor_total` | Number | Total amount of the transaction (in cents). |
    | `data_venda` | Datetime | Date of the sale (UTC). |
    | `data_contestacao` | Datetime | When the cardholder disputed the transaction (UTC); incremental replication key. |
    | `codigo_estabelecimento` | Integer | MovingPay code of the merchant that made the sale. |
    | `razao_social` | String | Legal name of the merchant. |
    | `desconto` | Number | Amount already recovered from the merchant (in cents). |
    | `data_recebimento` | Datetime | When the amount was recovered from the merchant (UTC). |
    | `raw_payload` | String (JSON) | The whole record exactly as MovingPay returned it (JSON object), including fields that have no column of their own. |
  </Accordion>

  <Accordion title="Cancellations">
    Cancellations registered for your transactions (`GET /relatorios/cancelamentos`). The whole list is read on every sync and merged into the table.

    Table: `cancellations` · Primary key: `id` · Sync: Incremental on `data_cancelamento`

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the record. |
    | `nsu_lancamento` | String | NSU of the financial entry. |
    | `codigo_adquirente` | Integer | Code of the acquirer. |
    | `nsu_transacao` | String | NSU of the transaction. |
    | `codigo_autorizacao` | String | Authorization code of the transaction. |
    | `valor_total` | Number | Total amount of the transaction (in cents). |
    | `data_venda` | Datetime | Date of the sale (UTC). |
    | `data_cancelamento` | Datetime | When the transaction was cancelled (UTC); incremental replication key. |
    | `codigo_estabelecimento` | Integer | MovingPay code of the merchant that made the sale. |
    | `razao_social` | String | Legal name of the merchant. |
    | `desconto` | Number | Amount already recovered from the merchant (in cents). |
    | `data_recebimento` | Datetime | When the amount was recovered from the merchant (UTC). |
    | `raw_payload` | String (JSON) | The whole record exactly as MovingPay returned it (JSON object), including fields that have no column of their own. |
  </Accordion>

  <Accordion title="Acquirer Adjustments">
    Adjustments posted by the acquirers, such as chargeback and cancellation debits (`GET /adquirentes/lancamentos`). Read incrementally by the adjustment date.

    Table: `acquirer_adjustments` · Primary key: `id` · Sync: Incremental on `data_ajuste`

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the adjustment. |
    | `customers_id` | Integer | MovingPay code of the company. |
    | `estabelecimento` | Integer | MovingPay code of the merchant affected by the adjustment. |
    | `nsu_transacao_original` | String | NSU of the transaction the adjustment refers to. |
    | `parcela` | Integer | Installment the adjustment refers to. |
    | `data_ajuste` | Datetime | When the adjustment happened (UTC); incremental replication key. |
    | `descricao` | String | Description of the adjustment. |
    | `desconto` | Number | Discount applied to the adjustment (in cents). |
    | `bandeira` | String | Card brand of the transaction. |
    | `codigo_adquirente` | Integer | Code of the acquirer the adjustment comes from. |
    | `tipo_ajuste` | String | Direction of the adjustment: credito (credit) or debito (debit). |
    | `nsu_ajuste` | String | NSU identifying the adjustment. |
    | `forma_captura` | String | How the adjustment was captured (manual, EDI, ...). |
    | `codigo_ajuste` | String | Adjustment code (CB chargeback, CC cancellation, ...). |
    | `valor_bruto` | Number | Gross amount of the adjustment (in cents). |
    | `valor_liquido` | Number | Net amount of the adjustment (in cents). |
    | `banco` | String | Bank code of the settlement account. |
    | `agencia` | String | Branch of the settlement account. |
    | `conta` | String | Number of the settlement account. |
    | `situacao` | String | Status of the adjustment (pendente, ...). |
    | `data_lancamento` | Datetime | Date the adjustment is posted to the merchant's schedule (UTC). |
    | `created_at` | Datetime | When the record was created in MovingPay (UTC). |
    | `updated_at` | Datetime | When the record was last updated in MovingPay (UTC). |
    | `raw_payload` | String (JSON) | The whole record exactly as MovingPay returned it (JSON object), including fields that have no column of their own. |
  </Accordion>

  <Accordion title="Pending Adjustments">
    Credit and debit adjustments still pending for the merchants (`GET /lancamentos`). The table holds the adjustments pending at the time of the sync.

    Table: `pending_adjustments` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the adjustment. |
    | `codigo_ec` | String | MovingPay code of the merchant affected by the adjustment. |
    | `cpf_cnpj` | String | CPF or CNPJ (tax ID) of the merchant. |
    | `razao_social` | String | Legal name of the merchant. |
    | `nsu_transacao` | String | NSU of the transaction the adjustment refers to. |
    | `nr_parcela` | Integer | Installment the adjustment refers to. |
    | `qtde_parcelas` | Integer | Number of installments of the adjustment. |
    | `data_ajuste` | Datetime | When the adjustment happened (UTC). |
    | `previsao_data_ajuste` | Datetime | Expected date of the adjustment (UTC). |
    | `tipo_lancamento` | String | Type of entry (normal, ...). |
    | `motivo` | String | Reason of the adjustment. |
    | `desconto_comissao` | Number | Commission discount of the adjustment (in cents). |
    | `nseq` | Integer | Sequence number of the adjustment. |
    | `codigo_adquirente` | Integer | Code of the acquirer the adjustment comes from. |
    | `tipo_ajuste` | String | Direction of the adjustment: credito (credit) or debito (debit). |
    | `nsu_ajuste` | String | NSU identifying the adjustment. |
    | `forma_captura` | String | How the adjustment was captured (manual, EDI, ...). |
    | `codigo_ajuste` | String | Adjustment code (CB chargeback, CC cancellation, ...). |
    | `valor_bruto` | Number | Gross amount of the adjustment (in cents). |
    | `valor_liquido` | Number | Net amount of the adjustment (in cents). |
    | `banco` | String | Bank code of the settlement account. |
    | `agencia` | String | Branch of the settlement account. |
    | `conta` | String | Number of the settlement account. |
    | `situacao` | String | Status of the adjustment (pendente, ...). |
    | `data_lancamento` | Datetime | Date the adjustment is posted to the merchant's schedule (UTC). |
    | `created_at` | Datetime | When the record was created in MovingPay (UTC). |
    | `updated_at` | Datetime | When the record was last updated in MovingPay (UTC). |
    | `raw_payload` | String (JSON) | The whole record exactly as MovingPay returned it (JSON object), including fields that have no column of their own. |
  </Accordion>

  <Accordion title="Sellers">
    Sellers (distributors) that bring merchants to your company (`GET /distribuidores`).

    Table: `sellers` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the seller. |
    | `nome` | String | Name of the seller. |
    | `fantasia` | String | Trade name of the seller. |
    | `email` | String | E-mail of the seller. |
    | `cpf_cnpj` | String | CPF or CNPJ (tax ID) of the seller. |
    | `celular` | String | Mobile phone of the seller. |
    | `rua` | String | Street of the seller's address. |
    | `numero` | String | Number of the seller's address. |
    | `bairro` | String | District of the seller's address. |
    | `cep` | String | Postal code (CEP) of the seller. |
    | `estado` | String | State (UF) of the seller. |
    | `percentual_iof` | Number | IOF percentage applied to the seller. |
    | `percentual_ir` | Number | Income tax percentage applied to the seller. |
    | `desconto_moeda` | Number | Fixed discount. |
    | `desconto_transacao` | Number | Discount per transaction. |
    | `custo_transacao` | Number | Cost per transaction. |
    | `percentual_comissao` | Number | Commission percentage. |
    | `comissao_fixa` | Number | Fixed commission. |
    | `custo_adquirencia` | Number | Acquiring cost. |
    | `url_logo` | String | URL of the seller's logo. |
    | `config_vendedor` | String | Configuration of the seller (JSON object). |
    | `situacao` | Integer | Status of the seller (1 active, 0 inactive). |
    | `created_at` | Datetime | When the record was created in MovingPay (UTC). |
    | `updated_at` | Datetime | When the record was last updated in MovingPay (UTC). |
    | `raw_payload` | String (JSON) | The whole record exactly as MovingPay returned it (JSON object), including fields that have no column of their own. |
  </Accordion>

  <Accordion title="Bank Accounts">
    Bank accounts that receive the settlements of merchants and sellers (`GET /conta-bancaria`).

    Table: `bank_accounts` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the bank account. |
    | `codigo_ec` | Integer | MovingPay code of the merchant that owns the account. |
    | `codigo_vendedor` | Integer | Identifier of the seller that owns the account. |
    | `id_banco` | Integer | Identifier of the bank. |
    | `codigo_banco` | String | Bank code (COMPE). |
    | `nome_banco` | String | Name of the bank. |
    | `custo_banco` | Number | Cost charged by the bank. |
    | `tipo_conta` | String | Type of account (conta\_corrente, conta\_poupanca, ...). |
    | `identificador` | String | Identifier of the account. |
    | `favorecido` | String | Name of the account holder. |
    | `cpf_cnpj` | String | CPF or CNPJ (tax ID) of the account holder. |
    | `agencia` | String | Branch number. |
    | `agencia_digito` | String | Branch check digit. |
    | `conta` | String | Account number. |
    | `conta_digito` | String | Account check digit. |
    | `percentual` | Number | Percentage of the settlements sent to this account. |
    | `tarifa` | Number | Transfer fee of the account. |
    | `verificado` | Integer | Whether the account was verified (1 yes, 0 no). |
    | `situacao` | Integer | Status of the account (1 active, 0 inactive). |
    | `created_at` | Datetime | When the record was created in MovingPay (UTC). |
    | `updated_at` | Datetime | When the record was last updated in MovingPay (UTC). |
    | `raw_payload` | String (JSON) | The whole record exactly as MovingPay returned it (JSON object), including fields that have no column of their own. |
  </Accordion>

  <Accordion title="Devices">
    Capture devices (POS, mobile, TEF) and the merchants using them (`GET /dispositivos`).

    Table: `devices` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the device. |
    | `fabricante` | String | Manufacturer of the device. |
    | `modelo` | String | Model of the device. |
    | `numero_serie` | String | Serial number of the device. |
    | `tecnologia` | String | Technology of the device (pos, tef, e-commerce, ...). |
    | `situacao` | Integer | Status of the device: 0 blocked, 1 available, 3 in use. |
    | `descricao_situacao` | String | Description of the status. |
    | `cpf_cnpj` | String | CPF or CNPJ (tax ID) of the merchant using the device. |
    | `razao_social` | String | Legal name of the merchant using the device. |
    | `estabelecimento_id` | Integer | MovingPay code of the merchant using the device. |
    | `codigo_captura` | Integer | Code of the capture provider. |
    | `finalidade` | String | Purpose of the device (sale, rent, ...). |
    | `valor` | Number | Price of the device plan. |
    | `created_at` | Datetime | When the record was created in MovingPay (UTC). |
    | `updated_at` | Datetime | When the record was last updated in MovingPay (UTC). |
    | `raw_payload` | String (JSON) | The whole record exactly as MovingPay returned it (JSON object), including fields that have no column of their own. |
  </Accordion>

  <Accordion title="Split Rules">
    Payment split rules registered for the merchants (`GET /regras-de-divisao`).

    Table: `split_rules` · Primary key: `codigo_estabelecimento`, `hash` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `codigo_estabelecimento` | Integer | MovingPay code of the merchant that receives the split. |
    | `hash` | String | Identifier (hash) of the split rule. |
    | `id` | Integer | Numeric identifier of the rule, when returned. |
    | `razao_social` | String | Legal name of the receiving merchant. |
    | `cpf_cnpj` | String | CPF or CNPJ (tax ID) of the receiving merchant. |
    | `dividir_custos` | Integer | Whether the receiver shares the transaction costs (1 yes, 0 no). |
    | `risco_chargeback` | Integer | Whether the receiver bears the chargeback risk (1 yes, 0 no). |
    | `percentual` | Number | Percentage of the transaction sent to the receiver. |
    | `valor` | Number | Fixed amount sent to the receiver (in cents). |
    | `situacao` | Integer | Status of the rule (1 active, 0 inactive). |
    | `created_at` | Datetime | When the record was created in MovingPay (UTC). |
    | `updated_at` | Datetime | When the record was last updated in MovingPay (UTC). |
    | `raw_payload` | String (JSON) | The whole record exactly as MovingPay returned it (JSON object), including fields that have no column of their own. |
  </Accordion>

  <Accordion title="Fee Plans">
    Fee plans assigned to the merchants (`GET /estabelecimentos/planos`).

    Table: `fee_plans` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the fee plan. |
    | `nome` | String | Name of the fee plan. |
    | `descricao` | String | Description of the fee plan. |
    | `situacao` | Integer | Status of the fee plan (1 active, 0 inactive). |
    | `created_at` | Datetime | When the record was created in MovingPay (UTC). |
    | `updated_at` | Datetime | When the record was last updated in MovingPay (UTC). |
    | `raw_payload` | String (JSON) | The whole record exactly as MovingPay returned it (JSON object), including fields that have no column of their own. |
  </Accordion>

  <Accordion title="Acquirer Agreements">
    Commercial agreements with the acquirers: rates and costs per brand and product (`GET /acordos`).

    Table: `acquirer_agreements` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the agreement. |
    | `merchants_id` | Integer | MovingPay code of the merchant the agreement applies to. |
    | `rates_id` | Integer | Identifier of the fee plan the agreement belongs to. |
    | `codigo_adquirente` | Integer | Code of the acquirer (5 Rede, 17 Adiq, 18 PagSeguro, 20 Cielo, ...). |
    | `mcc` | String | MCC code the agreement applies to. |
    | `mdr_ecommerce` | Number | MDR rate for e-commerce sales (%). |
    | `mdr_presencial` | Number | MDR rate for in-person sales (%). |
    | `antecipacao_spot` | Number | Spot anticipation rate (%). |
    | `antecipacao_rav` | Number | Automatic anticipation (RAV) rate (%). |
    | `spot_online` | Number | Spot anticipation rate for online sales (%). |
    | `rav_online` | Number | Automatic anticipation (RAV) rate for online sales (%). |
    | `valor_min_transacao` | Number | Minimum transaction amount. |
    | `custo_transacao` | Number | Cost per transaction. |
    | `custo_transacao_presencial` | Number | Cost per in-person transaction. |
    | `custo_transacao_ecommerce` | Number | Cost per e-commerce transaction. |
    | `custo_mdr` | Number | MDR cost charged by the acquirer (%). |
    | `taxa_antecipacao` | Number | Anticipation rate (%). |
    | `tipo` | String | Type of the agreement. |
    | `dias_pgto` | Integer | Days until the acquirer pays the sale. |
    | `dias_pagar` | Integer | Days until the acquirer pays the sale (older field name). |
    | `codigo_bandeira` | Integer | Code of the card brand. |
    | `nome_bandeira` | String | Name of the card brand. |
    | `produto` | String | Product (debit, credit, installments, ...). |
    | `created_at` | Datetime | When the record was created in MovingPay (UTC). |
    | `updated_at` | Datetime | When the record was last updated in MovingPay (UTC). |
    | `raw_payload` | String (JSON) | The whole record exactly as MovingPay returned it (JSON object), including fields that have no column of their own. |
  </Accordion>

  <Accordion title="Card Brands">
    Card brands and their rates per operation (`GET /bandeiras`).

    Table: `card_brands` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the brand rate. |
    | `bandeira` | String | Name of the card brand. |
    | `operacao` | String | Operation (debit, credit, installments). |
    | `mdr` | Number | MDR rate (%). |
    | `taxa_antecipacao` | Number | Anticipation rate (%). |
    | `parcelas` | Integer | Number of installments. |
    | `dias_pgto` | Integer | Days until payment. |
    | `descricao` | String | Description of the rate. |
    | `ordenamento` | String | Display order. |
    | `created_at` | Datetime | When the record was created in MovingPay (UTC). |
    | `updated_at` | Datetime | When the record was last updated in MovingPay (UTC). |
    | `raw_payload` | String (JSON) | The whole record exactly as MovingPay returned it (JSON object), including fields that have no column of their own. |
  </Accordion>

  <Accordion title="Acquirers">
    Acquirers configured for your company (`GET /parametros/adquirentes`).

    Table: `acquirers` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the configuration. |
    | `codigo_adquirente` | Integer | Code of the acquirer (5 Rede, 17 Adiq, 18 PagSeguro, 20 Cielo, ...). |
    | `nome` | String | Name of the acquirer. |
    | `intervalo` | Integer | Synchronisation interval (minutes). |
    | `horario` | Integer | Synchronisation hour. |
    | `situacao` | Integer | Status of the acquirer (1 active, 0 inactive). |
    | `created_at` | Datetime | When the record was created in MovingPay (UTC). |
    | `updated_at` | Datetime | When the record was last updated in MovingPay (UTC). |
    | `raw_payload` | String (JSON) | The whole record exactly as MovingPay returned it (JSON object), including fields that have no column of their own. |
  </Accordion>

  <Accordion title="MCC Categories">
    MCC and CNAE categories used to classify the merchants (`GET /tabelas/cnae`).

    Table: `mcc_categories` · Primary key: `id` · Sync: Full table

    | Field | Type | Description |
    | :- | :- | :- |
    | `id` | Integer | Unique identifier of the category. |
    | `departamento` | String | Department of the category. |
    | `codigo_cnae` | String | CNAE code. |
    | `descricao_cnae` | String | Description of the CNAE code. |
    | `codigo_mcc` | String | MCC code. |
    | `descricao_mcc` | String | Description of the MCC code. |
    | `created_at` | Datetime | When the record was created in MovingPay (UTC). |
    | `updated_at` | Datetime | When the record was last updated in MovingPay (UTC). |
    | `raw_payload` | String (JSON) | The whole record exactly as MovingPay returned it (JSON object), including fields that have no column of their own. |
  </Accordion>
</AccordionGroup>


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