Getting Started

Easiest way to get started is by using our ready do use plugins or libraries, please check our resources page
If you're a developer or you want to integrate our service with your code, just follow this guide
BTC:
https://cryptapi.io/api/btc/create/?address=1PE5U4temq1rFzseHHGE2L8smwHCyRbkx3&callback=http://example.com/callback?invoice=1234


BCH:
https://cryptapi.io/api/bch/create/?address=bitcoincash:qrz6pkvsaxmy6aypy8sdvg5l3pac8zg3qvtqdaarwq&callback=http://example.com/callback?invoice=1234


LTC:
https://cryptapi.io/api/ltc/create/?address=LLGrzcbppKCii4377sMpRiiBeNP8QjWnqt&callback=http://example.com/callback?invoice=1234


ETH:
https://cryptapi.io/api/eth/create/?address=0x76e81bf0d554c1c9237cc143905079c6a4a5bf26&callback=http://example.com/callback?invoice=1234


XMR:
https://cryptapi.io/api/xmr/create/?address=84wnBPZxhSrHFRnrHnBsnti5jZkWcXJRrYJWJ4A61xEQfJF4H8VL9RZGcvSrQKumMNFHgEqHiJvMHWkx67w64Q2sQRmkxE7&callback=http://example.com/callback?invoice=1234


IOTA:
https://cryptapi.io/api/iota/create/?address=GCSTVSRTLLPBEXZNGWTDHCGPNVARNSRXFPWGAWTQBSZLIMELSZPWKKTKXHKBXIUDNGQFHVYAZMHG9NXNDRXPRLL9ZA&callback=http://example.com/callback?invoice=1234

Fees

Fees have been moved here

Still not sure how it all works?

Here is a handy step-by-step guide:

  1. You request a new payment address from our API, with your crypto address and callback URL (e.g http://example.com/callback?invoice=1234)
  2. You present your customer with the payment address generated by our system
  3. Your customer sends the amount to the payment address our system generated
  4. Upon confirmation[1] our system forwards the payment to the address you provided when you request the address and notifies your system via the callback URL you provided with the payment details (value, TXID in, TXID out, etc)
  5. Your system confirms the payment value and grants access to the user

Practical Scenario:

Let's say you want to be paid in Bitcoin, and that:
  • Your BTC address is 1PE5U4temq1rFzseHHGE2L8smwHCyRbkx3
  • Your service's callback URL is http://myservice.com/payment/callback/

User A arrives at your website and places Order #1234, with the total of 0.001 BTC

So, you make a request to our BTC API like so:

https://cryptapi.io/api/btc/create/?address=1PE5U4temq1rFzseHHGE2L8smwHCyRbkx3&callback=http://myservice.com/payment/callback/?invoice=1234&nonce=randomstring

This will generate a new payment bitcoin address, and will return a JSON, like this:
{
    "status": "success",
    "callback_url": "http://myservice.com/payment/callback/?invoice=1234&nonce=randomstring",
    "address_in": "1SKNHcxFc1bFccqPd5g3En4j2WCVX3Dqc",
    "address_out": "1PE5U4temq1rFzseHHGE2L8smwHCyRbkx3"
}

Where the address_in is the new generated address, the address_out is the BTC address you provided (where the funds will be sent to) and callback_url is the URL you provided, where the payment confirmation will be sent to.

You save this data on your side and present the address_in to your customer, along with the value of invoice (in this case 0.001 BTC)
Your customer sends the 0.001 BTC to that address and whenever the payment is confirmed (has 1 confirmations)[1], our system forwards the payment to the BTC address you provided (address_out). After this, our system will make a GET request to the callback URL you provided, with the payment details.

In this example, the callback request would look something like the following:
http://myservice.com/payment/callback/?invoice=1234&nonce=randomstring&value=100000&address_in=1SKNHcxFc1bFccqPd5g3En4j2WCVX3Dqc&address_out=1PE5U4temq1rFzseHHGE2L8smwHCyRbkx3&txid_in=33f11611f863d7475eb10daada2f225f0877561cf58cdfff175e99635dfd9120&txid_out=5ea53d5e728bfdb56b54c0b945990b69ae1e66cec56ab24679c9a622c4695276&confirmations=1&coin=btc

Upon receiving this request, you can validate the invoice, check if the value matches and save the transaction IDs (TXID).

It's also very much recomended for you to provice a nonce, which is a random string you generate, that you validate when you receive our request, to make sure the request is coming from us.
[1] in case you append the pending=1 parameter to the address request, you will be notified twice, once when the transaction is first seen on the network, and another when confirmed.

Read the full documentation and try it here.

Terms and Conditions
Privacy Policy
© 2019 CryptAPI Ltd
Review us on
Trustpilot