feat: add Paddle-backed BYOC subscriptions #378
No reviewers
Labels
No labels
Compat/Breaking
Component/Enclave-Builder
Component/Infrastructure
Deploy/BYOC
Deploy/Full-managed
Deploy/Self-hosted
Interface/API
Interface/CLI
Interface/Git
Interface/Web
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
Reviewed/Confirmed
Reviewed/Duplicate
Reviewed/Invalid
Reviewed/Won't Fix
Status/Abandoned
Status/Blocked
Status/Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
public/platform!378
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refs/pull/378/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Related to #315.
Test plan
cargo test --workspace --all-targetscargo check -p apicargo check -p meteringcargo test -p caution-config pricing -- --nocapture— 10 passedcargo test -p metering webhooks -- --nocapture— 6 passedbash tests/test_provision_paddle.shbash -n utils/provision-paddle.sh tests/test_provision_paddle.sh tests/e2e/test_paddle_subscriptions.shmake test-e2e-paddle-subscriptions— passedgit diff --checkProduction rollout
The feature flag should remain off until the database, Paddle catalog, shared pricing file, and webhook are ready.
prices.json.045_paddle_byoc_subscriptions.sqlbefore enabling the feature. It preserves legacy subscriptions and fails explicitly if duplicate non-canceled legacy rows need reconciliation.1and the five monthly tiers fromprices.json.example, initially leaving Paddle IDs null./webhooks/paddleand subscribe it to the subscription lifecycle events used here (subscription.created,updated,activated,resumed,paused, andcanceled). Keep the existing transaction events enabled.prices.jsoninto API and metering. Configure secrets through the deployment secret store, never the image or repository:PADDLE_API_URL=https://api.paddle.com,PADDLE_API_KEY,PADDLE_CLIENT_TOKENPADDLE_API_URL=https://api.paddle.com,PADDLE_API_KEY,PADDLE_WEBHOOK_SECRETBYOC_PADDLE_SUBSCRIPTIONS_ENABLED=truefor both API and metering, then restart metering and API.Rollback is to unset
BYOC_PADDLE_SUBSCRIPTIONS_ENABLEDand restart the services. Do not delete Paddle products/prices or projected subscription rows during rollback; retaining them preserves reconciliation and audit history.Deferred follow-ups