clerk / clerk/clerk-sdk-python
No way to cancel subscription immediately if was canceled before
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 186
- Forks
- 47
- Avg merge
- 18h 43m
- Merged PRs (30d)
- 1
Description
Clerk's dashboard allows to cancel subscription immediately if it was soft-canceled before (will end after current period).
So you actually do in the dashboard: cancel with ?end_now=false and subscription remains active till the end of the period. Then you call cancel with end_now=true it cancels again and is not available anymore.
Doing the same with cancel_subscription_item_async(id, end_now=False) and then cancel_subscription_item_async(id, end_now=True) fails on the second cal with You can't cancel a subscription item that is already canceled
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing cancel_subscription_item_async(id, end_now=False) and its handling of a second call with end_now=True. Reproduce the soft-cancel then immediate-cancel sequence described in the issue, and compare the SDK request and response behavior with Clerk's dashboard flow. Done means the second cancellation succeeds instead of reporting that the subscription item is already canceled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, payments
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100