

Vendure
The Cryptonly plugin for Vendure lets your Vendure store accept cryptocurrency payments through Cryptonly’s hosted checkout.
Customers choose Cryptonly at checkout, pay on the Cryptonly payment page and return to your store. The order is placed once Cryptonly confirms the payment through a signed webhook. There is no manual reconciliation.
Setup takes four steps:
- Install the plugin
- Create a Cryptonly payment method in the Dashboard
- Redirect to the payment page from your storefront
- Add a return page that waits for the payment
How the payment flow works
Section titled “How the payment flow works”In detail:
- The customer reaches
ArrangingPayment, and the storefront calls the standardaddPaymentToOrdermutation with the Cryptonly method. - Vendure creates a Cryptonly invoice server-side, so your API key never reaches the browser. It records a payment in the
Createdstate. The cart is locked while the invoice is open. - The storefront redirects the customer to the hosted payment page (
paymentPageUrl). - Cryptonly sends signed webhooks to Vendure. The plugin verifies each one, confirms the invoice status with the Cryptonly API, and settles the payment once the invoice is
paidoroverpaid.
For details on invoices and statuses, see Invoices.
Requirements
Section titled “Requirements”| Requirement | Details |
|---|---|
| Vendure | 3.8+ |
| Node | 22.12+ |
| Cryptonly account | merchant.cryptonly.net |
| Public HTTPS server | Cryptonly must reach {host}/payments/cryptonly/{channelToken}/{paymentMethodId} |
Installation
Section titled “Installation”Install the plugin:
npm install @cryptonly/vendure-plugin-cryptonlyAdd it to vendure-config.ts:
import { DefaultEncryptionStrategy, VendureConfig } from '@vendure/core';import { CryptonlyPlugin } from '@cryptonly/vendure-plugin-cryptonly';
export const config: VendureConfig = { // ... systemOptions: { // Needed only with encryptSecrets: true encryptionStrategy: new DefaultEncryptionStrategy({ secret: process.env.VENDURE_ENCRYPTION_KEY }), }, plugins: [ CryptonlyPlugin.init({ host: process.env.VENDURE_PUBLIC_URL, // e.g. https://api.my-shop.com encryptSecrets: true, }), ],};| Option | Required | Description |
|---|---|---|
host | Yes | Public HTTPS origin of the Vendure server. Webhooks are sent to {host}/payments/cryptonly/.... Localhost and IP addresses are rejected. |
encryptSecrets | No | Store the API key and signing key encrypted, and hide them from admins without the ReadSecret permission. Requires an EncryptionStrategy with a key. Default: false. |
The plugin adds no database columns, so no migration is needed.
Payment method
Section titled “Payment method”In the Dashboard, open Settings → Payment methods, create a payment method with the code cryptonly and choose the Cryptonly crypto payments handler:


| Field | Description |
|---|---|
| API key | API key from the account Security settings. The key selects the account. |
| Webhook signing key | Signing key from the same account. Used to verify webhooks. |
| Sandbox mode | Turn on for sandbox keys. |
| Invoice lifetime (minutes) | Optional, 15 to 43200. Empty uses the account default. |
| Return URL | Your storefront’s return page, opened by the Return to button on the hosted page whatever the outcome. {orderCode} is replaced with the order code. |
Create one payment method per channel that should accept crypto. Each channel can use its own Cryptonly account.
API key scopes
Section titled “API key scopes”| Scope | Used for |
|---|---|
invoices.create | Create the invoice when the customer places the order |
invoices.list | Confirm the invoice status for webhooks and manual settlement |
invoices.cancel | Cancel the invoice when the customer leaves checkout |
The plugin sets the webhook URL on every invoice, so you do not need to configure a default webhook in the Merchant Dashboard.
Storefront
Section titled “Storefront”Redirect to the payment page
Section titled “Redirect to the payment page”The order must be in ArrangingPayment. Add the payment and send the customer to its paymentPageUrl:
const { addPaymentToOrder } = await shopApi(` mutation { addPaymentToOrder(input: { method: "cryptonly", metadata: {} }) { __typename ... on Order { code payments { method state metadata } } ... on ErrorResult { errorCode message } ... on PaymentFailedError { paymentErrorMessage } } }`);
const payment = addPaymentToOrder.payments.find( (p) => p.method === 'cryptonly' && p.state === 'Created');window.location.assign(payment.metadata.public.paymentPageUrl);If the customer places the order again while the invoice is still open, redirect to the same paymentPageUrl from activeOrder.payments. A second addPaymentToOrder returns PaymentFailedError until the order goes back to AddingItems.
Return page
Section titled “Return page”Set the payment method’s Return URL to a page such as /checkout/cryptonly/{orderCode}. Customers land there whether they paid, cancelled or let the invoice expire, so the page polls the Shop API every few seconds:
| What you see | Meaning |
|---|---|
activeOrder has this code, state ArrangingPayment | Waiting for payment: show a spinner |
activeOrder has this code, state AddingItems | Invoice cancelled or expired: send back to checkout |
orderByCode(code) returns PaymentSettled | Paid: show the order confirmation |


Ready-made helpers for both steps are in the plugin’s assets/storefront folder.
Status mapping
Section titled “Status mapping”| Cryptonly status | Vendure |
|---|---|
paid, overpaid | Payment Settled, order moves to PaymentSettled |
created, processing | Payment stays Created |
cancelled, expired, failed | Payment Declined, order goes back to AddingItems |
partially_paid, suspended | Payment stays Created and is flagged needsReview. Resolve it in the Merchant Dashboard |


Keep in mind:
- When an order leaves
ArrangingPaymentunpaid (the customer returns to the cart, or the order is cancelled), the open invoice is cancelled in Cryptonly. - Settle in the Dashboard only succeeds when Cryptonly reports the invoice as paid. Cancel is refused once the invoice has received funds.
- Refunds made in Vendure are not sent to Cryptonly. Refund the customer from the Merchant Dashboard.
For webhook signing details, see Webhooks. For sandbox testing, see Testing your integration.
Related pages
Section titled “Related pages”Support
Section titled “Support”For help with your Cryptonly merchant account, credentials, or payment questions, write to support@cryptonly.net.