Cancel a payment

Cancels a payment that has not yet captured. Accepts cancellation_reason (or reason). Honors an Idempotency-Key header.

Authentication

x-api-keystring

A scoped MvsPayApiKey, e.g. mvspay_live_…. Mint and scope keys from the dashboard (Settings → API Keys).

Path parameters

idstringRequired
The payment id.

Headers

Idempotency-KeystringOptional

Request

This endpoint expects an object.
cancellation_reasonstringOptional
reasonstringOptional

Alias for cancellation_reason.

Response

The cancelled payment (returned under transfer).

transferobject

Hyperswitch payment_intent response. Loosely typed; extra Hyperswitch fields pass through.

Errors

401
Unauthorized Error
500
Internal Server Error
502
Bad Gateway Error