---
title: "Request a Lightning offer for a premium product"
method: POST
path: "/v1/premium/purchase"
tags: ["Premium and prices"]
---

# Request a Lightning offer for a premium product

`POST /v1/premium/purchase`

## Request

- Base URL: `https://api.memestack.ai`
- URL: `https://api.memestack.ai/v1/premium/purchase`
- Auth: HTTP bearer

Also sells the developer API call packs (api_builder_30d, api_growth_30d, api_scale_30d, api_calls_10k — listed by GET /v1/developer/plans, never by /v1/premium/products; the top-up answers 409 PLAN_REQUIRED without an active plan, and every pack answers 404 PRODUCT_UNAVAILABLE while the developer API is dark). Answers a 402 Lightning offer for one of the three premium SKUs: a bolt11 invoice minted at the platform's receive address for the product's price plus a macaroon bound to that product and price. Nothing is written and no balance exists — pay the invoice from any Lightning wallet, then POST /v1/premium/redeem with the macaroon to apply the product. A retried offer is simply a second invoice the client may pay instead (the first stays unpaid and expires). No Idempotency-Key: the invoice's payment hash is the idempotency spine. Requires a fresh, non-banned/frozen account. Rate limited 10/min/user. Returns 404 while PREMIUM_ENABLED is off — the switch stops new offers only; already-purchased benefits and in-flight redeems keep working.

## Request body

- object
  - `product` 'supporter_30d' | 'ad_free_30d' | 'credits_10' | 'credits_100' | 'api_builder_30d' | 'api_growth_30d' | 'api_scale_30d' | 'api_calls_10k', required

## Other responses

- `400`: Product is not one of the known SKU keys (INVALID_PRODUCT).
- `401`: Authentication required.
- `402`: The Lightning offer (Cache-Control: private, no-store). Pay `invoice` before `invoice_expires_at`, then redeem with `macaroon`; the macaroon outlives the invoice, and an account-bound claim resumes even after `macaroon_expires_at`.
- `404`: Premium purchases are temporarily disabled (PREMIUM_ENABLED is off).
- `429`: Rate limit exceeded (10/min/user).
- `503`: Payment rails temporarily unavailable (PAYMENT_UNAVAILABLE) — PAYMENTS_ENABLED / the L402 leg is off, or the invoice could not be minted.

---

[API](https://skmtc.dev/memestack/apis/memestack-api.md) · [All operations](https://skmtc.dev/memestack/apis/memestack-api/llms.txt) · [OpenAPI document](https://skmtc.dev/memestack/apis/memestack-api/revisions/9d3a19565f75?raw)
