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

Request

  • Base URL
    https://studio-api.meganova.ai (the document declares no server; this is the origin it was published from)
  • URL
    https://studio-api.meganova.ai/admin/payments/{payment_id}/refund
  • Auth
    OAuth 2
    Password
    Token URL: auth/token

Path parameters

payment_idstring uuid required

Request body

amount_centsinteger nullable

Optional refund amount in cents (defaults to full).

reasonstring nullable

Refund reason for audit/logging.

Response

Successful Response

idstring uuid required
user_idstring uuid required
subscription_idstring uuid nullable required
payment_idstring uuid nullable required
stripe_refund_idstring required
amount_centsinteger required
currencystring required
statusstring required
reasonstring nullable required
receipt_urlstring nullable required
created_atstring date-time required

Changes

No recorded changes to this operation across all 3 revisions of this API.