Let's say you want to be paid in Bitcoin, and that:
- Your BTC address is
- Your service's
callback URL is http://myservice.com/payment/callback/
arrives at your website and places
, with the total of 0.001 BTC
So, you make a request to our BTC API like so:
This will generate a new payment bitcoin address, and will return a JSON, like this:
Where the address_in
is the new generated
is the BTC address you
provided (where the funds will be sent to)
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)
, 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:
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.