Skip to main content

benecaster_donation_received

Action Free

Fires on payment_intent.succeeded after the donation has been recorded in the database and the thank-you email has been queued. The donation is already committed when this fires — do not use it to conditionally prevent recording.

Stripe donations only. A donation made through PayPal or a link to another service (Ko-fi, Buy Me a Coffee and the like) never fires it. To react to every recorded donation, whichever way it was made, use benecaster_listener_support_donation_logged, which fires for all of them, just before this one on a Stripe donation.

Parameters

Name Type Default Description
$show_id int — ID of the show
$amount float — Donation amount in major units at the currency's own scale: 10.0 for USD 10.00, 1500.0 for JPY 1,500, 5.0 for KWD 5.000, 5000.0 for UGX 5,000 (which Stripe itself counts as 500000)
$currency string — ISO 4217 currency code, lowercase (e.g. 'usd')
$payment_data array — Full Stripe PaymentIntent object
$donation_id int — ID of the recorded donation

Need this built rather than just documented? See our services →