Prompt
Why are refunds not showing up in my app after the API call?
Latest observation
There are a few common reasons a refund API call succeeds but the refund doesn’t immediately appear in your app:
1) The refund is asynchronous
Many payment systems create the refund request first, then process it in the background.
So the API response may show the refund as “pending” or just “created,” but your app won’t see the final refund record until processing completes.
2) You’re only checking the charge/payment object, not the refund object
Some APIs return refunds as a separate resource. If your app only refreshes the payment/transaction record, the refund may not appear there unless you fetch or expand the refund data explicitly.
3) The refund webhook/event hasn’t been processed yet
If your app relies on webhooks to update the UI or database, the refund may not show until:
- the webhook is delivered
- your backend handles it
- your frontend refreshes the data
4) Cached data / stale UI state
Your app may be showing:
- cached API results
- local state that hasn’t been updated
- an older database record
Try forcing a refresh or re-fetching from the backend after the refund call.
5) The refund failed or is still pending
Even if the API call returned 200/201, the refund may still:
- be pending
- be queued
- fail later due to account/payment method rules
Check the refund status in the API response and in the dashboard/logs.
6) Wrong environment or account
Make sure the refund was created in the same:
- environment (test vs production)
- merchant account
- store/project
- customer record
A refund created in one environment won’t show in another.
What to check next
- Inspect the API response for refund status
- Fetch the refund directly by its refund ID
- Verify your webhook handler is receiving and processing refund events
- Confirm your app is not using cached/stale data
- Check your payment provider’s dashboard or logs
If you want, paste:
- the API endpoint you’re calling,
- the response payload, and
- how your app reads refunds,
and I can help pinpoint the exact issue.