Create Charge
POST https://api-sandbox.epag.io/subscriptions/SUBSCRIPTION_ID/charge
This HTTP POST request is used to create a charge for a Subscription using the PIX Automático scheme.
Authorization
| Header | Value |
|---|---|
| X-Auth-Token | MY_ACCESS_TOKEN |
Request Body Parameters
The request payload includes the following core fields:
due_date(required*/string): The due date for the charge in YYYY-MM-DD format.amount(required*/float): The charge amount. Required only when the subscription has aVARIABLEamount.asset(required*/string): Asset code associated with the charge. Required only when the subscription has aVARIABLEamount.force_work_day(optional*/boolean): When set to true, dates are adjusted to business days. If omitted, the value defined at subscription creation (force_work_day) will be used.reference_id(optional/string, max 45 chars): External identifier provided by the merchant to reference the subscription charge.
Example Request
- Success
Success
curl --location 'https://api-sandbox.epag.io/subscriptions/SUBSCRIPTION_ID' \
--data '{
"due_date": "2026-02-01",
"amount": "50.00",
"asset": "USD",
"force_work_day": true,
"reference_id": "MY_REFERENCE_ID"
}'
Example Response
Header
Content-Type: application/json
200 OK
{
"subscription_id": "cc6effd7-2100-47ee-b483-5b4ac719f97d",
"reference_id": "MY_REFERENCE_ID",
"status": "PENDING",
"transaction_id": "0196e128-c6c7-4249-9f20-21a4c2eb1506",
"transaction_status": "PROCESSING",
"transaction_reference_id": "MY_REFERENCE_ID",
"totals": {
"amount": 50,
"original_amount": 50,
"original_asset": "BRL",
"customer_fees": 0,
"customer_amount": 50,
"asset": "BRL"
},
"refresh_token": "MY_ACCESS_TOKEN"
}