Skip to content

feat(paywall): integrate backend API with embed#727

Open
sidvishnoi wants to merge 14 commits into
mainfrom
paywall-integration
Open

feat(paywall): integrate backend API with embed#727
sidvishnoi wants to merge 14 commits into
mainfrom
paywall-integration

Conversation

@sidvishnoi
Copy link
Copy Markdown
Member

@sidvishnoi sidvishnoi commented May 25, 2026

Closes #672
Closes #677
Part of #670 (story)

Preview: https://test.sidvishnoi.com/web-monetization/publisher-tools/paywall.html?src=727

Follow up: error handling, payment rejected etc.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 25, 2026

Deployment results

Worker Alias URL Outcome
API - staging success
CDN - 2d4557f2 success
App - 4a613945 success

Logs #26570472346

@sidvishnoi sidvishnoi marked this pull request as ready for review May 27, 2026 17:41
Comment thread cdn/src/utils/index.ts
Comment thread cdn/src/paywall.ts
async checkEntitlement() {
return 'no-access' // TODO: create and call API
async checkEntitlement(walletAddress) {
console.debug('checkEntitlement', { walletAddress })
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to remove before pushing to prod - I assume needed for initial testing?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prod is far away, but yes, these will be removed once tested enough, including in staging.

Comment thread cdn/src/paywall.ts
Comment on lines +193 to +195
if (status.entitlement === 'has-access') {
this.remove()
return
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the view would there be checks added for the other use cases: auth-required, pending, and no-access?

Copy link
Copy Markdown
Member Author

@sidvishnoi sidvishnoi May 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those cases will be impossible, but in case it does and for other cases, I'll add error logging/screens as follow-up.

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.

Unlock content for users who already paid for it Integrate OTP for paywalls into a publisher's website

2 participants