---
title: "Create Exchange"
method: POST
path: "/transactions/exchange"
---

# Create Exchange

`POST /transactions/exchange`

Create an exchange transaction between two OpenPayd accounts held in different currencies.

## Headers

- `idempotency-key` string

## Request body

- object
  - `quoteId` string, required — The `quoteId` can be obtained via the [Detailed Quote](https://apidocs.openpayd.com/reference/get-detailed-quote) endpoint.
  - `source` object, required — Source account in the currency that you want to SELL.
    - `identifier` string, required — Encrypted `id` of the source account. e.g. `cWc4SktyWlkxM0hwcmdYe6FMdXRSQT09`
    - `type` string, required — `ACCOUNT`
  - `destination` object, required — Destination account in the currency that you want to BUY.
    - `identifier` string, required — Encrypted `id` of the destination account. e.g.`cWc4SktyWlkxM0hwcmdYe6FMdXRSQT09`
    - `type` string — `ACCOUNT`
  - `fixedSide` string, required — The side of the exchange currency pair that you wish to fix. You can fix the `SELL` or `BUY` side i.e. the source currency or destination account.
  - `amount` object, required — Amount to be sold or bought.
    - `currency` 'AED' | 'AUD' | 'CAD' | 'CHF' | 'CZK' | 'DKK' | 'EUR' | 'GBP' | 'HKD' | 'HRK' | 'HUF' | 'ILS' | 'JPY' | 'MXN' | 'NOK' | 'NZD' | 'PLN' | 'RON' | 'RUB' | 'SAR' | 'SEK' | 'SGD' | 'TRY' | 'USD' | 'ZAR' | 'BGN', required — Three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code e.g. `EUR`
    - `value` number, float, required

## Response `200`

200

- object
  - `id` string
  - `shortId` string
  - `accountId` string
  - `createdDate` string
  - `updatedDate` string
  - `transactionId` string
  - `transactionCategory` string
  - `paymentType` unknown
  - `type` string
  - `status` string
  - `accountHolderId` string
  - `sourceInfo` object
    - `type` string
    - `identifier` string
    - `internalAccountId` string
  - `destinationInfo` object
    - `type` string
    - `identifier` string
    - `internalAccountId` string
  - `source` string
  - `destination` string
  - `fxRate` number
  - `midMarketRate` number
  - `fixedSide` string
  - `totalAmount` object
    - `value` integer
    - `currency` string
  - `amount` object
    - `value` integer
    - `currency` string
  - `buyAmount` object
    - `value` number
    - `currency` string
  - `fee` object
    - `value` integer
    - `currency` string
  - `runningBalance` object
    - `value` number
    - `currency` string
  - `failureReason` unknown
  - `comment` unknown
  - `transactionReference` unknown
  - `referenceAmount` unknown
  - `originalTransactionId` unknown

## Other responses

- `400` — 400

---

[API](https://skmtc.net/openpayd/apis/openpayd-authorization.md) · [All operations](https://skmtc.net/openpayd/apis/openpayd-authorization/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openpayd/openpayd-authorization/versions/354ac572abda/schema)
