Skip to content

fix: Make return_url and cancel_url optional in application_context for subscriptions#789

Closed
danqzq wants to merge 2 commits into
paypal:mainfrom
danqzq:fix/subscription-application-context
Closed

fix: Make return_url and cancel_url optional in application_context for subscriptions#789
danqzq wants to merge 2 commits into
paypal:mainfrom
danqzq:fix/subscription-application-context

Conversation

@danqzq

@danqzq danqzq commented Jan 10, 2026

Copy link
Copy Markdown

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

changeset-bot Bot commented Jan 10, 2026

Copy link
Copy Markdown

🦋 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

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

@github-actions github-actions Bot added the Stale label Apr 11, 2026
@danqzq

danqzq commented Apr 12, 2026

Copy link
Copy Markdown
Author

bump

@github-actions github-actions Bot removed the Stale label Apr 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

@github-actions github-actions Bot added the Stale label Jul 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened.

@github-actions github-actions Bot closed this Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Incorrect types for subscription application_context

1 participant