Skip to content

feat(stripe): handle refund webhook events#2218

Open
dragosp1011 wants to merge 4 commits into
mainfrom
dragos/int1-669-stripe-refund
Open

feat(stripe): handle refund webhook events#2218
dragosp1011 wants to merge 4 commits into
mainfrom
dragos/int1-669-stripe-refund

Conversation

@dragosp1011

@dragosp1011 dragosp1011 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Context

Changes

  • Add Stripe refund webhook handling
    • On refund.created / refund.updated with status: succeeded: verify original payment exists, validate wallet/currency/balance, reverse GateHub (user → settlement), insert OUTGOING COMPLETED tx
    • Log only for refund.failed and charge.refunded; terminal failures log + return 200 (no Stripe retry)

@github-actions github-actions Bot added package: wallet/backend Wallet backend implementations type: test Improvements or additions to tests type: source Source changes labels Jun 30, 2026
})
} catch (error) {
this.logger.error('Error creating gatehub transaction', { error })
this.logger.error('Error creating gatehub transaction', {

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.

Suggested change
this.logger.error('Error creating gatehub transaction', {
this.logger.error('Error creating GateHub transaction', {

return
}

this.logger.error('Error reversing gatehub transaction for refund', {

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.

Suggested change
this.logger.error('Error reversing gatehub transaction for refund', {
this.logger.error('Error reversing GateHub transaction for refund', {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: wallet/backend Wallet backend implementations type: source Source changes type: test Improvements or additions to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants