> For the complete documentation index, see [llms.txt](https://apidocs.onekeypayments.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.onekeypayments.com/guides/deposits/countries-specialization/automatic-pix/recurring-payments.md).

# Recurring payments

In order to create payments within a previously generated enrollment, merchant should simply request the charge to our Deposits API  :arrow\_right:  <mark style="color:orange;background-color:orange;">**POST**</mark> `https://api-stg.onekeypayments.com`**`/v3/deposits`**&#x20;

The request must include the **`enrollment[]`** object and **`IXA`** as `payment_method`

#### Example request

<pre class="language-shellscript"><code class="lang-shellscript">curl -L \
  --request POST \
  --url 'https://api-stg.onekeypayments.com/v3/deposits' \
  --header 'Content-Type: application/json' \
  --header 'X-Date: 2025-07-17T13:13:15.442Z' \
  --header 'X-Login: text' \
  --header 'Authorization: text' \
  --data '{
    "invoice_id" : "1000000001",
    "amount": "1000",
    "country": "MX",
    "currency": "MXN",
    "payer": {
    "invoice_id": "invoiceid10000",
    "country": "BR",
    "currency": "BRL",
<strong>    "payment_method": "IXA",
</strong>    "payer": {
        "first_name": "Ricardo",
        "last_name": "Carlos",
        "document": "01234567890",
        "document_type": "CPF",
        "email": "ricardo.carlos@example.com",
        "phone": "+5511999999999"
      },
    "amount": 1,
    "success_url": "https://merchant.com/payment/success",
    "notification_url": "https://merchant.com/payment/notification",
    "back_url": "https://merchant.com/payment/back",
    "error_url": "https://merchant.com/payment/error",
<strong>    "enrollment": {
</strong><strong>        "id": 30,
</strong><strong>        "scheduled_date": "2025-11-22"
</strong><strong>      }
</strong>}'
</code></pre>

#### `enrollment[]` object

<table><thead><tr><th width="250.93359375">Field</th><th width="99.953125">Format</th><th>Description</th></tr></thead><tbody><tr><td><code>enrollment.id</code></td><td>number</td><td>ID of the previously created enrollment. See <a href="/pages/4RpBu5n7lsaipKtVKHBx">Enrollment</a> for more information.​</td></tr><tr><td><code>enrollment.scheduled_date</code></td><td>date</td><td>Scheduled date of the payment, format YYYY-MM-DD.</td></tr></tbody></table>

{% hint style="info" %}

#### Payment submission window

To comply with **Central Bank of Brazil (BACEN)** regulations for Pix Automatico, recurring payment requests must be submitted between 10 and 2 calendar days prior to the customer's scheduled billing date.

Example:

* **Scheduled billing date:** August 5th
* **Submission window**: July 26th through August 3rd

Requests submitted outside this timeframe (earlier than 10 days or later than 2 days) will be rejected due to regulatory requirements for processing time and customer notification.
{% endhint %}

***

### Notifications and status retrieval

Whenever the transaction changes it's status, merchants will receive a webhook notification to the defined `notification_url` containing the Deposit ID in order to retrieve the status.

```javascript
{
    "deposit_id": 3000000001
}
```

> For more information visit <a href="/pages/4J1W8bBUsf3m6C60jdyS" class="button primary" data-icon="message-plus">Notifications</a>

The deposit status should be retrieved in the Deposit Status Endpoint\ <mark style="color:green;background-color:$success;">GET</mark>  `https://api-stg.onekeypayments.com/v3/deposits/{deposit_id}`

> For more information visit the API Reference <a href="/spaces/0lbPmhFPUb55BAkK3G6F/pages/MnOupu9QK2t0rd0FElSw" class="button primary" data-icon="magnifying-glass">Get deposit status</a>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://apidocs.onekeypayments.com/guides/deposits/countries-specialization/automatic-pix/recurring-payments.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
