# 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="enrollment">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="../../create-deposits/notifications" 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="https://app.gitbook.com/s/0lbPmhFPUb55BAkK3G6F/deposits-api/manage-payments/get-deposit-status" class="button primary" data-icon="magnifying-glass">Get deposit status</a>
