Skip to content

Added handler for bad email error while stripe user creation#7956

Open
FilinBrChaos wants to merge 3 commits into
developfrom
plyshnykov/otr-2419-rcm-ehr-when-taking-patient-payment-via-stripe-bad-email
Open

Added handler for bad email error while stripe user creation#7956
FilinBrChaos wants to merge 3 commits into
developfrom
plyshnykov/otr-2419-rcm-ehr-when-taking-patient-payment-via-stripe-bad-email

Conversation

@FilinBrChaos

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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.

Pull request overview

This PR improves Stripe customer handling in zambdas to prevent failures when a patient/guarantor email address is rejected by Stripe, and to ensure a Stripe customer exists before sending an invoice.

Changes:

  • When creating a Stripe customer, catch invalid email errors and retry customer creation without an email address.
  • When updating a Stripe customer, catch invalid email errors and retry the update without the email field.
  • In the invoice-sending task, create a Stripe customer ID on-demand when it’s missing from the Account.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/zambdas/src/subscriptions/task/sub-send-invoice-to-patient/index.ts Creates a Stripe customer ID on-demand instead of hard-failing when missing.
packages/zambdas/src/shared/stripeIntegration.ts Adds retry logic for Stripe customer creation when Stripe rejects the email field.
packages/zambdas/src/ehr/shared/harvest/index.ts Adds retry logic for Stripe customer updates when Stripe rejects the email field.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/zambdas/src/shared/stripeIntegration.ts
Comment thread packages/zambdas/src/ehr/shared/harvest/index.ts
@FilinBrChaos FilinBrChaos requested review from VladMstv and rzinger June 4, 2026 17:11
@FilinBrChaos FilinBrChaos changed the base branch from develop to release/1.36 June 11, 2026 10:07
Base automatically changed from release/1.36 to develop June 13, 2026 06:05
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.

2 participants