Create Exchange

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

post/transactions/exchange

Request

  • Base URL
    https://sandbox.openpayd.com/api
  • URL
    https://sandbox.openpayd.com/api/transactions/exchange
  • Auth
    API key in header Authorization

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
paymentTypeunknown
typestring
statusstring
accountHolderIdstring
sourcestring
destinationstring
fxRatenumber
midMarketRatenumber
fixedSidestring
failureReasonunknown
commentunknown
transactionReferenceunknown
referenceAmountunknown
originalTransactionIdunknown

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"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.