Fireship · @fireship

Get Paid with Crypto in your App // Coinbase Commerce Tutorial

Uploaded March 31, 2021 · Length 8:02

Get Paid with Crypto in your App // Coinbase Commerce Tutorial

Summary

Implement cryptocurrency payments on the web using Coinbase Commerce API, allowing users to receive crypto payments in various formats.

  • coinbase commerce tutorial
  • crypto payments on the web
  • coinbase api integration
  • cryptocurrency payment processing
  • webhook notifications

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:00

    as of last week a tesla can be paid for

  2. 0:02

    with bitcoin

  3. 0:03

    as of this week all fire ship courses

  4. 0:05

    can be paid for with bitcoin and as of

  5. 0:06

    the end of this video

  6. 0:08

    your product can also be paid for with

  7. 0:10

    bitcoin i've always been pretty

  8. 0:11

    skeptical of crypto but the more i work

  9. 0:12

    with it as a developer and the more the

  10. 0:14

    fed runs the money printer the more i

  11. 0:16

    like it

  12. 0:16

    but most importantly i want to give my

  13. 0:18

    customers choice if the customer wants

  14. 0:20

    to pay with bitcoin

  15. 0:21

    ethereum litecoin or whatever they

  16. 0:23

    should have that option

  17. 0:24

    in today's video you'll learn how to

  18. 0:25

    implement cryptocurrency payments on the

  19. 0:27

    web

  20. 0:27

    using the coinbase commerce api giving

  21. 0:30

    you the ability to receive crypto

  22. 0:31

    payments in a variety of different

  23. 0:32

    formats first of all how does a

  24. 0:34

    cryptocurrency payment work

  25. 0:36

    well unlike a credit card payment which

  26. 0:37

    is processed by a central authority

  27. 0:39

    a crypto payment gets broadcast to a

  28. 0:41

    peer-to-peer network around the world

  29. 0:43

    where miners compete with their

  30. 0:44

    computing power to confirm that

  31. 0:46

    transaction on the blockchain

  32. 0:48

    that process can take time maybe 10

  33. 0:50

    minutes or so before the transaction is

  34. 0:52

    fully confirmed on coinbase commerce

  35. 0:54

    the first thing you'll do is create a

  36. 0:56

    charge which is more like a payment

  37. 0:57

    intent

  38. 0:58

    it has an amount and description and can

  39. 1:00

    be denominated in us dollars when a

  40. 1:02

    charge is created it has a lifespan of

  41. 1:04

    one hour

  42. 1:05

    and coinbase in the background will

  43. 1:06

    monitor the payment networks

  44. 1:08

    looking for a payment to be confirmed on

  45. 1:10

    this charge the charge

  46. 1:11

    also provides a url hosted by coinbase

  47. 1:14

    where the user can either pay with

  48. 1:15

    crypto or their coinbase account

  49. 1:17

    now after the user submits their payment

  50. 1:19

    coinbase will fire a web hook

  51. 1:21

    that can notify your server that the

  52. 1:23

    charge is now pending

  53. 1:24

    it's at that point that you can notify

  54. 1:26

    the customer that the payment has been

  55. 1:27

    received and we're just waiting for the

  56. 1:29

    final confirmation on the blockchain

  57. 1:30

    before we ship it out at some point in

  58. 1:32

    the future

  59. 1:33

    coinbase will see the transaction is

  60. 1:34

    confirmed and will send another web hook

  61. 1:36

    to your server

  62. 1:37

    notifying you that everything is good to

  63. 1:39

    go unless something went wrong

  64. 1:40

    like a user may have overpaid or

  65. 1:42

    underpaid because crypto is so volatile

  66. 1:44

    or maybe they accidentally made multiple

  67. 1:46

    payments on the same charge in which

  68. 1:48

    case you'll need to manually resolve the

  69. 1:50

    charge

  70. 1:50

    things like that shouldn't happen often

  71. 1:52

    but those are just some of the caveats

  72. 1:53

    to be aware of when working with crypto

  73. 1:55

    in addition to coinbase commerce you

  74. 1:57

    might also look into bitpay

  75. 1:58

    or coingate as alternatives or if you