Record a payment
1. Retrieve the invoice
bash
curl https://api.cedius.app/v1/invoices/inv_91ac20 -H "Authorization: Bearer $CEDIUS_API_KEY"Check amount_due.
2. Choose an idempotency key
text
payment-order-4832Reuse the same key when retrying the same logical payment.
3. Record the payment
bash
curl -X POST https://api.cedius.app/v1/payments -H "Authorization: Bearer $CEDIUS_API_KEY" -H "Content-Type: application/json" -H "Idempotency-Key: payment-order-4832" -d '{
"invoice_id": "inv_91ac20",
"amount": 161250,
"method": "bank_transfer",
"reference": "TRX-20260910-8821"
}'4. Verify the invoice
Retrieve the invoice again. A fully paid invoice should report status: paid and amount_due: 0.