Refund a payment
Issues a refund against the payment identified by the path id. Omit amount to refund the full captured amount, or supply a positive integer (cents) for a partial refund. Pass an idempotency-key header to make the refund safe to retry; it is forwarded to the engine.
Authentication
A scoped MvsPayApiKey, e.g. mvspay_live_…. Mint and scope keys from the dashboard (Settings → API Keys).
Path parameters
The payment id (Hyperswitch payment_intent id) to refund.
Headers
Client-supplied idempotency key; forwarded to the engine to make retries safe.
Request
Positive integer (cents) for a partial refund. Omit to refund the full captured amount.
Free-text refund reason forwarded to the engine.
Arbitrary key/value pairs forwarded to the engine.
Response
The created refund (returned under refund).
A refund as modeled by the payments engine. Loosely typed; extra Hyperswitch fields pass through. All amount fields are minor units (cents).