Create a subscription (OneShot)
This endpoint allows the creation of a new subscription with payment details.
Media type of the body sent to the API.
application/json
ISO8601 Datetime with Timezone (yyyy-MM-dd'T'HH:mm:ssZ)
Merchant X-Login API Key.
Authorization control hash.
Unique idempotency key for ensuring that the same request is not processed more than once.
Unique identifier for the invoice
INV123456
Amount to be charged for the subscription
70
Three-letter currency code (ISO 4217)
BRL
Two-letter country code (ISO 3166-1 alpha-2)
BR
Description of the subscription
Premium Subscription
IP address of the client
192.168.1.1
URL to redirect after payment process
https://example.com/back
URL to redirect after successful payment
https://example.com/success
URL to redirect after failed payment
https://example.com/error
URL to send payment status notifications
https://example.com/notify
Subscription created successfully
Bad Request - Invalid input data
Unprocessable Entity - Validation error
Service Unavailable - Error creating subscription
POST /v3/subscriptions HTTP/1.1
Host: api-stg.directa24.com
Content-Type: application/json
X-Date: 2025-08-29T19:10:01.880Z
X-Login: text
Authorization: text
Accept: */*
Content-Length: 547
{
"invoice_id": "INV123456",
"amount": 70,
"currency": "BRL",
"country": "BR",
"payer": {
"id": "PAYER123",
"document": 123456789,
"document_type": "CPF",
"email": "[email protected]",
"first_name": "Roberto",
"last_name": "Carlos"
},
"description": "Premium Subscription",
"subscription": {
"start_date": "2025-01-01",
"plan": "MONTHLY",
"plan_unit": 1,
"auto_renewal": false
},
"client_ip": "192.168.1.1",
"back_url": "https://example.com/back",
"success_url": "https://example.com/success",
"error_url": "https://example.com/error",
"notification_url": "https://example.com/notify"
}
{
"subscription_id": 1234,
"redirect_url": "https://checkout.cc-stg.checkoutogate.net/validate/6mIsesbbmvYn2hzAOwuYQSMAYIyISUgl?subscriptionId=513",
"expiration_date": "2025-03-06 15:58:02",
"payment_amount": 70,
"redirect": true
}
Last updated
Was this helpful?