Skip to content

refactor(stripe): read user invoices with the basil API version - #429

Merged
xabg2 merged 1 commit into
refactor/stripe-basil-subscriptionsfrom
refactor/stripe-basil-invoices
Oct 28, 2026
Merged

xabg2 merged 1 commit into
refactor/stripe-basil-subscriptionsfrom
refactor/stripe-basil-invoices

Conversation

@xabg2

@xabg2 xabg2 commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

What's new

  • Third step of the Stripe SDK upgrade: user invoices are now read with the new Stripe API version, while the rest of the code keeps using the current one until its turn comes.
  • Drive and object storage invoice lists keep showing the same information (plan storage and product) after the upgrade.
  • Lifetime storage stacking keeps the same rules with the new Stripe version: lifetimes paid outside Stripe or with a full discount still count, and refunded or disputed payments still don't.

Depends on #428.

@xabg2 xabg2 added the enhancement New feature or request label Oct 26, 2026
@xabg2 xabg2 self-assigned this Oct 26, 2026
@sonarqubecloud

Copy link
Copy Markdown

limit: 100,
});
const pricesById = await this.paymentsService.getPricesByIds(
invoices.map(getInvoicePriceId).filter((priceId): priceId is string => !!priceId),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit pick: I see this type guard repeated a bit. maybe extract it to utils and name what it does so its a bit more readable

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yep, we can do that, but I thought it is out of scope as I'm just trying to update the Stripe SDK. WDYT? I can do it, np.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ok sounds good, its still understandable so can be left as is

@xabg2
xabg2 requested a review from jzunigax2 October 27, 2026 14:04
return getStripeNewVersion().charges.retrieve(chargeId);
}

async getPaymentIntent(paymentIntentId: Stripe.PaymentIntent['id']): Promise<Stripe.PaymentIntent> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

unnecesary async

@xabg2
xabg2 merged commit 88eaa73 into master Oct 28, 2026
14 checks passed
@xabg2
xabg2 deleted the refactor/stripe-basil-invoices branch October 28, 2026 08:30

This branch was previously deployed

1 inactive deployment
test — 0da779ef Deployed Oct 26, 2026 by xabg2 via SonarCloud (24.11.0) #1378
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ready-for-preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants