Skip to content

All Endpoints

Complete reference of all API endpoints in Subscriptions Manager.

Quick Reference

Plans

MethodEndpointAuthDescription
GET/api/v1/plansInvoiceList all plans (paginated)
POST/api/v1/plansAdminCreate a plan
GET/api/v1/plans/{id}InvoiceGet plan details
PUT/api/v1/plans/{id}AdminUpdate a plan
DELETE/api/v1/plans/{id}AdminArchive a plan
GET/api/v1/plans/{id}/subscribersInvoiceList plan subscribers (paginated)

Subscriptions

MethodEndpointAuthDescription
GET/api/v1/subscriptionsInvoiceList subscriptions (paginated, filterable)
GET/api/v1/subscriptions/{id}InvoiceGet subscription
POST/api/v1/subscriptions/{id}/pauseAdminPause subscription
POST/api/v1/subscriptions/{id}/resumeAdminResume subscription
POST/api/v1/subscriptions/{id}/cancelAdminCancel subscription
POST/api/v1/subscriptions/{id}/extendAdminAdd free days
GET/api/v1/subscriptions/{id}/manage-linkAdminGet subscriber portal URL
GET/api/v1/subscriptions/{id}/paymentsInvoiceList payments (paginated)

Archive

MethodEndpointAuthDescription
GET/api/v1/archive/plansInvoiceList archived plans (paginated)
GET/api/v1/archive/subscriptionsInvoiceList archived subscriptions (paginated)

Public

MethodEndpointAuthDescription
GET/public/plan/{id}NonePublic plan info
POST/public/subscribeNoneCreate subscription (JSON body)
GET/public/payment/{id}/statusNoneCheck payment status
POST/public/nwc/validateNoneValidate NWC connection
POST/public/subscribe/nwcNoneCreate NWC subscription

Subscriber Portal

MethodEndpointAuthDescription
GET/public/manage/subscriptionsSubscriberList subscriptions (paginated)
POST/public/manage/subscription/{id}/cancelSubscriberCancel subscription
GET/public/manage/walletsSubscriberList NWC wallets (paginated)
DELETE/public/manage/wallets/{id}SubscriberDisconnect NWC wallet

Webhooks

MethodEndpointAuthDescription
POST/public/webhook/satspayNoneSatsPay callback
POST/public/webhook/stripeNoneStripe callback
POST/public/webhook/paypalNonePayPal callback

Pagination

All list endpoints marked (paginated) accept limit and offset query parameters and return a PaginatedResponse wrapper.

ParamDefaultRangeDescription
limit501–200Items per page
offset00+Items to skip

Plans

Manage subscription plans.

GET/api/v1/plans

Description: List all active plans for the authenticated wallet (paginated).

Auth: Invoice Key

Query Parameters: limit (default 50), offset (default 0)

Response:

json
{
  "items": [
    {
      "id": "abc123",
      "name": "Pro Plan",
      "amount_sats": 10000,
      "interval": "monthly",
      "allow_lightning": true,
      "allow_onchain": false,
      "allow_stripe": true,
      "allow_paypal": false
    }
  ],
  "total": 1,
  "limit": 50,
  "offset": 0
}
POST/api/v1/plans

Description: Create a new subscription plan.

Auth: Admin Key

Body:

json
{
  "name": "Pro Plan",
  "amount_sats": 10000,
  "interval": "monthly",
  "description": "Access to premium features",
  "trial_days": 7,
  "grace_period_days": 3,
  "allow_lightning": true,
  "allow_onchain": false,
  "allow_stripe": true,
  "allow_paypal": false
}

Parameters:

FieldTypeRequiredDescription
namestringYesPlan display name
amount_satsintegerYesPrice in satoshis
intervalstringYesweekly, monthly, or yearly
descriptionstringNoShown on checkout page
trial_daysintegerNoFree trial period (default: 0)
grace_period_daysintegerNoDays after failed payment (default: 0)
allow_lightningbooleanNoEnable Lightning payments (default: true)
allow_onchainbooleanNoEnable on-chain Bitcoin (default: false)
allow_stripebooleanNoEnable Stripe cards/Apple Pay/Google Pay
allow_paypalbooleanNoEnable PayPal payments
GET/api/v1/plans/{id}

Description: Get details for a specific plan.

Auth: Invoice Key

Path Parameters:

  • id - Plan ID
PUT/api/v1/plans/{id}

Description: Update an existing plan. Only include fields you want to change.

Auth: Admin Key

Note: Price changes only affect new subscriptions. Existing subscribers keep their original price.

DELETE/api/v1/plans/{id}

Description: Archive a plan and cancel all active subscriptions. Subscribers are notified.

Auth: Admin Key

Warning: This action cannot be undone.

Subscriptions

Manage subscriber subscriptions.

GET/api/v1/subscriptions

Description: List all subscriptions for your plans (paginated).

Auth: Invoice Key

Query Parameters:

  • limit (default 50) - Items per page (1–200)
  • offset (default 0) - Items to skip
  • status (optional) - Filter by status (active, paused, cancelled, etc.)
GET/api/v1/subscriptions/{id}

Description: Get details for a specific subscription including payment history.

Auth: Invoice Key

PUT/api/v1/subscriptions/{id}

Description: Update subscription metadata or settings.

Auth: Admin Key

POST/api/v1/subscriptions/{id}/cancel

Description: Cancel a subscription. Access continues until end of current period.

Auth: Admin Key

Body (optional):

json
{
  "reason": "Customer requested cancellation",
  "immediate": false
}
FieldTypeDescription
reasonstringCancellation reason for records
immediatebooleanIf true, cancels immediately instead of at period end
POST/api/v1/subscriptions/{id}/pause

Description: Pause a subscription. No payments will be collected until resumed.

Auth: Admin Key

POST/api/v1/subscriptions/{id}/resume

Description: Resume a paused subscription.

Auth: Admin Key

Subscribers

Manage subscriber information.

GET/api/v1/subscribers

Description: List all subscribers across your plans.

Auth: Invoice Key

Query Parameters:

  • search (optional) - Search by email, name, or contact info
GET/api/v1/subscribers/{id}

Description: Get subscriber details including all their subscriptions.

Auth: Invoice Key

Response:

json
{
  "id": "sub_123",
  "email": "user@example.com",
  "telegram": "@username",
  "nostr": "npub1...",
  "name": "John Doe",
  "created_at": 1704067200,
  "subscriptions": [...]
}

Payments

View payment history and details.

GET/api/v1/payments

Description: List all payments across subscriptions.

Auth: Invoice Key

Query Parameters:

  • subscription_id (optional) - Filter by subscription
  • status (optional) - Filter by status (paid, pending, failed)
  • payment_method (optional) - Filter by method (lightning, onchain, stripe, paypal)
GET/api/v1/payments/{id}

Description: Get details for a specific payment.

Auth: Invoice Key

Response:

json
{
  "id": "pay_123",
  "subscription_id": "sub_456",
  "amount_sats": 10000,
  "status": "paid",
  "payment_method": "lightning",
  "payment_hash": "abc123...",
  "created_at": 1704067200,
  "paid_at": 1704067250
}

Public Endpoints

No authentication required. Used for checkout flows.

GET/public/plan/{id}

Description: Get public plan information for display on checkout pages.

Auth: None

Response: Plan name, price, interval, description (no sensitive data)

POST/public/subscribe

Description: Create a new subscription (JSON body).

Auth: None

Body:

json
{
  "plan_id": "plan_abc123",
  "payment_method": "lightning",
  "email": "user@example.com",
  "name": "John Doe",
  "receive_confirmations": true,
  "receive_reminders": true
}
FieldTypeRequiredDescription
plan_idstringYesPlan to subscribe to
payment_methodstringYeslightning, onchain, card, paypal, or nwc
emailstringNoSubscriber email
namestringNoSubscriber name
telegramstringNoTelegram username
nostrstringNoNostr npub or NIP-05
receive_confirmationsbooleanNoOpt in to confirmations (default: true)
receive_remindersbooleanNoOpt in to reminders (default: true)

Response: Returns a CheckoutResponse with payment_id, payment_method, payment details (invoice, address, QR codes, or checkout URL), and expires_at. For trial plans, returns a TrialSubscriptionResponse instead.

GET/public/payment/{id}/status

Description: Check payment status.

Auth: None

Response:

json
{
  "payment_id": "pay_123",
  "status": "paid",
  "paid_at": 1704067250,
  "subscription_id": "sub_xyz789"
}

Webhook Callbacks

Endpoints that receive payment confirmations from external services.

POST/public/webhook/satspay

Description: Callback endpoint for SatsPay Server. Receives on-chain and Lightning payment confirmations.

Auth: None (validated by charge ID)

POST/public/webhook/stripe

Description: Callback endpoint for Stripe webhooks. Receives card payment confirmations.

Auth: None (validated by Stripe signature)

POST/public/webhook/paypal

Description: Callback endpoint for PayPal IPN/webhooks. Receives PayPal payment confirmations.

Auth: None (validated by PayPal)