Scheduled Charges
Migo bills active subscriptions automatically when they fall due. You don't need to do anything β just handle fulfillment / access control.
Cadenceβ
The charge cron runs every 12 hours. Each run selects subscriptions whose nextRenewalDate falls within the current day in the client timezone (default America/Guatemala).
Charge flowβ
[cron, every 12h] βββΊ for each due subscription:
1. Load default payment method
2. Charge through the processor
3. If succeeded: advance the next renewal date
4. If failed: enter the retry schedule (see below)
Retry scheduleβ
Retries are configured per plan, not on a fixed global schedule:
dailyAttemptsβ number of charge attempts.intervalAttemptβ time between attempts (default 24 hours).graceDaysβ optional grace window before the subscription is considered failed.
Once the attempts are exhausted, the subscription transitions to inactive.
There is no fixed 3-day / 5-day / 7-day schedule and no metadata.retryPolicy override.
View payment historyβ
GET /v1/subscriptions/payment-history requires the subscriptionId query parameter (returns 400 if missing). It does not support limit or page.
curl "https://mw.migopayments.com/v1/subscriptions/payment-history?subscriptionId=sub_01HAAA" \
-H "Authorization: Bearer <middleware-jwt>"
Response β data is a flat array of formatted transactions:
{
"success": true,
"message": "Payment history found",
"data": [ ]
}
There is no paginated { items, total, page, limit } envelope.
3-D Secure on scheduled chargesβ
Recurring charges run without an interactive cardholder, so the cron sets the transaction's modKeys['3ds'] = false. A 3DS challenge is only triggered when the client/processor configuration has 3DS enabled and the transaction is in progress. There is no threeDsChallenge: "skip" parameter and no "merchant-initiated credential" concept in code.
Notificationsβ
The subscription/cron flow sends email notifications (e.g. subPayProblem, subscriptionSuspended) and a merchant callback (subsCallback) rather than a public outbound webhook contract. See Subscriptions β Notifications.