
Jika Anda berencana untuk menghubungkan pembayaran cryptocurrency dan belum terbiasa dengan Coinbase Commerce, ada baiknya menghabiskan 5 menit waktu Anda. Saya akan berbicara tentang menghubungkan, mengonfigurasi, dan berbagi solusi open source yang sudah jadi untuk Nodejs.
Coinbase Commerce adalah layanan perolehan crypto tanpa biaya, paspor, API hebat, dan akun pribadi Anda.
Halo, Habr!
- . , API , .
, . , — "". , , , , .
: USD Coin, Dai, Bitcoin, Bitcoin Cash, Ethereum, Litecoin
Coinbase Commerce ( — CC).
- —
- USD Coin & DAI,
- — "Coinbase", .
- .
- . , ,
- —
, . , . , "" , -.

5 .
- email +
- 2
2



, CC seed-, .


seed-, CC Google Drive .



, .
- — \ . , .
- 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.

, , 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.

Open Source
c API — coinbase-commerce-node.

, Coinbase Commerce. .
!