How to Track if Payment is Received with API in Coinbase

0

I am using coinbase api https://github.com/coinbase/coinbase-php and I successfully created order button but I didn't found anything to confirm or track that I have received payment.

<?php
    require_once 'lib/coinbase.php';
    require_once 'config.php';
    $coinbase = Coinbase::withApiKey(Key, Secret);
    echo $coinbase->createButton("Bullion Products", "10.00", "BTC")->embedHtml;
?>

With this codes I am able to show Pay with bitcoins its showing correct values but just want to track with API that someone send me bitcoins so I'll do some action according to it.

Thanks

Mohit Bumb

Posted 2014-04-26T06:55:41.977

Reputation: 193

Answers

1

Use the callback URL, it will load it on the first confirmation.

Just have it load a URL that runs a script to notify you or record the transaction somewhere.

https://coinbase.com/api/doc/1.0/buttons/create.html

Create a payment button

This will create the code for a payment button (and modal window) that you can use to accept bitcoin on your website. You can read more about payment buttons here and try a demo. The method signature is public function createButton($name, $price, $currency, $custom=null, $options=array()). The custom param will get passed through in callbacks to your site. The list of valid options are described here.

Neil Neyman

Posted 2014-04-26T06:55:41.977

Reputation: 598