Create enrollment
This endpoint will allow you to start an enrollment.
Content type of the request.
application/jsonISO8601 Datetime with Timezone: yyyy-MM-dd'T'HH:mm:ssZ
2025-11-13T14:30:00ZMerchant X-Login API Key.
Authorization control hash.
Unique idempotency key.
Payload to create a new enrollment.
Unique deposit ID on your side.
invoiceid10000Country of the deposit (e.g., BR).
BRCurrency of the deposit (e.g., BRL).
BRLDate the enrollment starts. Format YYYY-MM-DD.
2025-10-22Frequency of the enrollment.
MONTHLYPossible values: Amount of the deposit.
1Type of amount.
FIXEDPossible values: Indicates if a payment will be made as soon as the enrollment is created.
trueHTTPS URL to redirect customer on success.
https://merchant.com/payment/successHTTPS URL for deposit status change notifications.
https://merchant.com/payment/notificationEnrollment created successfully.
Bad Request - Invalid input or missing fields.
Unauthorized - Authentication headers are missing or incorrect.
POST /v1/enrollments HTTP/1.1
Host: api-stg.onekeypayments.com
Content-Type: application/json
X-Date: 2025-11-13T14:30:00Z
X-Login: text
Authorization: text
Accept: */*
Content-Length: 452
{
"invoice_id": "invoiceid10000",
"country": "BR",
"currency": "BRL",
"payer": {
"first_name": "Ricardo",
"last_name": "Carlos",
"document": "01234567890",
"document_type": "CPF",
"email": "[email protected]",
"phone": "+5511999999999"
},
"start_date": "2025-10-22",
"frequency": "MONTHLY",
"amount": 1,
"amount_type": "FIXED",
"include_first_payment": true,
"success_url": "https://merchant.com/payment/success",
"notification_url": "https://merchant.com/payment/notification"
}{
"enrollment_id": 36,
"invoice_id": "invoiceid10000",
"currency": "BRL",
"country": "BR",
"amount": 1,
"status": "PENDING",
"redirect_url": "https://link.depositcheckout.com/enrollment/checkout/eyJhbGciOiJIUzM4NCJ9.eyJqdGkiOiIzNiIsImlhdCI6MTc2MTMyNDk4NCwiZXhwIjoxNzYyNjIwOTg0LCJsYW5ndWFnZSI6InB0In0.odWD9R6Mh9br53fynu3n2vVBIXCvkOTk74-V4gAaNhurk217WaWUHOrK4CWobz1a",
"metadata": {
"qr_code": "data:image/png;base64,iVBORw0KGgo...",
"digitable_line": "00020101021226990014br.gov.bcb.pix2577pix..."
}
}Last updated
Was this helpful?

