Recurring payments

In order to create payments within a previously generated enrollment, merchant should simply request the charge to our Deposits API ➡️ POST https://api-stg.onekeypayments.com/v3/deposits

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

Example request

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",
    "payment_method": "IXA",
    "payer": {
        "first_name": "Ricardo",
        "last_name": "Carlos",
        "document": "01234567890",
        "document_type": "CPF",
        "email": "[email protected]",
        "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",
    "enrollment": {
        "id": 30,
        "scheduled_date": "2025-11-22"
      }
}'

enrollment[] object

Field
Format
Description

enrollment.id

number

ID of the previously created enrollment. See Enrollment for more information.​

enrollment.scheduled_date

date

Scheduled date of the payment, format YYYY-MM-DD.

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


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.

For more information visit message-plusNotifications

The deposit status should be retrieved in the Deposit Status Endpoint GET https://api-stg.onekeypayments.com/v3/deposits/{deposit_id}

For more information visit the API Reference magnifying-glassGet deposit status

Last updated

Was this helpful?