# Subscriptions paid outside Skerry

Services a customer pays elsewhere. Skerry keeps the service, amount, cycle, next renewal and trial end, reminds before a renewal, flags a price rise, and records how a cancellation went. It holds no credential of the provider and cancels nothing itself: the cancel step names the provider's own page.

Migration: `db/050_subscriptions_supplies.sql`. Code: `lib/outside-subscriptions.ts`, pure detection in `lib/pure/subscription.ts`. Not the same as `/subscriptions` (machine payments, where Skerry charges for calls).

## Finding them

`POST /outside-subscriptions/detect` takes charges (`date`, `amount_minor`, `currency`, `merchant`) from the customer's Skerry activity, a statement or mail receipts. Charges are grouped by merchant (case, punctuation and company suffixes ignored) and currency. A group is a subscription when the gaps match weekly, monthly, quarterly or yearly and it has three charges (two for a yearly one). One whose next renewal is more than a cycle overdue is taken to have ended. A tracked service whose latest amount differs is flagged: `previous_amount_minor`, `price_change` (`delta_minor`, `pct`) and the `subscription.price_changed` event. Confidence rises with the number of charges and how steady the amount is.

## Reminders

`subscription.renews_soon` is sent once at 7 days and once at 1 day before `next_renewal`, and once when a `trial_ends` is within 3 days (`reminder: "trial_ends"`). The worker runs them on its slow beat (`SKERRY_PAYABLE_REMINDERS=off` turns it off); `payable_reminder` keeps what was sent.

## Cancel

`POST /outside-subscriptions/{id}/cancel` records `requested` (the person is sent to `cancel_url`), `canceled` or `failed`. A canceled subscription leaves the list and the monthly total, and the same service can be tracked again.

Scopes: `outside_subscriptions:read`, `outside_subscriptions:write`. Events: `subscription.found`, `subscription.renews_soon`, `subscription.price_changed`.
