medusa-payment-coinbase
X
If you are not familiar with Medusa, you can learn more on the project web site.
Note: This plugin will be migrated to Medusa v2, when v2 reaches production readiness.
What is it?
An onchain payment provider using Coinbase integration with Medusa.
How to Install
- Install the package with
yarn add medusa-payment-coinbase
ornpm i medusa-payment-coinbase
- Set the following environment variables in your
.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>
- In
medusa-config.js
, add the following at the end of theplugins
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, }, }, ]
- Start the project
- After installation, you will see a new payment provider in regions named CoinBase.
Test the Plugin
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.
Proposals, Bugs, Improvements
If you have an idea for what could be the next highest priority functionality, do not hesitate to raise an issue here: Github issues.
License
MIT
Pro Version
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:
- Automatic authorization of payment and placing an order after completing the payment
- Automatic payment capture for orders
- Webhooks
- Refund and delete payment
- Dedicated integration support for your project (Diamond package)
The Pro version is available under a commercial license. Contact abdullah-afzal for more information.
© 2024 abdullah-afzal