Skip to content

fix(api): [AB#288] guard null StripeConnectAccountId before refund#297

Merged
bllr777 merged 1 commit into
mainfrom
feature/288-fix-stripe-refund-exception-handling
May 17, 2026
Merged

fix(api): [AB#288] guard null StripeConnectAccountId before refund#297
bllr777 merged 1 commit into
mainfrom
feature/288-fix-stripe-refund-exception-handling

Conversation

@bllr777
Copy link
Copy Markdown
Collaborator

@bllr777 bllr777 commented May 17, 2026

Added an early-return guard in PaymentController.RefundPayment: if the provider is Stripe and the org's StripeConnectAccountId is null or whitespace, return a 400 with a descriptive message before attempting the refund. This prevents the 'No such payment_intent' error that occurs when the refund is sent to the platform account instead of the connected account.

Changes:
[1] Early BadRequest when StripeConnectAccountId is missing for a Stripe refund

References:
[1] JobFlow.API/Controllers/PaymentController.cs:457

Added an early-return guard in PaymentController.RefundPayment: if the provider is Stripe and the org's StripeConnectAccountId is null or whitespace, return a 400 with a descriptive message before attempting the refund. This prevents the 'No such payment_intent' error that occurs when the refund is sent to the platform account instead of the connected account.

Changes:
[1] Early BadRequest when StripeConnectAccountId is missing for a Stripe refund

References:
[1] [JobFlow.API/Controllers/PaymentController.cs:457](https://github.com/Katharix/JobFlow.API/blob/feature/288-fix-stripe-refund-exception-handling/JobFlow.API/Controllers/PaymentController.cs#L457)
@bllr777 bllr777 merged commit 967b4b4 into main May 17, 2026
8 checks passed
@bllr777 bllr777 deleted the feature/288-fix-stripe-refund-exception-handling branch May 17, 2026 02:20
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.

1 participant