---
title: "Contract Refund"
method: POST
path: "/api/checkout/v1/refund/"
tags: ["api"]
---

# Contract Refund

`POST /api/checkout/v1/refund/`

An endpoint that accepts a request for a refund on a given contract.

## Request body

- ContractsRefund
  - `external_uuid` string, uuid, required — The UUID of the contract to be refunded.
  - `amount` string, decimal, required — Amount to be refunded
  - `amount_format` 'MINOR_UNIT' | 'DECIMAL' — The format of the amount provided. `MINOR_UNIT` = amount is an integer of the minor unit of the currency. eg 1000 is 10CHF. `DECIMAL` = Decimal representation as string. e.g. "10.00" is 10CHF * `MINOR_UNIT` - MINOR_UNIT * `DECIMAL` - DECIMAL
  - `external_reference` string — An optional reference that will be stored with the refund transaction.
  - `currency` string, required — The currency to refund.

## Response `200`

- ContractsRefundResponse
  - `success` boolean, required — Whether the refund has been processed successfully.
  - `success_message` string, required — Details of the refund.

## Other responses

- `500`

---

[API](https://skmtc.net/heylight/apis/heidipay-checkout-api.md) · [All operations](https://skmtc.net/heylight/apis/heidipay-checkout-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/heylight/heidipay-checkout-api/versions/c51570cfc888/schema)
