![]() This PR adds a new `POST /billing/subscriptions/manage` endpoint that can be used to manage a billing subscription. The endpoint accepts a `github_user_id` to identify the user, as well as an optional `subscription_id` for managing a specific subscription. If `subscription_id` is not provided, it try and use the active subscription, if there is only one. Right now the endpoint only supports cancelling an active subscription. This is done by passing `"intent": "cancel"` in the request body. The endpoint will return the URL to a Stripe customer portal session, which the caller can redirect the user to. Here's an example of how to call it: ```sh curl -X POST "http://localhost:8080/billing/subscriptions/manage" \ -H "Authorization: <ADMIN_TOKEN>" \ -H "Content-Type: application/json" \ -d '{"github_user_id": 12345, "intent": "cancel"}' ``` Release Notes: - N/A |
||
---|---|---|
.. | ||
billing.rs | ||
contributors.rs | ||
events.rs | ||
extensions.rs | ||
ips_file.rs | ||
slack.rs |