Create a Buy Trade - Credit Card

Changed on

This page describes how to Create a Buy Trade via API where the payment method for completing the trade is Credit Card transfer.

post/trades

Request

  • Base URL
    https://app-api.sandbox.coinify.com
  • URL
    https://app-api.sandbox.coinify.com/trades
  • Auth
    none required

Headers

Authorizationstring required

Must contain Bearer <access_token> value as received upon Authentication.

Request body

priceQuoteIdinteger required

Identifier of a valid price quote to base the trade on. Passing an invalid price quote will result in an error.

partnerContextstring json

Partner context which will be returned in trade webhooks. Can be one of object, array, string, number, true, false as defined here https://www.json.org/json-en.html.

Response

200

idinteger
trackingIdstring
statestring
traderIdinteger
traderEmailstring
inAmountinteger
inCurrencystring
outCurrencystring
outAmountExpectednumber
createTimestring
updateTimestring
isPriceQuoteApproximateboolean
quoteExpireTimestring

Example response

{
  "id": 209245,
  "trackingId": "854ce4c7-57ce-497f-ab0c-f21760f14f30",
  "state": "awaiting_transfer_in",
  "traderId": 13450,
  "traderEmail": "sni+alltest@coinify.com",
  "inAmount": 300,
  "inCurrency": "EUR",
  "outCurrency": "BTC",
  "outAmountExpected": 0.00462662,
  "transferIn": {
    "id": 621606,
    "sendAmount": 336,
    "receiveAmount": 300,
    "currency": "EUR",
    "medium": "card",
    "details": {
      "redirectUrl": "https://payment-page-ui.sandbox.coinify.com/?paymentId=1000048939&traderId=13450&country=HR&email=sni%2Balltest%40coinify.com&transferInAmount=336&transferInFeeAmount=36&transferInHandlingFee=6&transferInCurrency=EUR&transferOutAmount=0.00330962&transferOutFeeAmount=0.001317&transferOutHandlingFee=0.001317&transferOutCurrency=BTC&returnUrl=&tradeId=209245&partnerId=255&provider=safecharge&isApplePayAvailable=false",
      "provider": "safecharge",
      "cardPaymentId": "1000048939"
    }
  },
  "transferOut": {
    "id": 621607,
    "sendAmount": 0.00462662,
    "receiveAmount": 0.00330962,
    "currency": "BTC",
    "medium": "blockchain",
    "details": {
      "account": "tb1p6r5hd862alt2uwnumgse9496thxxla95ue00t3ng407j67dhh65q2kalt9"
    }
  },
  "createTime": "2024-11-05T12:51:19.034Z",
  "updateTime": "2024-11-05T12:51:19.034Z",
  "quoteExpireTime": "2024-11-05T13:00:27.450Z"
}

Changes