coinbase.pug – Cryptocurrencies payment processor

View source code on Github

Coinbase allows customized easy payments processing with some cryptocurrencies like Bitcoin (BTC), Ethereum (ETH), Bitcoin Cash (BCH) and Litecoin (LTC).

../../../_images/coinbase.png

In order to use all mixins explained in this page, you need to follow next steps:

  1. Go to Coinbase Commerce page, sign up and/or sign in.
  2. Go to Dashboard. At left-bottom corner of your screen must be a button with the text Accept payments, click it.
  3. You can select between sell a product or accept donations. This option will change the process of payment.
  4. Customize your product or organization for donations and Coinbase will show you some code for embed it in your page. Search in the code the line href="https://coinbase.commerce.com... and copy the identificator located after checkout/. This one must look like 05bc9951-75aa-4c8a-b0f4-aadc0f9ad3e7. Use this identification to pass it at first parameter of +coinbase and +coinbase-default mixins.
  5. Go to Settings section and add the index url of your documentation to whitelisted domains list.

Coinbase Commerce script

mixin coinbase-script()
  script(src="https://commerce.coinbase.com/v1/checkout.js")&attributes(attributes)
+coinbase-script()

All coinbase commerce mixins doesn’t includes by default the necessary script that make works these payment implementations. You can include where you want with this mixin.

Usage

Input

+coinbase-script()

Output

<script src="https://commerce.coinbase.com/v1/checkout.js">