Stripe capability
Read a Stripe refund status
Fetch a refund by its re_ ID to check its current status. Subscribe to refund events if your application needs to react when that status changes.
Documentation reviewed
Ways to do it
API
GET /v1/refunds/{id}
Fetch a refund and inspect its status, amount, and associated payment.
- Requirements
- Stripe API key allowed to read refunds in the account and mode that created the refund. Supply the refund ID.
- Limitations
- This is a point-in-time lookup. A pending refund can change after the request returns.
Example
curl --fail --user "$STRIPE_SECRET_KEY:" "https://api.stripe.com/v1/refunds/$REFUND_ID"SDK
stripe.refunds.retrieve(id)
Read a refund with the Stripe Node.js client and branch on the returned status.
- Requirements
- An initialized Stripe client with access to the refund and its re_ ID.
- Limitations
- The method fetches one refund. Use the list endpoint if you need to find refund IDs associated with a payment.
Example
const refund = await stripe.refunds.retrieve(refundId);Webhook
refund.updated and refund.failed
Receive refund changes and failed-refund notifications at your endpoint. Store the refund ID so you can match the event to your records.
- Requirements
- A webhook endpoint subscribed to the relevant events in the correct Stripe account and mode.
- Limitations
- An event reports a change. Fetch the refund separately when you need its current state on demand.