-
Notifications
You must be signed in to change notification settings - Fork 130
Open
Description
Library used
paypal-js
🐞 Describe the Bug
TypeScript error for missing return_url and cancel_url which conflicts with guidance from this past issue: #238
🔬 Minimal Reproduction
const myButtons = buttons({
createSubscription: async (_data, actions) => {
return await actions.subscription.create({
application_context: {
brand_name: 'My Brand',
shipping_preference: 'NO_SHIPPING',
},
plan_id: 'MY_PLAN_ID',
quantity: 1
})
})😕 Actual Behavior
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 ...
🤔 Expected Behavior
No type errors when return_url and cancel_url are not specified in the application_context.
🌍 Environment
- Node.js/npm: - 22.21.0/10.9.4
- OS: - MacOS 15.6.1
- Browser: - N/A
➕ Additional Context
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels