latestOpenAPI 3.1.02026-08-10466368560.6 KB
2b2bab8b9017
admin
Refund Payment
Issue a Stripe refund for a payment.
After refund:
- For subscription payments: cancel subscription and downgrade user to free tier
- For credit pack payments: deduct the corresponding credits from user
Security:
- Uses FOR UPDATE lock to prevent race conditions
- Only allows full refund of remaining credits (no partial refunds)
- Aborts if Stripe subscription cancellation fails
post/admin/payments/{payment_id}/refund
Path parameters
payment_idstring uuid required
Request body
Response
Successful Response