dev

Subscription Renewal Cron

Daily cron: process all due AppSumo subscription renewals.

Grants monthly credits on each user's signup anniversary date. Renewal dates are computed from users.created_at.

Stripe renewals are NOT processed here — they are handled exclusively by the invoice.payment_succeeded webhook to ensure credits are only granted after confirmed payment.

Robustness / ordering: every license is processed in its own savepoint and committed individually, so one bad record (or one bad pooled DB connection) is counted in appsumo_failed instead of failing the run. Deduplicates via the subscription_renewals table, so it is idempotent and may be re-run any time later the same day; its position in the LapisCRON schedule (e.g. right after the nightly backup dispatch) does not matter.

Called by LapisCRON or manually via dev_scripts.

post/api/v1/dev/subscription-renewal-cron

Request

  • Base URL: https://api.trylapis.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.trylapis.com/api/v1/dev/subscription-renewal-cron
  • Auth: none declared

Headers

x-lapis-dev-tokenstring

Response

Successful Response

successboolean required
messagestring required
stripe_renewedinteger required
stripe_already_renewedinteger required
stripe_skippedinteger required
appsumo_renewedinteger required
appsumo_already_renewedinteger required
appsumo_skippedinteger required
appsumo_failedinteger
failed_user_idsinteger[]
total_credits_distributedinteger required

Changes

No recorded changes to this operation across all 1 revision of this API.