> ## 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.

# Pagar.me as a data source

> Bring data from Pagar.me to Nekt.

<img width="200" src="https://mintlify.s3.us-west-1.amazonaws.com/nekt/assets/logo/logo-pagarme.png" />

Pagar.me is a payment processing platform designed for Brazilian businesses. It provides tools for accepting online payments, managing subscriptions, and handling financial transactions securely, helping companies streamline their payment operations and improve cash flow management.

## Configuring Pagar.me 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 **Pagar.me** option from the list of connectors.

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

### 1. Add account access

You'll need to authorize Nekt to access your Pagar.me data. Check the [Pagar.me documentation](https://docs.pagar.me/reference/autentica%C3%A7%C3%A3o-2) to check how to generate the API Token.

The following configurations are available:

* **API Token**: The token to authenticate against the API service.
* **Start date**: Records created or updated after the start date will be extracted from the source. This will help to avoid processing unnecessary data.

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**: companies in the Growth plan can choose in which [layer](https://docs.nekt.com/get-started/core-concepts/catalog-layers) the tables with the extracted data will be placed.
* **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**: depending on the data you are bringing to the lake, you can choose between INCREMENTAL and 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/runs/scheduling-and-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.

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 Pagar.me:

<AccordionGroup>
  <Accordion title="Balance Operations">
    Stream for retrieving balance operations data.
  </Accordion>

  <Accordion title="Charges">
    Stream for retrieving charges data.
  </Accordion>

  <Accordion title="Orders">
    Stream for retrieving orders data.
  </Accordion>

  <Accordion title="Payables">
    Stream for retrieving payables data.

    | Field                        | Type     | Description                                           |
    | :--------------------------- | :------- | :---------------------------------------------------- |
    | `id`                         | Integer  | Unique identifier of the record.                      |
    | `status`                     | String   | Current status of the record.                         |
    | `amount`                     | Integer  | Monetary value associated with the record.            |
    | `fee`                        | Integer  | Fee of the record.                                    |
    | `anticipation_fee`           | Integer  | Anticipation fee of the record.                       |
    | `fraud_coverage_fee`         | Integer  | Fraud coverage fee of the record.                     |
    | `installment`                | Integer  | Installment number of the record.                     |
    | `gateway_id`                 | Integer  | Identifier of the associated gateway.                 |
    | `charge_id`                  | String   | Identifier of the associated charge.                  |
    | `recipient_id`               | String   | Identifier of the associated recipient.               |
    | `payment_date`               | DateTime | Timestamp of the scheduled payment date.              |
    | `type`                       | String   | Type classification of the record.                    |
    | `payment_method`             | String   | Payment method of the record.                         |
    | `accrual_at`                 | DateTime | Timestamp when the payable was accrued.               |
    | `original_payment_date`      | DateTime | Original scheduled payment date before any changes.   |
    | `originator_model`           | String   | Model type that originated this payable.              |
    | `originator_model_id`        | String   | Identifier of the originating model.                  |
    | `liquidation_arrangement_id` | String   | Identifier of the associated liquidation arrangement. |
    | `created_at`                 | DateTime | Timestamp when the record was created.                |
  </Accordion>

  <Accordion title="Recipients">
    Stream for retrieving recipients data.
  </Accordion>
</AccordionGroup>

## Skills for agents

<Snippet file="agent-skills-intro.mdx" />

<Card title="Download Pagar.me skills file" icon="wand-magic-sparkles" href="/sources/pagarme.md">
  Pagar.me connector documentation as plain markdown, for use in AI agent contexts.
</Card>
