# Refund a payment (/api/payments/create-payment-refund)

`POST https://api.comecero.com/api/v1/payments/{payment_id}/refunds`

Gives money back on a captured payment, in full or in part. Money moves back to the shopper's payment method and refund events fire. Secret and trusted tokens that may create refunds only; a limited token gets `403`.

## Parameters

- `payment_id` (path, required): The id of the payment.
- `expand` (query): Comma-separated child objects to return in full instead of as a URL, for example `customer,payments`. Use dot notation for nested objects (`items.product`), up to four levels deep. A single object takes up to 12 paths; a list takes up to 2, applied to every item. Extra paths are dropped without an error. See [Expanding objects](https://docs.comecero.com/docs/basic-concepts/expanding-objects).
- `formatted` (query): When `true`, the object also has a `formatted` child with amounts and dates as display text in the shopper's language and currency (for example `$19.99` or `November 7, 2026`). The default is `false`. See [Localized formatting](https://docs.comecero.com/docs/basic-concepts/localized-formatting).

Request body: the `refund_request` schema.

Responses: 201, 400, 401, 402, 403, 404, 409, 422, 500.

Full schemas: operation `create_payment_refund` in /openapi.json.