---
title: "Contract External Trade-In"
method: POST
path: "/api/checkout/v1/external-trade-in/"
tags: ["api"]
---

# Contract External Trade-In

`POST /api/checkout/v1/external-trade-in/`

## Request

- Base URL: `https://sbx-origination.heidipay.io`
- URL: `https://sbx-origination.heidipay.io/api/checkout/v1/external-trade-in/`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/heylight/apis/heidipay-checkout-api/docs/api/checkout/v1/external-trade-in/post.ts> (a function with typed inputs; its response is checked against the schema)

An endpoint that triggers an externally-managed trade-in on a given contract.

## Request body

- ExternalTradeIn
  - `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 of the external trade-in.

## Response `200`

- ExternalTradeInResult
  - `success` string, required: Either "true" or "false".
  - `success_message` string, required: A human-readable message describing the outcome.

## Other responses

- `429`
- `500`

## Changes

- **2026-11-03** `3026811271f7`: 1 info
  - added the non-success response with the status `429`

[Operation history](https://skmtc.dev/heylight/apis/heidipay-checkout-api/changes/api/checkout/v1/external-trade-in/post.md)

---

[API](https://skmtc.dev/heylight/apis/heidipay-checkout-api.md) - [All operations](https://skmtc.dev/heylight/apis/heidipay-checkout-api/llms.txt) - [OpenAPI document](https://skmtc.dev/heylight/apis/heidipay-checkout-api/revisions/3026811271f7?raw)
