> 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/api-documentation/automatic-pix-api.md).

# Automatic PIX API

## Overview

Our Automatic PIX API creates subscription-style payments, generating QR Codes that customers scan to pay within a set period, including built-in logic for retries and cancellations to manage and track recurring customer payments automatically.\
\
This includes:

* **Initial Enrollment** - Create first-time deposit and/or determine start of an automatic PIX charge.
* **Recurring Payments** - A new QR Code is generated on a fixed time basis for each payment cycle.
* **Retry Logic** - Multiple instances to complete the transaction if any of the recurring attempts fail.
* **Status** - Obtain detailed information about each enrollment.
* **Cancellation** - Cancel any enrollment previously created.

### Basic Overview

The included endpoints are:\
\
**Start Enrollment** (<mark style="color:orange;">**`POST`**</mark> /v1/enrollments):&#x20;

* Initial deposit information is sent, with all the customer's information, the amount to be charged & other API info.
* Within this initial request, the time frequency that which this should be charged & if it has a first instant payment or not, is included.

**Recurring Payments** (<mark style="color:orange;">**`POST`**</mark> /v3/deposits):&#x20;

* A POST request containing the enrollment\_id and the exclusive IXA payment\_method is automatically submitted to the Deposits API at the end of each recurring period to process the next payment.

**Retry Logic** (<mark style="color:orange;">**`POST`**</mark> /v3/deposits/retry/{depositId}):&#x20;

* If any of the recurring payments failed/expired, you can use this endpoint in order to generate a new QR code tied to an existing attempt.

**Status Endpoint** (<mark style="color:green;">**`GET`**</mark> /v1/enrollments/{id}):&#x20;

* Provides you with all the information related to an enrollment ID.

**Cancellation Endpoint** (<mark style="color:orange;">**`POST`**</mark> /v1/enrollments/{enrollmentId}/cancel):&#x20;

* Allows you to cancel a previously created enrollment.

## Authentication Requirements

* **X-Login**: Your deposits merchant API key.
* **X-Date**: Current timestamp in ISO 8601 format.
* **Authorization**: Authentication hash.
* **Content-Type**: application/json.

All Automatic PIX API endpoints require and follow the same security aspects & headers used for deposits, [which can be found here.](/api-documentation/deposits-api/technical-and-security-aspects.md)<br>
