We accept cryptocurrency payments with Coinbase Commerce



If you are planning to connect cryptocurrency payments and are not yet familiar with Coinbase Commerce, it is worth spending 5 minutes of your time. I'll talk about connecting, configuring and sharing ready-made open source solutions for Nodejs.



Coinbase Commerce is a crypto-acquiring service with no fees, no passports, an excellent API and your personal account.



Hello, Habr!



- . , API , .



, . , — "". , , , , .



: USD Coin, Dai, Bitcoin, Bitcoin Cash, Ethereum, Litecoin



Coinbase Commerce ( — CC).



English version.





  • USD Coin & DAI,
  • — "Coinbase", .
  • .
  • . , ,


, . , . , "" , -.







5 .



  1. email +
  2. 2


2











, CC seed-, .







seed-, CC Google Drive .













, .



  1. — \ . , .
  2. API — , . .






\ .





.





, CC , .





, , ( ).







// link
// https://commerce.coinbase.com/checkout/<id>
<a href="https://commerce.coinbase.com/checkout/<id>" target="_blank">

// embed
<div>
  <a class="buy-with-crypto"
     href="https://commerce.coinbase.com/checkout/<id>">Buy with Crypto</a>
  <script src="https://commerce.coinbase.com/v1/checkout.js?version=201807">
  </script>
</div>


API



API .





,

"checkout" https://commerce.coinbase.com/checkout/<id> , .



, , , CC .



WebHook



url Settings => Webhook subscriptions.





Webhook.site.



, , Ngrok.



// install
$ npm install ngrok -g

// `http://localhost:3000/coinbase-webhook` => `https://<ngrok-host>/coinbase-webhook`
$ ngrok http 3000


, Webhook.site Postman .



, . : charge:created, charge:confirmed, charge:failed, charge:delayed, charge:pending, charge:resolved.



Webhook





Open Source



c API — coinbase-commerce-node.







, Coinbase Commerce. .



!




All Articles