Integrating Commerce and WooCommerce
This page explains how to integrate Coinbase Commerce and WooCommerce, a WordPress-based ecommerce platform. Integrating Woocommerce with Coinbase Commerce lets you accept cryptocurrency peer-to-peer.
Summary of Steps
This page assumes that you have a Coinbase Commerce account and a paid WooCommerce account with a store configured to receive payments.
- (In Commerce) Create an API key and copy/save your new API key.
- (In Woo) Install the Coinbase Commerce plugin (the one authored by Coinbase).
- (In Woo) Add pay method, part 1: Paste Coinbase API key and copy WooCommerce webhook URL.
- (In Commerce) Paste the Woo webhook URL and copy/save your webhook secret.
- (In Woo) Add pay method, part 2: Paste Coinbase Commerce webhook secret.
Create Commerce API Key
This section assumes that you have a Coinbase Commerce account.
-
Log in to Coinbase Commerce.
-
From your avatar, click Settings and go to the Security tab.
-
Under API keys, click New API key to generate a new key.
-
Click Copy to clipboard and securely store your new API key.
Click image to enlarge
Install Coinbase Commerce Plugin
To add a new plugin, you must have a paid WooCommerce plan.
-
Log in to your WooCommerce WordPress account.
-
From your storefront dashboard, select Plugins > Add New Plugin.
-
Search for Coinbase and select the Coinbase Commerce plugin.
-
Click Install and Activate.
Click image to enlarge
Add Coinbase Payment Method, Pt 1
To add Coinbase Commerce as a payment gateway, you must be configured for live payments (not just sandbox).
-
From your storefront dashboard, select Payments.
-
Find "Coinbase" in the list of available payment gateways.
-
Click on the Manage button on the right hand side.
Click image to enlarge This takes you to the settings page, where you can configure the plugin for your store.
Click image to enlarge -
Paste the Coinbase Commerce API key into the API Key field.
-
Copy the URL in step 2 under the Webhook Shared Secret field.
-
Leave the dialog open so you can paste the webhook secret later.
Add Webhook Subscription
-
Log in to Coinbase Commerce.
-
From your avatar, click Settings and go to the Notifications tab.
-
Under Webhook subscriptions, click Add an endpoint.
-
Paste your webhook URL and click Save.
-
Click Show shared secret, then Copy to clipboard and securely store your secret.
Click image to enlarge
Add Coinbase Payment Method, Pt 2
- Return to the WooCommerce Payments management dialog.
- Paste your Coinbase Commerce webhook secret into the Webhook Shared Secret field.
Your customers are now able to checkout and pay with crypto using Coinbase Commerce.
See Also: