Skip to content

Conversation

@luancazarine
Copy link
Collaborator

@luancazarine luancazarine commented Sep 9, 2025

Resolves #18279

Summary by CodeRabbit

  • New Features
    • Expanded Stripe webhook event support across many domains (billing, financial connections, identity, issuing, payouts, quotes, refunds, setup intents, terminal, test clocks, and more) for broader trigger coverage.
  • Chores
    • Bumped versions for the Stripe package and multiple Stripe actions and sources; no functional behavior changes.
  • Notes
    • Removed several deprecated webhook events and updated one event name to align with Stripe’s current schema.

…ns and sources, enhancing functionality and consistency across the board.
@luancazarine luancazarine linked an issue Sep 9, 2025 that may be closed by this pull request
@vercel
Copy link

vercel bot commented Sep 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Sep 9, 2025 2:32pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Sep 9, 2025 2:32pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 9, 2025

Walkthrough

Patch updates versions across multiple Stripe actions and sources. Expands and revises the webhook events allowlist in components/stripe/sources/common/constants.mjs, including adding setup_intent.requires_action and numerous other events, removing deprecated ones, and renaming one event. Bumps components/stripe/package.json from 0.8.0 to 0.8.1.

Changes

Cohort / File(s) Summary of changes
Stripe Actions — version bumps
components/stripe/actions/*/*.mjs
Updated exported action metadata version fields (e.g., most 0.1.2 → 0.1.3; create-subscription 0.1.4 → 0.1.5; cancel-subscription 0.0.1 → 0.0.2; create-price/create-product 0.0.3 → 0.0.4). No logic changes.
Stripe Sources — version bumps
components/stripe/sources/abandoned-cart/abandoned-cart.mjs, .../canceled-subscription/canceled-subscription.mjs, .../custom-webhook-events/custom-webhook-events.mjs, .../new-customer/new-customer.mjs, .../new-dispute/new-dispute.mjs, .../new-failed-invoice-payment/new-failed-invoice-payment.mjs, .../new-failed-payment/new-failed-payment.mjs, .../new-invoice/new-invoice.mjs, .../new-payment/new-payment.mjs, .../new-subscription/new-subscription.mjs, .../subscription-updated/subscription-updated.mjs
Bumped exported source version fields (most 0.1.3 → 0.1.4; new-payment 0.1.4 → 0.1.5). No behavior changes.
Webhook Events Allowlist
components/stripe/sources/common/constants.mjs
Expanded WEBHOOK_EVENTS with many new event types; removed several legacy events (e.g., order., recipient., sku.*, invoiceitem.updated, transfer.failed/paid); renamed payment_method.card_automatically_updated → payment_method.automatically_updated.
Package version
components/stripe/package.json
Version bumped 0.8.0 → 0.8.1.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • lcaresia

Pre-merge checks (3 passed, 2 warnings)

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning This pull request also contains numerous version bumps across unrelated Stripe action modules and the top-level package.json, which are not specified in the linked issue and fall outside the scope of adding webhook events. Please remove or separate the unrelated version bump changes into a different pull request, keeping this one focused solely on updating the webhook events allowlist per issue #18279.
Description Check ⚠️ Warning The current description only includes “Resolves #18279” and does not follow the repository’s required template showing the “## WHY” section or explaining the rationale and context behind adding new Stripe webhook events and bumping versions. Please update the pull request description to include the “## WHY” heading and a clear explanation of the motivation and context for adding setup_intent.requires_action and other missing Stripe events, as well as the version bumps.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title accurately describes the version bump across Stripe components, which is indeed present in the changeset, but it omits the significant update to the webhook event allowlist that fulfills the primary objective of adding missing events like setup_intent.requires_action.
Linked Issues Check ✅ Passed The changes to components/stripe/sources/common/constants.mjs include the addition of setup_intent.requires_action and a comprehensive set of other missing Stripe events from the API types, fully meeting the objectives outlined in issue #18279.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Poem

A whisker twitch, a version hop,
I thump the ground—no need to stop.
New webhooks bloom, old leaves fall,
“requires_action” answers the call.
Patch by patch, I bound with glee—
Stripe sings, and so do we. 🐇✨

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 18279-stripe

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (6)
components/stripe/package.json (1)

1-19: Add alias for deprecated Stripe event
The new setup_intent.requires_action entry is present in components/stripe/sources/common/constants.mjs, but there’s no alias for the old payment_method.card_automatically_updated event alongside the new payment_method.automatically_updated. Add "payment_method.card_automatically_updated" mapped to "payment_method.automatically_updated" in the constants to maintain backward compatibility.

components/stripe/actions/update-payment-intent/update-payment-intent.mjs (1)

31-41: Don’t send empty string currency; Stripe will reject it.
Remove the default "" and include currency only when set.

-      default: "", // currency cannot be used when modifying a PaymentIntent that was created by an invoice
+      // Optional. Omit if unset; cannot be used when modifying a PaymentIntent created by an invoice.
-    const resp = await app.sdk().paymentIntents.update(id, {
-      amount,
-      currency,
+    const resp = await app.sdk().paymentIntents.update(id, {
+      amount,
+      ...(currency && { currency }),

Also applies to: 234-245

components/stripe/actions/list-invoices/list-invoices.mjs (1)

99-99: Bug: collection_method never sent due to wrong variable name.

You're destructuring collection_method (snake_case) from this, but the prop is collectionMethod (camelCase). The API payload then receives undefined.

Fix by destructuring collectionMethod and mapping it to collection_method in the request:

-      collection_method,
+      collectionMethod,
-      collection_method,
+      collection_method: collectionMethod,

Also applies to: 113-114

components/stripe/actions/create-invoice/create-invoice.mjs (1)

1-1: Parse metadata and guard automatic_tax payload to avoid invalid fields.

  • Align with update-invoice by parsing metadata JSON before sending.
  • Only include automatic_tax.liability when a liability field is set; avoid sending empty keys.

Apply:

 import app from "../../stripe.app.mjs";
+import utils from "../../common/utils.mjs";
-      ...(
-        automaticTaxEnabled
-        || automaticTaxLiabilityType
-        || automaticTaxLiabilityAccount
-          ? {
-            automatic_tax: {
-              enabled: automaticTaxEnabled,
-              liability: {
-                type: automaticTaxLiabilityType,
-                account: automaticTaxLiabilityAccount,
-              },
-            },
-          }
-          : {}
-      ),
+      ...(
+        automaticTaxEnabled || automaticTaxLiabilityType || automaticTaxLiabilityAccount
+          ? {
+              automatic_tax: {
+                enabled: automaticTaxEnabled,
+                ...(automaticTaxLiabilityType || automaticTaxLiabilityAccount
+                  ? {
+                      liability: {
+                        ...(automaticTaxLiabilityType ? { type: automaticTaxLiabilityType } : {}),
+                        ...(automaticTaxLiabilityType === "account" && automaticTaxLiabilityAccount
+                          ? { account: automaticTaxLiabilityAccount }
+                          : {}),
+                      },
+                    }
+                  : {}),
+              },
+            }
+          : {}
+      ),
-      metadata,
+      metadata: utils.parseJson(metadata),

Also applies to: 110-124, 127-131

components/stripe/sources/new-payment/new-payment.mjs (1)

17-25: Incorrect timestamp; Stripe’s event.created is seconds, and Date.parse on a number is unreliable.

Use ms by multiplying seconds; keep Date.parse as fallback for string.

-        ts: Date.parse(event.created),
+        ts: typeof event.created === "number"
+          ? event.created * 1000
+          : Date.parse(event.created),
components/stripe/actions/create-price/create-price.mjs (1)

95-129: Blocker: Avoid sending both unit_amount and custom_unit_amount.

Stripe rejects requests when both are present. Guard and build payload conditionally.

Apply this diff:

@@
   async run({ $ }) {
     const {
       createPrice,
       product,
       currency,
       active,
       unitAmount,
       customUnitAmountEnabled,
       customUnitAmountMaximum,
       customUnitAmountMinimum,
       customUnitAmountPreset,
       recurringInterval,
       recurringUsageType,
     } = this;
 
-    const response = await createPrice({
-      product,
-      currency,
-      active,
-      unit_amount: unitAmount,
-      ...(customUnitAmountEnabled && {
-        custom_unit_amount: {
-          enabled: true,
-          maximum: customUnitAmountMaximum,
-          minimum: customUnitAmountMinimum,
-          preset: customUnitAmountPreset,
-        },
-      }),
-      ...(recurringInterval && {
-        recurring: {
-          interval: recurringInterval,
-          usage_type: recurringUsageType,
-        },
-      }),
-    });
+    if (customUnitAmountEnabled && unitAmount != null) {
+      throw new Error("Provide either Unit Amount or enable Custom Unit Amount, not both.");
+    }
+    if (!customUnitAmountEnabled && (unitAmount == null)) {
+      throw new Error("Unit Amount is required when Custom Unit Amount is disabled.");
+    }
+    const payload = {
+      product,
+      currency,
+      active,
+      ...(recurringInterval && {
+        recurring: {
+          interval: recurringInterval,
+          usage_type: recurringUsageType,
+        },
+      }),
+    };
+    if (customUnitAmountEnabled) {
+      payload.custom_unit_amount = {
+        enabled: true,
+        maximum: customUnitAmountMaximum,
+        minimum: customUnitAmountMinimum,
+        preset: customUnitAmountPreset,
+      };
+    } else {
+      payload.unit_amount = unitAmount;
+    }
+    const response = await createPrice(payload);
 
     $.export("$summary", `Successfully created a new price with ID \`${response.id}\`.`);
     return response;
   },
🧹 Nitpick comments (17)
components/stripe/actions/list-payouts/list-payouts.mjs (1)

163-165: Include count in summary for better UX

Show how many payouts were returned.

-$.export("$summary", `Successfully fetched ${status ? `${status} ` : ""}payouts`);
+$.export("$summary", `Successfully fetched ${resp.length} ${status ? `${status} ` : ""}payout${resp.length === 1 ? "" : "s"}`);
components/stripe/actions/retrieve-product/retrieve-product.mjs (1)

19-20: Clarify summary copy

“line item product” is misleading here; this action retrieves a Product by ID.

-$.export("$summary", `Successfully retrieved the line item product, \`${resp.name || resp.id}\`.`);
+$.export("$summary", `Successfully retrieved the product \`${resp.name || resp.id}\`.`);
components/stripe/actions/capture-payment-intent/capture-payment-intent.mjs (1)

93-96: Use actual captured amount in summary

After capture, amount_capturable may be 0; use amountToCapture ?? resp.amount_received and include currency for accuracy.

-$.export("$summary", `Successfully captured ${amountToCapture
-  ? amountToCapture
-  : `the full ${resp.amount_capturable}`} from the payment intent`);
+$.export("$summary", `Successfully captured ${amountToCapture ?? resp.amount_received} ${resp.currency} (smallest unit) from the payment intent`);
components/stripe/actions/search-subscriptions/search-subscriptions.mjs (1)

25-29: Avoid over-fetching on the final page.
Dynamically cap limit by remaining maxResults.

-    const params = {
-      query: this.query,
-      limit: 100,
-    };
+    const params = { query: this.query };
     let hasMore, count = 0;
@@
-      const response = await this.stripe.sdk().subscriptions.search(params);
+      params.limit = Math.min(100, this.maxResults - count);
+      const response = await this.stripe.sdk().subscriptions.search(params);

Also applies to: 41-46

components/stripe/actions/update-payment-intent/update-payment-intent.mjs (1)

210-215: Descriptor length off-by-one.
Stripe allows 22 chars; code slices to 21.

-          statement_descriptor: statementDescriptor?.slice(0, 21) || undefined,
+          statement_descriptor: statementDescriptor?.slice(0, 22) || undefined,
-          statement_descriptor_suffix: statementDescriptorSuffix?.slice(0, 21) || undefined,
+          statement_descriptor_suffix: statementDescriptorSuffix?.slice(0, 22) || undefined,
components/stripe/actions/create-subscription/create-subscription.mjs (1)

168-171: Guard against empty items.
Stripe requires at least one item; add a quick validation.

-      items: utils.parseArray(items).map((price) => ({
+      items: (() => {
+        const arr = utils.parseArray(items);
+        if (!arr?.length) throw new Error("At least one price is required");
+        return arr.map((price) => ({
           price,
-      })),
+        }));
+      })(),
components/stripe/actions/cancel-payment-intent/cancel-payment-intent.mjs (1)

41-41: US English spelling in summary.
Prefer “canceled” for consistency with Stripe docs.

-    $.export("$summary", "Successfully cancelled payment intent");
+    $.export("$summary", "Successfully canceled payment intent");
components/stripe/actions/cancel-subscription/cancel-subscription.mjs (1)

21-21: US English spelling in summary.
Consistent with other components.

-    $.export("$summary", `Cancelled subscription ${this.subscriptionId}`);
+    $.export("$summary", `Canceled subscription ${this.subscriptionId}`);
components/stripe/actions/cancel-or-reverse-payout/cancel-or-reverse-payout.mjs (1)

29-43: Clarify messages and US spelling; add default branch.

  • “Cancelled” → “Canceled”.
  • Replace “Payment …” with “Payout …” for accuracy.
  • Add default to handle unexpected statuses.

Apply:

     switch (payout.status) {
     case "paid":
       resp = await this.app.sdk().payouts.reverse(this.id);
       $.export("$summary", "Successfully reversed paid payout");
       return resp;
     case "pending":
       resp = await this.app.sdk().payouts.cancel(this.id);
-      $.export("$summary", "Successfully cancelled pending payout");
+      $.export("$summary", "Successfully canceled pending payout");
       return resp;
     case "in_transit":
-      throw new Error("Payment is in transit");
+      throw new Error("Payout is in transit");
     case "canceled":
-      throw new Error("Payment has already been canceled");
+      throw new Error("Payout has already been canceled");
     case "failed":
-      throw new Error("Payment has already failed");
+      throw new Error("Payout has already failed");
+    default:
+      throw new Error(`Unsupported payout status: ${payout.status}`);
     }
components/stripe/sources/custom-webhook-events/custom-webhook-events.mjs (1)

19-21: Consider safer default than “*”.
Defaulting to all events can burn credits. Consider empty default and require explicit selection.

Apply:

-      default: [
-        "*",
-      ],
+      default: [],
components/stripe/sources/new-payment/new-payment.mjs (1)

18-23: Optional: format amount in major units and include currency.

Stripe amounts are in the smallest currency unit.

-      const amount = event.data.object?.amount;
+      const amount = event.data.object?.amount;
+      const currency = event.data.object?.currency;
@@
-        summary: `New payment${amount
-          ? " of $" + amount
-          : ""} received`,
+        summary: `New payment${
+          typeof amount === "number"
+            ? ` of ${(amount / 100).toFixed(2)}${currency ? " " + currency.toUpperCase() : ""}`
+            : ""
+        } received`,
components/stripe/actions/retrieve-payment-intent/retrieve-payment-intent.mjs (1)

25-27: Use PI ID for retrieve; accept client_secret for compatibility.
Stripe retrieve expects a Payment Intent ID; passing a client_secret as the ID can fail. Back-compat: derive the ID from the client_secret and pass client_secret as a param when present.

Apply:

-    const resp = await app.sdk().paymentIntents.retrieve(clientSecret);
+    const id = clientSecret?.includes("_secret_")
+      ? clientSecret.split("_secret_")[0]
+      : clientSecret;
+    const params = clientSecret?.includes("_secret_")
+      ? { client_secret: clientSecret }
+      : undefined;
+    const resp = await app.sdk().paymentIntents.retrieve(id, params);
components/stripe/actions/create-payment-intent/create-payment-intent.mjs (1)

79-84: Allow full 22 chars for statement descriptors.
Stripe allows up to 22 chars; slicing to 21 is unnecessarily strict.

-        statement_descriptor: statementDescriptor?.slice(0, 21) || undefined,
+        statement_descriptor: statementDescriptor?.slice(0, 22) || undefined,
...
-        statement_descriptor_suffix: statementDescriptorSuffix?.slice(0, 21) || undefined,
+        statement_descriptor_suffix: statementDescriptorSuffix?.slice(0, 22) || undefined,
components/stripe/actions/create-price/create-price.mjs (1)

89-94: Optional: Support idempotency keys for create.

Expose an optional idempotency key and pass it to prices.create to avoid accidental duplicate creations on retries.

Happy to provide a patch if desired.

components/stripe/sources/subscription-updated/subscription-updated.mjs (1)

9-9: Fix grammar in description.
Suggest clearer user-facing text.

-  description: "Emit new event on a new subscription is updated",
+  description: "Emit an event when a subscription is updated",
components/stripe/sources/common/constants.mjs (2)

2-224: Optional: guard against list drift and improve maintainability.

  • Add a lightweight CI check that validates event names against Stripe’s “Types of events” endpoint for a pinned API version, failing on unknown entries.
  • Alphabetize or group by domain for easier diff reviews (optional).

147-148: Rename is correct; no lingering references
Grep search found no instances of the old event name payment_method.card_automatically_updated; optionally add a migration note or UX guidance for users pinned to older API versions.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0151fa0 and b071844.

📒 Files selected for processing (60)
  • components/stripe/actions/cancel-or-reverse-payout/cancel-or-reverse-payout.mjs (1 hunks)
  • components/stripe/actions/cancel-payment-intent/cancel-payment-intent.mjs (1 hunks)
  • components/stripe/actions/cancel-subscription/cancel-subscription.mjs (1 hunks)
  • components/stripe/actions/capture-payment-intent/capture-payment-intent.mjs (1 hunks)
  • components/stripe/actions/confirm-payment-intent/confirm-payment-intent.mjs (1 hunks)
  • components/stripe/actions/create-billing-meter/create-billing-meter.mjs (1 hunks)
  • components/stripe/actions/create-customer/create-customer.mjs (1 hunks)
  • components/stripe/actions/create-invoice-item/create-invoice-item.mjs (1 hunks)
  • components/stripe/actions/create-invoice/create-invoice.mjs (1 hunks)
  • components/stripe/actions/create-payment-intent/create-payment-intent.mjs (1 hunks)
  • components/stripe/actions/create-payout/create-payout.mjs (1 hunks)
  • components/stripe/actions/create-price/create-price.mjs (1 hunks)
  • components/stripe/actions/create-product/create-product.mjs (1 hunks)
  • components/stripe/actions/create-refund/create-refund.mjs (1 hunks)
  • components/stripe/actions/create-subscription/create-subscription.mjs (1 hunks)
  • components/stripe/actions/delete-customer/delete-customer.mjs (1 hunks)
  • components/stripe/actions/delete-invoice-item/delete-invoice-item.mjs (1 hunks)
  • components/stripe/actions/delete-or-void-invoice/delete-or-void-invoice.mjs (1 hunks)
  • components/stripe/actions/finalize-invoice/finalize-invoice.mjs (1 hunks)
  • components/stripe/actions/list-balance-history/list-balance-history.mjs (1 hunks)
  • components/stripe/actions/list-customers/list-customers.mjs (1 hunks)
  • components/stripe/actions/list-invoices/list-invoices.mjs (1 hunks)
  • components/stripe/actions/list-payment-intents/list-payment-intents.mjs (1 hunks)
  • components/stripe/actions/list-payouts/list-payouts.mjs (1 hunks)
  • components/stripe/actions/list-refunds/list-refunds.mjs (1 hunks)
  • components/stripe/actions/retrieve-balance/retrieve-balance.mjs (1 hunks)
  • components/stripe/actions/retrieve-checkout-session-line-items/retrieve-checkout-session-line-items.mjs (1 hunks)
  • components/stripe/actions/retrieve-checkout-session/retrieve-checkout-session.mjs (1 hunks)
  • components/stripe/actions/retrieve-customer/retrieve-customer.mjs (1 hunks)
  • components/stripe/actions/retrieve-invoice-item/retrieve-invoice-item.mjs (1 hunks)
  • components/stripe/actions/retrieve-invoice/retrieve-invoice.mjs (1 hunks)
  • components/stripe/actions/retrieve-payment-intent/retrieve-payment-intent.mjs (1 hunks)
  • components/stripe/actions/retrieve-payout/retrieve-payout.mjs (1 hunks)
  • components/stripe/actions/retrieve-price/retrieve-price.mjs (1 hunks)
  • components/stripe/actions/retrieve-product/retrieve-product.mjs (1 hunks)
  • components/stripe/actions/retrieve-refund/retrieve-refund.mjs (1 hunks)
  • components/stripe/actions/search-customers/search-customers.mjs (1 hunks)
  • components/stripe/actions/search-subscriptions/search-subscriptions.mjs (1 hunks)
  • components/stripe/actions/send-invoice/send-invoice.mjs (1 hunks)
  • components/stripe/actions/update-customer/update-customer.mjs (1 hunks)
  • components/stripe/actions/update-invoice-item/update-invoice-item.mjs (1 hunks)
  • components/stripe/actions/update-invoice/update-invoice.mjs (1 hunks)
  • components/stripe/actions/update-payment-intent/update-payment-intent.mjs (1 hunks)
  • components/stripe/actions/update-payout/update-payout.mjs (1 hunks)
  • components/stripe/actions/update-refund/update-refund.mjs (1 hunks)
  • components/stripe/actions/void-invoice/void-invoice.mjs (1 hunks)
  • components/stripe/actions/write-off-invoice/write-off-invoice.mjs (1 hunks)
  • components/stripe/package.json (1 hunks)
  • components/stripe/sources/abandoned-cart/abandoned-cart.mjs (1 hunks)
  • components/stripe/sources/canceled-subscription/canceled-subscription.mjs (1 hunks)
  • components/stripe/sources/common/constants.mjs (6 hunks)
  • components/stripe/sources/custom-webhook-events/custom-webhook-events.mjs (1 hunks)
  • components/stripe/sources/new-customer/new-customer.mjs (1 hunks)
  • components/stripe/sources/new-dispute/new-dispute.mjs (1 hunks)
  • components/stripe/sources/new-failed-invoice-payment/new-failed-invoice-payment.mjs (1 hunks)
  • components/stripe/sources/new-failed-payment/new-failed-payment.mjs (1 hunks)
  • components/stripe/sources/new-invoice/new-invoice.mjs (1 hunks)
  • components/stripe/sources/new-payment/new-payment.mjs (1 hunks)
  • components/stripe/sources/new-subscription/new-subscription.mjs (1 hunks)
  • components/stripe/sources/subscription-updated/subscription-updated.mjs (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
  • GitHub Check: pnpm publish
🔇 Additional comments (68)
components/stripe/actions/list-refunds/list-refunds.mjs (2)

7-7: Version bump only — LGTM.

No logic changes; safe metadata update.


7-7: Sanity checks passed: stripe package version is 0.8.1, setup_intent.requires_action is allowlisted, deprecated payment_method.card_automatically_updated is removed, new payment_method.automatically_updated is present, and custom-webhook-events is bumped to 0.1.4.

components/stripe/actions/confirm-payment-intent/confirm-payment-intent.mjs (1)

8-8: Version bump only — LGTM.

No behavioral changes; consistent with the PR’s metadata sweep.

components/stripe/actions/create-product/create-product.mjs (1)

7-7: Version bump only — LGTM.

No logic changes detected.

components/stripe/actions/create-billing-meter/create-billing-meter.mjs (1)

7-7: Version bump only — LGTM.

No code-path changes; action remains functionally identical.

components/stripe/actions/finalize-invoice/finalize-invoice.mjs (1)

7-7: Version bump only — LGTM.

Metadata update aligns with other actions.

components/stripe/actions/create-refund/create-refund.mjs (1)

7-7: Version bump only — LGTM.

No functional diffs; safe to merge.

components/stripe/actions/list-balance-history/list-balance-history.mjs (1)

8-8: Version bump only — LGTM.

No runtime or API changes.

components/stripe/actions/update-refund/update-refund.mjs (1)

7-7: Version bump only — LGTM.

No behavior changes; consistent with PR intent.

components/stripe/actions/retrieve-payout/retrieve-payout.mjs (1)

7-7: Version bump only — LGTM

No behavioral changes detected.

components/stripe/actions/list-payouts/list-payouts.mjs (1)

8-8: Version bump only — LGTM

No logic changes observed.

components/stripe/package.json (1)

3-3: Package version bump — LGTM

Matches component version bumps.

components/stripe/actions/create-payout/create-payout.mjs (2)

7-7: Version bump only — LGTM

No runtime changes observed.


68-73: Ignore removal of “fpx” — it’s a valid source_type
Stripe’s Payouts Create API accepts exactly "card", "bank_account", and "fpx" as valid source_type values, so no change is needed. [1][2]

Likely an incorrect or invalid review comment.

components/stripe/actions/retrieve-product/retrieve-product.mjs (1)

7-7: Version bump only — LGTM

components/stripe/actions/capture-payment-intent/capture-payment-intent.mjs (1)

7-7: Version bump only — LGTM

components/stripe/actions/create-customer/create-customer.mjs (1)

9-9: Version bump only — LGTM

components/stripe/actions/retrieve-balance/retrieve-balance.mjs (1)

7-7: Version bump only — LGTM

components/stripe/actions/search-subscriptions/search-subscriptions.mjs (2)

7-7: Version bump looks good.
No logic changes; aligns with the package release.


3-8: setup_intent.requires_action webhook event coverage confirmed
WEBHOOK_EVENTS includes "setup_intent.requires_action" and custom-webhook-events.mjs (version 0.1.4) exposes it via options: constants.WEBHOOK_EVENTS.

components/stripe/actions/update-payment-intent/update-payment-intent.mjs (1)

8-8: Version bump acknowledged.
No behavioral changes detected.

components/stripe/actions/create-subscription/create-subscription.mjs (1)

8-8: Version bump OK.
No runtime changes.

components/stripe/actions/retrieve-invoice-item/retrieve-invoice-item.mjs (1)

7-7: Version bump acknowledged.
No issues found.

components/stripe/actions/cancel-payment-intent/cancel-payment-intent.mjs (1)

7-7: Version bump looks fine.
No logic changes.

components/stripe/actions/cancel-subscription/cancel-subscription.mjs (1)

7-7: Version bump confirmed.
No behavior changes.

components/stripe/actions/retrieve-checkout-session/retrieve-checkout-session.mjs (1)

7-7: Version bump OK.
Everything else is unchanged.

components/stripe/actions/retrieve-customer/retrieve-customer.mjs (1)

7-7: Version bump OK.
No further comments.

components/stripe/sources/new-dispute/new-dispute.mjs (1)

8-8: Version bump looks fine.
No behavior change. Safe to ship.

components/stripe/actions/update-customer/update-customer.mjs (1)

8-8: Version bump only.
No runtime diff. OK.

components/stripe/actions/delete-customer/delete-customer.mjs (1)

7-7: Version bump only.
No functional change. OK.

components/stripe/actions/cancel-or-reverse-payout/cancel-or-reverse-payout.mjs (1)

7-7: Version bump only.
No functional change. OK.

components/stripe/sources/new-invoice/new-invoice.mjs (1)

8-8: Version bump looks fine.
No behavior change. OK.

components/stripe/sources/custom-webhook-events/custom-webhook-events.mjs (1)

10-21: No action needed: Stripe webhook events constants are up-to-date. setup_intent.requires_action is present; payment_method.card_automatically_updated has been removed and replaced by payment_method.automatically_updated; constants.WEBHOOK_EVENTS is still exposed as options in the Custom Webhook source.

components/stripe/actions/update-invoice-item/update-invoice-item.mjs (1)

8-8: Version bump only.
No runtime changes. OK.

components/stripe/actions/list-invoices/list-invoices.mjs (1)

8-8: Version bump only — LGTM.

components/stripe/sources/canceled-subscription/canceled-subscription.mjs (1)

8-8: Version bump only — LGTM.

components/stripe/sources/new-failed-payment/new-failed-payment.mjs (2)

8-8: Version bump only — LGTM.


13-16: Event allowlist updates verified: setup_intent.requires_action is present in WEBHOOK_EVENTS; no payment_method.card_automatically_updated references remain; Custom Webhook Events source uses WEBHOOK_EVENTS for its options.

components/stripe/actions/update-invoice/update-invoice.mjs (1)

8-8: Version bump only — LGTM.

components/stripe/actions/create-invoice/create-invoice.mjs (1)

7-7: Version bump only — LGTM.

components/stripe/actions/send-invoice/send-invoice.mjs (1)

7-7: Version bump only — LGTM.

components/stripe/actions/list-payment-intents/list-payment-intents.mjs (1)

7-7: Version bump only — LGTM.

components/stripe/sources/new-payment/new-payment.mjs (1)

8-8: Version bump only — LGTM.

components/stripe/actions/retrieve-payment-intent/retrieve-payment-intent.mjs (1)

7-7: Version bump only — LGTM.
No functional changes. Safe to ship.

components/stripe/actions/retrieve-checkout-session-line-items/retrieve-checkout-session-line-items.mjs (1)

7-7: Version bump only — LGTM.
No logic changes; existing pagination limit handling remains intact.

components/stripe/actions/list-customers/list-customers.mjs (2)

8-8: Version bump only — LGTM.
No behavioral change; autoPagingToArray continues to honor limit.


8-8: Webhook events and source mapping updated

  • setup_intent.requires_action is included in constants (components/stripe/sources/common/constants.mjs:187).
  • payment_method.automatically_updated is included in constants (components/stripe/sources/common/constants.mjs:147).
  • Custom Webhook Events source pulls from constants.WEBHOOK_EVENTS (components/stripe/sources/custom-webhook-events/custom-webhook-events.mjs:18).
components/stripe/actions/create-payment-intent/create-payment-intent.mjs (1)

7-7: Version bump only — LGTM.
No functional differences detected.

components/stripe/actions/search-customers/search-customers.mjs (1)

7-7: Version bump only — LGTM.
Search query construction unchanged; existing behavior preserved.

components/stripe/actions/write-off-invoice/write-off-invoice.mjs (1)

7-7: Version bump only — LGTM.
No runtime changes; markUncollectible path unchanged.

components/stripe/actions/retrieve-price/retrieve-price.mjs (1)

7-7: Version bump only — LGTM.
No functional change to retrieval flow.

components/stripe/actions/delete-invoice-item/delete-invoice-item.mjs (1)

7-7: Version bump only — LGTM.
Delete operation unchanged; props wiring intact.

components/stripe/actions/update-payout/update-payout.mjs (1)

7-7: Patch bump only — LGTM.

No behavior change; safe to ship.

components/stripe/actions/void-invoice/void-invoice.mjs (1)

7-7: Patch bump only — LGTM.

No runtime changes.

components/stripe/actions/retrieve-invoice/retrieve-invoice.mjs (1)

7-7: Patch bump only — LGTM.

components/stripe/sources/new-failed-invoice-payment/new-failed-invoice-payment.mjs (2)

8-8: Patch bump only — LGTM.


12-16: Webhook event allowlist update verified
setup_intent.requires_action and the renamed payment_method.automatically_updated entry are present in constants.WEBHOOK_EVENTS and correctly surfaced by the Custom Webhook Events source.

components/stripe/actions/retrieve-refund/retrieve-refund.mjs (1)

7-7: Patch bump only — LGTM.

components/stripe/sources/new-subscription/new-subscription.mjs (1)

12-16: Double-check event selection matches “New Subscription” intent.

Including subscription_schedule.created alongside customer.subscription.created may surprise users expecting actual subscriptions only. Confirm this pairing is intentional.

components/stripe/actions/create-invoice-item/create-invoice-item.mjs (1)

89-106: Likely incorrect param shape for invoice item creation.

Stripe expects top-level price or amount (not nested pricing.price). Also avoid sending both.

Proposed fix:

-    const resp = await app.sdk().invoiceItems.create({
-      customer,
-      amount,
-      currency,
-      description,
-      metadata,
-      subscription,
-      invoice,
-      quantity,
-      ...(pricingPrice
-        ? {
-          pricing: {
-            price: pricingPrice,
-          },
-        }
-        : {}
-      ),
-    });
+    const body = {
+      customer,
+      currency,
+      description,
+      metadata,
+      subscription,
+      invoice,
+      quantity,
+    };
+    if (pricingPrice) {
+      body.price = pricingPrice;
+    } else {
+      body.amount = amount;
+    }
+    const resp = await app.sdk().invoiceItems.create(body);

If your SDK wrapper intentionally uses pricing, please ignore and confirm the mapper.

components/stripe/sources/subscription-updated/subscription-updated.mjs (1)

8-8: Version bump LGTM.
No functional changes; safe metadata update.

components/stripe/sources/new-customer/new-customer.mjs (1)

8-8: Version bump LGTM.
No functional changes; safe metadata update.

components/stripe/sources/common/constants.mjs (5)

187-187: Added setup_intent.requires_action — good catch.
This directly addresses #18279 and matches Stripe’s documented event. (docs.stripe.com)


94-94: invoice_payment.paid inclusion is correct.
Stripe introduced this event on May 28, 2025 for partial/multiple invoice payments. (docs.stripe.com)


208-210: Terminal reader action events look correct.
Docs list action_failed/succeeded/updated as webhook types. (docs.stripe.com)


110-110: invoice.will_be_due addition matches Stripe’s changelog.
Stripe added invoice.overdue and invoice.will_be_due webhooks on Sep 30, 2024. (docs.stripe.com)


14-24: Broad event surface updates look aligned with recent Stripe docs.
Spot-checked billing_portal, financial_connections, issuing_, payment_intent. (including partially_funded/requires_action), payout.reconciliation_completed, promotion_code., quote., refund.* and test_clock.* against docs/changelogs. All appear valid. (docs.stripe.com)

Also applies to: 57-58, 69-73, 81-88, 120-132, 133-134, 139-143, 154-155, 168-175, 177-179, 205-216

components/stripe/sources/abandoned-cart/abandoned-cart.mjs (1)

8-8: LGTM: version bump to 0.1.4

No functional changes; safe metadata update consistent with the PR scope.

Copy link
Collaborator

@jcortes jcortes left a comment

Choose a reason for hiding this comment

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

Hi @luancazarine lgtm! Ready for release!

@luancazarine luancazarine merged commit 67ab416 into master Sep 9, 2025
10 checks passed
@luancazarine luancazarine deleted the 18279-stripe branch September 9, 2025 20:37
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.

Stripe

3 participants