v1

latestOpenAPI 3.1.02026-07-26290133.2 KB

Create Exchange

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

post/transactions/exchange

Headers

idempotency-keystring

Optional header for retrying requests without accidentally creating the same transaction twice.

Request body

quoteIdstring required

The quoteId can be obtained via the Detailed Quote endpoint.

fixedSidestring 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.

Response

200

idstring
shortIdstring
accountIdstring
createdDatestring
updatedDatestring
transactionIdstring
transactionCategorystring
{"stackTrail":"paths:/transactions/exchange:post:responses:200:content:application/json:schema:properties:paymentType","oasType":"schema","type":"unknown"}
typestring
statusstring
accountHolderIdstring
sourcestring
destinationstring
fxRatenumber
midMarketRatenumber
fixedSidestring
{"stackTrail":"paths:/transactions/exchange:post:responses:200:content:application/json:schema:properties:failureReason","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/transactions/exchange:post:responses:200:content:application/json:schema:properties:comment","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/transactions/exchange:post:responses:200:content:application/json:schema:properties:transactionReference","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/transactions/exchange:post:responses:200:content:application/json:schema:properties:referenceAmount","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/transactions/exchange:post:responses:200:content:application/json:schema:properties:originalTransactionId","oasType":"schema","type":"unknown"}

Example response

{
  "id": "SU96U0NnRUIwcU9scG5XMk04SjJNUT09",
  "shortId": "20201029-VXJXAP",
  "accountId": "eG5kQjFJa21OMXdQZ29QVlA1L2RZQT09",
  "createdDate": "2020-10-29T11:29:37.059Z",
  "updatedDate": "2020-10-29T11:29:37.721Z",
  "transactionId": "9ca64258-a981-4d3e-88f8-c0179d359cca",
  "transactionCategory": "OTHER",
  "type": "EXCHANGE",
  "status": "RELEASED",
  "accountHolderId": "bbb9f1eb-0d66-4168-a3e0-b2e82fe96855",
  "sourceInfo": {
    "type": "ACCOUNT",
    "identifier": "eFJocWszaEpQb01uZU0waFNWZ2p2UT09",
    "internalAccountId": "GBP09015295505470"
  },
  "destinationInfo": {
    "type": "ACCOUNT",
    "identifier": "SDV6YzhuaVdPdUVsRk0xVWwyekJYZz09",
    "internalAccountId": "EUR21348991866470"
  },
  "source": "GBP09015295505470",
  "destination": "EUR21348991866470",
  "fxRate": 1.1073,
  "midMarketRate": 1.10726,
  "fixedSide": "SELL",
  "totalAmount": {
    "value": -1,
    "currency": "GBP"
  },
  "amount": {
    "value": 1,
    "currency": "GBP"
  },
  "buyAmount": {
    "value": 1.11,
    "currency": "EUR"
  },
  "fee": {
    "currency": "GBP"
  },
  "runningBalance": {
    "value": 150.87,
    "currency": "GBP"
  }
}