-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Fix: support invoice creation without line items. Stripe. #16392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: support invoice creation without line items. Stripe. #16392
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
|
@SokolovskyiK is attempting to deploy a commit to the Pipedreamers Team on Vercel. A member of the Team first needs to authorize it. |
|
""" WalkthroughThe change modifies the Changes
Assessment against linked issues
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
components/stripe/actions/create-invoice/create-invoice.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs components/stripe/stripe.app.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (4)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified. |
|
Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
components/stripe/stripe.app.mjs (1)
661-663: Beware of global Stripe API version upgrade
UpgradingapiVersionto"2022-11-15"unlocks draft‐invoices‐without‐items support but also shifts behavior across all Stripe resources (e.g., invoice, payment intents, customers). Please ensure you:
- Add or update integration/regression tests for critical workflows (
createPaymentIntent,createCustomer,createInvoice, etc.).- Update the project changelog and communicate this bump to users.
- Consider making the API version configurable (via an environment variable) to allow opt‑in upgrades per integration.
Suggested diff to make version pluggable:
sdk() { return stripe(this._apiKey(), { - apiVersion: "2022-11-15", + apiVersion: process.env.STRIPE_API_VERSION || "2022-11-15", maxNetworkRetries: 2, }); }
michelle0927
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for your contribution! Approved and ready for QA!
|
@michelle0927 Thank you =) |
Fixes #16354
What’s Fixed
This PR allows Stripe invoices to be created without line items, using:
collection_method: "send_invoice"due_dateordays_until_dueThis works as expected in newer Stripe API versions, but fails in the old one (2020-03-02) with:
What Changed
apiVersionused insidethis.stripe.sdk()from"2020-03-02"→"2022-11-15"This PR does not touch any other action logic, but upgrades the Stripe API version globally inside
this.stripe.sdk().That means:
Suggested Next Steps
create-payment-intent,create-customer, etc.).sdkNew()).Why It Matters
This bug was open for 5+ days and is blocking users from creating draft invoices correctly — a required flow for many billing pipelines.
Let me know if you’d like help writing regression tests or scoping this into a safer "v2" variant!
Summary by CodeRabbit