Partner

Approximate quote

Example of query parameters

{
  "baseAmount": -100,
  "baseCurrency": "EUR",
  "quoteCurrency": "BTC",
  "transferInMedium": "card",
  "transferOutMedium": "blockchain"
}

Example response

{
  "baseAmount": -100, // Requested amount that customer specified to send
  "baseCurrency": "EUR", // Base currency that customer specified to send
  "quoteAmount": 0.0012814, // The Approximate Quote amount.
  "quoteCurrency": "BTC", // Currency the customer specified to receive
  "transferIn": { // Object with details of the incoming transaction method (from customer)
      "medium": "card", // Incoiming transaction type
      "feeAmount": 4.99, // Incoming transfer fee. Added on top of "baseAmount" on checkout. I.e. customer would pay 104.99 EUR total in this example.
      "currency": "EUR" // Incoming currency
  },
  "transferOut": { // Object with details of the outgoing transaction method (to customer)
      "medium": "blockchain", // Outgoing transaction type
      "feeAmount": 0.000195, // Outgoing transaction fee. Already included in the "quoteAmount".
      "currency": "BTC" // Outgoing currency
  }
}

GET https://app-api.coinify.com/partners/:partner-id/approximate-quote

Endpoints returns the approximate quote. If transfer media are provided (transferInMedium and transferOutMedium) transfer fees are also used for calculating the quote amount.

See request query and response example with additional info about the parameters on the right.

See trade quote for details and explanation of how to create an actual quote you can use to create a trade.

Returned quote is just approximate and can not be used as a real quote. Both transferInMedium and transferOutMedium have to be provided for transfer fees to be included.
Query params
ParameterDescription
baseAmountAmount to get a price quote for. Denominated in baseCurrency.
baseCurrencyCurrency to get a quote for.
quoteCurrencyCurrency to get the quote in.
transferInMedium(optional) Transfer in medium see payment methods.
transferOutMedium(optional) Transfer out medium see payment methods.

See more details about the approximate quote response parameters in the [trade price quote section] (#trade-quote-request).

Trader KYC

Example of JWT payload

{
  "traderId": 123,
  "externalId": "id-of-the-partner-kyc-review"
}

Example of a request

{
  "traderId": 123,
  "externalId": "id-of-the-partner-kyc-review",
  "state": "completed",
  "approveTime": "2018-11-19T01:23:35Z",
  "createTime": "2018-11-19T00:23:35Z",
  "pep": {
    "approved": true,
    "approveTime": "2018-11-19T01:23:35Z"
  },
  "sanction": {
    "approved": true,
    "approveTime": "2018-11-19T01:23:35Z"
  },
  "profile": {
    "citizenCountry": "DK",
    "name": "John doe",
    "dateOfBirth": "1988-12-14",
    "address": {
      "street": "London Street 123",
      "city": "London",
      "postalCode": "2001",
      "country": "UK"
    }
  }
}

Example of a response

{
  "id": "6b54f095-db25-4507-9912-0461fe70768f",
  "externalId": "id-of-the-partner-kyc-review"
}

POST https://app-api.coinify.com/partners/:partner-id/kyc

This endpoint will be used by partners to send us KYC review information
for traders who are KYC approved by the partner.

Please contact Coinify if you want to use this endpoint.

For trader to be approved, we also require at least one valid document, see Upload supporting documents

Authentication

To authenticate request we will use public / private key from trusted email validation.

JWT payload will be different, see example to the right

The JWT token should be sent as a Bearer token in the Authorization header like this
Authorization: Bearer <jwt_token>

Request params

Example of JWT payload

{
  "traderId": 123,
  "externalId": "id-of-the-partner-kyc-review"
}
ParameterTypeDefaultDescription
traderIdIntegerRequiredID of the trader
externalIdStringRequiredIdentifier for this KYC review
stateStringRequiredState of the review, only completed so far
approveTimeISO 8601RequiredTimestamp of approval
createTimeISO 8601RequiredTimestamp of creation
pepObjectRequiredObject containing PEP details (politically exposed person)
pep.approvedBooleanRequiredIf profile was pep checked
pep.approveTimeISO 8601RequiredTimestamp of approval
sanctionObjectRequiredObject containing sanction check details
sanction.approvedBooleanRequiredIf profile was sanction checked
sanction.approveTimeISO 8601RequiredTimestamp of approval
profileObjectRequiredContaining profile information
profile.citizenCountryISO 3166 alpha-2RequiredCitizen country code
profile.nameStringRequiredFull name of the trader
profile.dateOfBirthStringRequiredDate of birth (YYYY-MM-DD)
profile.addressObjectRequiredObject containing address details
profile.address.streetStringRequiredStreet with number
profile.address.cityStringRequiredCity
profile.address.stateStringRequiredState
profile.address.postalCodeStringRequiredPostal code
profile.address.countryISO 3166 alpha-2RequiredCountry of residence
Response

If the response status code is 500 or larger, the partner should resend request using some exponential backoff strategy.

HTTP Response codeJSON data
200 OKSuccess, review already exists (nothing changed).
201 CreatedSuccess.
400 Bad requestError interpreting the request.
401 UnauthorizedError, authentication failed.

A 200 or 201 response object contains the following fields:

KeyTypeDescription
idString (UUID)Unique identifier for the KYC review. Use this id to upload supporting documents
externalIdStringThe externalId provided in the request

Upload supporting documents

Example of JWT payload

{
  "reviewId": "6b54f095-db25-4507-9912-0461fe70768f",
  "externalId": "your-reference-for-this-document"
}

Raw HTTP Request example

POST /partners/:partner-id/kyc/:review-id/documents HTTP/1.1
Host: app-api.coinify.com
Authorization: Bearer <jwt_token>
Content-Type: image/jpeg
Content-Length: 284
X-Upload-Filename: my_filename.jpg
X-Upload-Document-Type: national_id
X-Upload-External-Id: your-reference-for-this-document

<<raw image content>>

Example response

{
  "id": "3ebb9ba1-015e-4a71-816d-56f57f711f4c",
  "externalId": "your-reference-for-this-document"
}

POST https://app-api.coinify.com/partners/:partner-id/kyc/:review-id/documents

You can upload supporting documents to an existing KYC review by making a POST request to
this endpoint, where :review-id is the id returned from the
POST /partners/:partner-id/kyc endpoint.

The body of the request must contain the raw document data

Note that the maximum file size for documents uploaded through this endpoint is 25 MB
Request headers

All of the HTTP headers in below table are required. Failure to provide either will result in an error

NameDescription
AuthorizationMust contain Bearer <jwt_token>
Content-TypeMIME type of supporting document
X-Upload-External-IdYour (partner's) reference for this document. This must match the externalId value in the supplied <jwt_token>.
X-Upload-Document-TypeDocument type. Must be one of the following values: passport, national_id, or drivers_license accompanied by a selfie.
X-Upload-FilenameOriginal filename of document
Note that this endpoint does not support Content-Type: multipart/form-data requests.
JWT payload

The JWT Bearer token supplied in the Authorization header must contain the following data: (see example to the right)

KeyTypeDescription
reviewIdString (UUID)Identifier for the review to upload document to. Must match the :review-id path parameter.
externalIdStringUnique identifier for the supporting document. Must match the X-Upload-External-Id header value provided in the request
Response

If the response status code is 500 or larger, the partner should resend request using some exponential backoff strategy.

HTTP Response codeJSON data
201 CreatedSuccess
400 Bad requestError interpreting the request.
401 UnauthorizedError, authentication failed.

A 200 or 201 response object contains the following fields:

KeyTypeDescription
idString (UUID)Unique identifier for the supporting document.
externalIdStringThe X-Upload-External-Id header value provided in the request

Supported countries

Example of the response

{
  "AT": {
    "supported": true,
    "supportedTransferInMedia": [
      "card"
    ]
  },
  "BE": {
    "supported": true,
    "supportedTransferInMedia": [
      "card",
      "bank",
      "blockchain"
    ]
  },
  "BG": {
    "supported": true,
    "supportedTransferInMedia": [
      "card",
      "bank",
      "blockchain"
    ]
  },
  "HR": {
    "supported": true,
    "supportedTransferInMedia": [
      "card",
      "bank",
      "blockchain"
    ]
  },
  ...
  "US": {
    "supported": false,
    "states": {
      "LA": {
        "supported": false,
        "supportedTransferInMedia": []
      },
      "OR": {
        "supported": false,
        "supportedTransferInMedia": [
          "card",
          "bank",
          "blockchain"
        ]
      },
      "CT": {
        "supported": false,
        "supportedTransferInMedia": [
          "card",
          "bank",
          "blockchain"
        ]
      }
      ...
    }
  }
}

GET https://app-api.coinify.com/countries/:id

This endpoint will be used by partners to get the list of supported countries and the transfer media supported in each country/state.

Request params
ParameterTypeDescription
idUUIDUUID provided to the partner
Response
HTTP Response codeJSON data
200 OKSuccess, response as shown to the right
400 Bad requestError invalid_request: id is invalid.
404 Bad requestError not_found: id is missing from the request.

Payment methods

GET https://app-api.coinify.com/partners/:id/payment-methods

This endpoint will be used by partners to get list of supported payment methods and minimum / maximum limits before signing up the trader.

Because we use individual risk assessment limits might be different for the individual trader.

You can find more info on the blockchain network and smart contract address behind each supported cryptocurrency here for:

Request params
ParameterTypeDescription
idUUIDUUID provided to the partner
Response

Response is similar to Payment methods endpoint from trader requests, except canTrade and cannotTradeReasons because they apply to individual traders.

HTTP Response codeJSON data
200 OKSuccess, response as shown to the right
400 Bad requestError invalid_request: id is invalid.
404 Bad requestError not_found: id is missing from the request.