Skip to main content
POST
Refund a payment

Authorizations

Authorization
string
header
required

YuvexPay API key. Include as Authorization: Bearer ypk_<env>_<kid>_<secret> where <env> is test (sandbox) or live (production). Create and manage keys in the dashboard under Settings > API Keys.

Headers

X-Idempotency-Key
string
required

A unique string to ensure the request is processed only once. Must be unique per request. Valid for 24 hours.

Maximum string length: 100

Path Parameters

paymentId
string<uuid>
required

The payment ID to refund.

Body

application/json
amount
number

Refund amount. Omit for a full refund.

Required range: x >= 0.01
reason
string

Reason for the refund.

Maximum string length: 500

Response

Refund created.

refund
object