Skip to content

Stripe refund webbook #2302

@baktun14

Description

@baktun14

Why

When we issue a refund in stripe, we don't adjust the balance of the user.

What

Implement the proper webhook event handler when refunds are issued.

The webhook event in Stripe for refunds is refund.created. This event is triggered whenever a new refund is successfully created, whether it's a full or partial refund on a charge, PaymentIntent, or other payment object.

Key Details

  • When it fires: Immediately after you create a refund via the API (e.g., using the Refunds API endpoint). It includes details like the refund amount, reason, and status (typically succeeded for most cases).
  • Related events for refund lifecycle:
    • refund.updated: Fires if the refund status changes (e.g., to failed or canceled).
  • Legacy note: Older integrations might reference charge.refunded (for charge-based refunds), but as of API version 2024-10-28, Stripe unified refund events under the refund.* types for consistency across all refund scenarios, including those without a direct charge.

For full implementation, listen for this event in your webhook endpoint and verify the signature for security. See Stripe's events documentation for the exact payload structure.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions