Developers · API documentation

Billing

Installments, payment details, second copies and the student financial summary through the EduPay API.

EduPay charges are the installments of each enrollment. Each installment has an amount, a due date, a payment method and, while it can be paid, the payment details: the boleto digitable line and link, the PIX copy-and-paste code or the card payment link.

Read installments

GET /installments (billing:read) accepts enrollment_id, student_id, status, a due date range (due_from, due_to) and a payment date range (paid_from, paid_to), all in YYYY-MM-DD, plus updated_since.

curl "https://edupay.estudiosite.com/api/v1/installments?status=overdue&due_to=2026-10-31&limit=100" \
  -H "Authorization: Bearer $EDUPAY_KEY"

GET /installments/{id} returns one installment and, for PIX, also the QR Code image in payment.pix_qr_code_base64 (only in the detail, so the list stays light).

Installment statuses

status Meaning Has payment?
open Open, not yet due Yes, if the charge has already been issued
overdue Past due without payment Yes
outstanding Debt left over from a cancelled enrollment Yes
paid Paid (through the bank, the registry office or a manual payment entry by the school) No
cancelled Cancelled (including one replaced by a second copy) No
waived Waived by the school No

The payment object only appears while the installment can be paid:

"payment": {
  "barcode": "23793.38128 60000.000003 ...",
  "boleto_url": "https://...",
  "pix_copy_paste": "00020126...",
  "payment_url": "https://checkout.stripe.com/...",
  "expires_at": "2026-11-12T02:59:59Z"
}

A field without a value comes as null: a boleto has no payment_url, a card link has no barcode. An open installment whose charge has not been issued yet (boleto and PIX go out a few days before the due date) comes with the fields null — check again closer to the due date or wait for the installment.charge_issued webhook.

Amounts in cents, with the currency in currency. paid_amount is the amount actually received.

Student financial summary

GET /students/{id}/summary (billing:read) adds up everything the student can still pay, across all enrollments, including debt from a cancelled enrollment:

{
  "data": {
    "student_id": 532, "currency": "BRL",
    "open_installments": 3, "overdue_installments": 1,
    "amount_due": 135000, "amount_overdue": 45000,
    "next_installment": { "id": 9813, "due_date": "2026-11-10", "amount": 45000 },
    "active_enrollments": 1, "contract_status": "signed"
  }
}

Useful for showing the student's status in another system (student area, customer service, CRM) without downloading every installment.

Second copy

POST /installments/{id}/second-copy (billing:write) does the same as the panel button: it cancels the current installment along with its charge at the bank and creates another one, with a new charge and an e-mail to the student. The new installment has the ID of the previous one in replaces_installment_id.

curl -X POST https://edupay.estudiosite.com/api/v1/installments/9813/second-copy \
  -H "Authorization: Bearer $EDUPAY_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 2via-9813-2026-11-20" \
  -d '{"due_date": "2026-11-20"}'
  • Without due_date, the second copy is due in 3 days. The date must be today or later, in the school's time zone.
  • The amount cannot be changed through the API.
  • Only open, overdue or outstanding installments (409 with code installment_not_payable for the others).
  • A boleto that is still valid cannot be cancelled at the bank: 409 with code boleto_still_valid, and the reason in detail.
  • School without a connected payment account: 409 with code gateway_not_connected.
  • If the bank declines, the response is 502 with code gateway_error. If installment_id is present, the second copy was created and its charge is issued again automatically.

Know about the payment right away

Instead of polling the installments, register an endpoint for the installment.paid webhook. It arrives seconds after the confirmation, whether it comes from the bank, the registry office or a manual payment entry by the school. See Webhooks.