Billing receipts via Paddle API (#4 remainder) #9

Merged
Cordy merged 3 commits from feat/receipts into main 2026-07-30 00:46:44 +00:00
Owner

Completes #4 now that PADDLE_API_KEY is provisioned on the VPS.

  • paddleAPI client from PADDLE_API_KEY + PADDLE_API_URL (sandbox now; live = swap both at launch). Nil key = billing endpoints answer 503, everything else unaffected.
  • GET /v1/receipts: the org's Paddle transactions (via the customer ids recorded on its license records), newest first — date, total (minor units), currency, status, invoice number. Members can view (per the #6 role model).
  • GET /v1/receipts/{id}/invoice: short-lived invoice-PDF URL, authorized by checking the transaction's customer id against the org's records — foreign transactions are indistinguishable from not-found.

Tests against a fake Paddle server: listing (auth header verified), owned-invoice passthrough, foreign-invoice 404, unauthenticated 401, unconfigured 503. Green on the runner.

Completes #4 now that `PADDLE_API_KEY` is provisioned on the VPS. - `paddleAPI` client from `PADDLE_API_KEY` + `PADDLE_API_URL` (sandbox now; live = swap both at launch). Nil key = billing endpoints answer 503, everything else unaffected. - `GET /v1/receipts`: the org's Paddle transactions (via the customer ids recorded on its license records), newest first — date, total (minor units), currency, status, invoice number. Members can view (per the #6 role model). - `GET /v1/receipts/{id}/invoice`: short-lived invoice-PDF URL, authorized by checking the transaction's customer id against the org's records — foreign transactions are indistinguishable from not-found. Tests against a fake Paddle server: listing (auth header verified), owned-invoice passthrough, foreign-invoice 404, unauthenticated 401, unconfigured 503. Green on the runner.
Cordy merged commit 4ccbae7d82 into main 2026-07-30 00:46:44 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/cairn-license-server#9
No description provided.