Skip to content

Conversation

@danqzq
Copy link

@danqzq danqzq commented Jan 10, 2026

Context

Fixes #716
See also: #238

A TypeScript error occurs when using the PayPal JS SDK Buttons integration for subscriptions without specifying return_url and cancel_url in application_context, even though previous guidance states these fields are not required/recommended for the JS SDK flow.

Error:

TS2739: Type `application_context` is missing the following properties: return_url, cancel_url
billing_subscriptions_v1.d.ts(1301, 13): The expected type comes from property application_context which is declared here on type ...

See #716 for minimal reproduction steps

Change

Updated the type definition for application_context to make return_url and cancel_url optional.

@danqzq danqzq requested a review from a team as a code owner January 10, 2026 01:01
@changeset-bot
Copy link

changeset-bot bot commented Jan 10, 2026

🦋 Changeset detected

Latest commit: c320218

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@paypal/paypal-js Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset 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.

[Bug] Incorrect types for subscription application_context

1 participant