Skip to content

Make the polar payment flow more robust#177

Open
piffio wants to merge 4 commits intomainfrom
feat/improve-paid-plans-robustness
Open

Make the polar payment flow more robust#177
piffio wants to merge 4 commits intomainfrom
feat/improve-paid-plans-robustness

Conversation

@piffio
Copy link
Owner

@piffio piffio commented Mar 17, 2026

  • Make the customer lookup more robust by searching both for external ID and customer ID.
  • Get the customer ID from Polar before initiating a checkout process.
  • Create a unique index on customer ID.
  • Properly handle the different types of cancellation: Immediate/At end of period
  • Add a cron job to downgrare expired subscriptions

Closes #47

- Look for external_id
- If that fails, look for customer_id
- Bonus: use the right port number when starting polar CLI
@github-actions
Copy link

🚀 Ephemeral Environment Deployed (Unified Worker)

Application: https://rushomon-pr-177.piffio.workers.dev

This unified Worker deployment serves both frontend and backend from the same domain for better security (httpOnly cookies work correctly).

This environment will be automatically cleaned up when the PR is closed.

Worker: rushomon-pr-177


💡 Tip: To skip preview deployment, add the skip-preview label to this PR.

@github-actions
Copy link

🚀 Ephemeral Environment Deployed (Unified Worker)

Application: https://rushomon-pr-177.piffio.workers.dev

This unified Worker deployment serves both frontend and backend from the same domain for better security (httpOnly cookies work correctly).

This environment will be automatically cleaned up when the PR is closed.

Worker: rushomon-pr-177


💡 Tip: To skip preview deployment, add the skip-preview label to this PR.

@github-actions
Copy link

🚀 Ephemeral Environment Deployed (Unified Worker)

Application: https://rushomon-pr-177.piffio.workers.dev

This unified Worker deployment serves both frontend and backend from the same domain for better security (httpOnly cookies work correctly).

This environment will be automatically cleaned up when the PR is closed.

Worker: rushomon-pr-177


💡 Tip: To skip preview deployment, add the skip-preview label to this PR.

- Add a proper support for "cancel at the end of period"
- Corretly handle subscription dates
- Add a cron job to downgrade expired subscriptions
- Add tests to cover more aspects of the entire flow
@piffio piffio deployed to ephemeral March 18, 2026 21:19 — with GitHub Actions Active
@github-actions
Copy link

🚀 Ephemeral Environment Deployed (Unified Worker)

Application: https://rushomon-pr-177.piffio.workers.dev

This unified Worker deployment serves both frontend and backend from the same domain for better security (httpOnly cookies work correctly).

This environment will be automatically cleaned up when the PR is closed.

Worker: rushomon-pr-177


💡 Tip: To skip preview deployment, add the skip-preview label to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce the Pro paid tier

1 participant