What are Subscriptions?
Subscriptions in moneydevkit work differently from traditional card-based subscriptions:- No stored payment methods - Lightning payments are push-based, so customers pay proactively
- Renewal reminders - Customers receive emails 7, 4, and 1 days before their subscription renews
- Grace period - If a customer misses a payment, they have 3 days to renew before cancellation
- Instant settlement - Payments settle immediately in Bitcoin
Setup
1
Create a recurring product
In your moneydevkit dashboard, create a product with a recurring interval:
- Navigate to Products
- Click the + button
- Fill in product details
- Select a Recurring interval: Monthly, Quarterly, or Yearly
- Click Create Product
2
Create a subscription checkout
Use the recurring product ID when creating checkouts:
3
Check subscription status
Use the
useCustomer hook to check if a user has an active subscription:Subscription Lifecycle
Checking Subscription Status
TheuseCustomer hook fetches customer data including their subscriptions:
CustomerIdentifier Types
You can identify customers in three ways:Grace Period
When a subscription’s billing period ends without payment:- Day 0 - Status changes to
past_due, first grace period email sent - Day 1 - Second grace period reminder
- Day 2 - Third grace period reminder
- Day 3 - Subscription auto-cancels if no payment received
Renewal Reminders
Customers receive renewal reminder emails at:- 7 days before the billing period ends
- 4 days before the billing period ends
- 1 day before the billing period ends
Recurring Intervals
Price Units
Product prices are returned in base currency units:- USD: cents (divide by 100 for dollars)
- SAT: satoshis (no conversion needed)

