An onchain payment provider using Coinbase integration with Medusa.
If you are not familiar with Medusa, you can learn more on the project web site.
An onchain payment provider using Coinbase integration with Medusa.
yarn add medusa-payment-coinbase
or
npm i medusa-payment-coinbase
.env
file:
COINBASE_API_KEY=<YOUR_COINBASE_X-CC-Api-Key>
COINBASE_CANCEL_URL=<REDIRECT_URL_AFTER_CANCEL>
COINBASE_REDIRECT_URL=<REDIRECT_URL_AFTER_PAYMENT_COMPLETE>
medusa-config.js
, add the following at the end of the plugins
array:
const plugins = [
// ...
{
resolve: `medusa-payment-coinbase`,
options: {
api_key: process.env.COINBASE_API_KEY,
cancel_url: process.env.COINBASE_CANCEL_URL,
redirect_url: process.env.COINBASE_REDIRECT_URL,
},
},
]
After configuring and setting Coinbase as a payment provider, when you select Coinbase to complete your
payment on the storefront, you will get the checkout URL by accessing
session.data.hosted_url
,
where session
is the payment_session_data
of the selected payment provider.
If you have an idea for what could be the next highest priority functionality, do not hesitate to raise an issue here: Github issues.
This community version only enables you to create a hosted payment URL for your cart and complete the payment. The Pro version of medusa-payment-coinbase expands on the features of the free version with more advanced capabilities such as:
The Pro version is available under a commercial license. Contact abdullah-afzal for more information.