# Create refund Refund a charge (full or partial) Endpoint: POST /v1/refunds Version: 2.0.0 Security: oAuth2 ## Header parameters: - `Idempotency-Key` (string) A unique key to make POST requests idempotent. ## Request fields (application/json): - `chargeId` (string, required) - `amount` (number,null) Partial refund amount (full refund if omitted) - `reason` (string) Enum: "duplicate", "fraudulent", "requested_by_customer", "other" ## Response 201 fields (application/json): - `refundId` (string, required) Example: "rfd_01JH..." - `chargeId` (string, required) - `amount` (number, required) - `currency` (string) - `status` (string, required) Enum: "pending", "succeeded", "failed" - `reason` (string) Enum: "duplicate", "fraudulent", "requested_by_customer", "other" - `createdAt` (string, required) ## Response 400 fields (application/json): - `traceId` (string, required) Correlation id for troubleshooting Example: "trc_01JH8K5P3V9M2K5Q7W6J3Z1A9B" - `error` (object, required) - `error.code` (string) Example: "INVALID_REQUEST" - `error.message` (string) Example: "Invalid merchant ID" - `error.details` (object) ## Response 401 fields