Vendure plugin for Coinbase payments
npm install @pinelab/vendure-plugin-coinbaseAccept crypto payments via Coinbase Commerce in Vendure.
Add the plugin to your vendure-config.ts:
``ts
import { CoinbasePlugin } from "@pinelab/vendure-plugin-coinbase"
plugins: [
CoinbasePlugin,
...
];
`
1. Start your server
2. Go to the Admin UI > Settings > Payment methods and add a payment method with handler coinbase-payment-handlerhttps://storefront/order/
3. Set your Coinbase API key. You can find your API key at https://beta.commerce.coinbase.com/settings/security
4. Set your desired storefront redirectUrl, something like . Your customer will be redirectedhttps://storefront/order/897HH7HG7
to this page + order code:
5. Save the payment method
1. Go to https://beta.commerce.coinbase.com/settings/notifications
2. Add a new webhook with endpoint https://
You can now call the mutation createCoinbasePaymentIntent to get a redirectUrl to the Coinbase hosted checkout page.https://storefront/order/897HH7HG7
You can redirect your customer to this URL, so your customer can continue making a payment on the Coinbase platform.
After payment the customer will be redirected to
- Orders are NOT transitioned to PaymentSettled` directly after Coinbase redirects the customer to the confirmation page, because
crypto transactions can take some time to confirm. You should notify your customer with a message that the order will be
handled when their transaction is confirmed. This can take a few minutes.
- Refunds are not supported. If you want to refund a payment done via Coinbase you need to manually do so. This plugin will not do refunds via
Coinbase.