Skip to content

fix(stripe-webhook): grant lifetime entitlement on no_payment_required (100%-off checkout) - #116

Merged
Thejas775 merged 1 commit into
mainfrom
fix/paycraft-webhook-no-payment-required
Jul 13, 2026
Merged

fix(stripe-webhook): grant lifetime entitlement on no_payment_required (100%-off checkout)#116
Thejas775 merged 1 commit into
mainfrom
fix/paycraft-webhook-no-payment-required

Conversation

@Thejas775

Copy link
Copy Markdown
Collaborator

Addresses CodeRabbit's Functional-Correctness finding on PR #115.

Bug: A fully-discounted (100%-off coupon) Stripe payment-mode checkout completes with payment_status: "no_payment_required". The guard added in #114 skipped entitlement for anything !== "paid" and waited for checkout.session.async_payment_succeeded — which never fires for a no-payment-required session → the buyer never received lifetime access.

Fix: Grant on both paid and no_payment_required; only a genuinely unpaid async session awaits settlement.

Not yet deployed (edge-functions deploy is pending CI secrets), so this ships correct once functions deploy.

🤖 Generated with Claude Code

…checkout)

CodeRabbit (PR #115): a fully-discounted payment-mode checkout completes with
payment_status='no_payment_required'. The prior guard skipped entitlement for
anything != 'paid' and waited for async_payment_succeeded, which never fires for
such sessions → the user never got lifetime access. Now grant on both 'paid' and
'no_payment_required'; only genuinely 'unpaid' async sessions await settlement.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pay-craft Error Error Jul 13, 2026 2:55pm

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 13, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
paycraft-docs 4f05681 Jul 13 2026, 02:57 PM

@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 63cba8a0-71d6-41e1-8159-be206d5b9829

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/paycraft-webhook-no-payment-required

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Thejas775
Thejas775 merged commit 6d34154 into main Jul 13, 2026
9 of 11 checks passed
@therajanmaurya
therajanmaurya deleted the fix/paycraft-webhook-no-payment-required branch July 29, 2026 12:28
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.

1 participant