Switching to Production

After successful integration with Sandbox environment, you are ready to switch to Production integration.

Contact us

When Sandbox integration is complete, please contact our support to set-up access to Production accounts.

The rest of the setup is exactly the same as on Sandbox environment

Example

Basic information about the requests

  • To authorize in Bitclear API you have to use basic auth over https. Set the username as the API Key ID and password as API Key Secret which was generated when the key was created.

  • The url to sandbox environment is: https://api.bitclear.li/v3/.

  • All available endpoints are described in OpenAPI Specification

Request and response

curl --request 'POST' \
  --user '$API_KEY_ID:$API_KEY_SECRET' \
  --header 'Content-Type: application/json' \
  --data '{"priceAmount":"1.23","priceCurrency":"USD","externalPaymentId":"123456789abcdef","notificationUrl":"http://localhost:8888/helloPayment","transferCurrency":"BTC","walletMessage":"Barber for Gandalf"}' \
  'https://api.bitclear.li/v3/payments'

Request:

POST /v3/payments HTTP/1.1
Accept: application/json, */*
Accept-Encoding: gzip, deflate
Authorization: Basic b25lS2V5X3RvUnVsZV90aGVtQWxsOkxyY3lYb2VGRjM1T2tjMlhXZHVKYzBhMzBPOGl4Wlo5
Connection: keep-alive
Content-Type: application/json
Host: api.bitclear.li

{
    "priceAmount": "1.23",
    "priceCurrency": "USD",
    "externalPaymentId": "123456789abcdef",
    "walletMessage": "Barber for Gandalf",
    "notificationUrl": "http://localhost:8888/helloPayment",
    "transferCurrency": "BTC"
}

Response:

HTTP/1.1 200 OK
Content-Length: 655
Content-Type: application/json
Date: Wed, 08 Apr 2020 13:10:45 GMT
Server: Bitclear API

{
    "priceAmount": 1.23,
    "priceCurrency": "USD",
    "address": "2N3kVr2CHHt2pSdCidq4dwZBFeBnMQhvaka",
    "expirationTime": "2020-04-08T13:12:45.239167Z",
    "guaranteedExchangeRate": 6493.57142857,
    "notificationUrl": "http://localhost:8888/helloPayment",
    "paidPriceAmount": 0.0,
    "paidTransferAmount": 0.0,
    "acceptedPaidPriceAmount": 0.0,
    "acceptedPaidTransferAmount": 0.0,
    "pendingPaidPriceAmount": 0.0,
    "pendingPaidTransferAmount": 0.0,
    "transferAmount": 0.00018942,
    "transferCurrency": "BTC",
    "paymentId": "8618ed13372b483b84d56c0cc5509a401c182d9e4dc04824a6ffddd8473753a3",
    "paymentPageUrl": "https://payments.bitclear.li/payments/8618ed13372b483b84d56c0cc5509a401c182d9e4dc04824a6ffddd8473753a3",
    "paymentUri": "bitcoin:2N3kVr2CHHt2pSdCidq4dwZBFeBnMQhvaka?amount=0.00018942&label=&message=Barber%20for%20Gandalf",
    "status": "NEW",
    "transactions": []
}