Вышел Модуль интеграций 2.0 для MedusaЧитать анонс
Blockonomics logo

Blockonomics

Принимайте Bitcoin-платежи в Medusa v2 через Blockonomics, сразу на собственный кошелёк продавца.

npm install @blockonomics/medusa-payment-blockonomics
Категория
Платежи
Создано
Blockonomics
Сервис
Blockonomics
Версия
1.0.2
Ежемесячные загрузки
450
Последнее обновление

Индекс качества

3/4
  • Безопасность, Пройдено5/5
    • Нет скриптов установки, Пройдено
    • Нет известных уязвимостей, Пройдено
    • Нет сообщений о вредоносном коде, Пройдено
    • Нет секретов в пакете, Пройдено
    • Нет обфускации, Пройдено
  • Совместимость, Пройдено5/5
    • Диапазоны версий Medusa, Пройдено
    • Чистая установка, Пройдено
    • Сборка, Пройдено
    • Миграции, Пройдено
    • Запуск, Пройдено
  • Сопровождение, Не пройдено4/5
    • Публичный репозиторий, Пройдено
    • Свежий релиз, Пройдено
    • Нет отставания от Medusa, Пройдено
    • Тесты в CI, Не пройденоВ репозитории нет CI, который запускает тесты.
    • Открытая лицензия, Пройдено
  • Документация, Пройдено3/3
    • Инструкция по установке, Пройдено
    • Английский язык, Пройдено
    • Переменные окружения, Пройдено

Версия 1.0.2 проверена на Medusa 2.23.1 (29 нояб. 2026 г.). Как Gorgo проверяет плагины →

Зрелость

Новый

Первый стабильный релиз 13 окт. 2026 г., 3 версии, релизы в 2 из последних 12 месяцев. Как Gorgo оценивает зрелость →

@blockonomics/medusa-payment-blockonomics

Accept Bitcoin in Medusa v2 through Blockonomics. Payments go straight to your own wallet: each checkout gets a fresh address, and Blockonomics notifies Medusa as the transaction confirms.

Blockonomics never holds funds, so refunds are manual. See Refunds.

Requirements

  • Medusa or later
  • A Blockonomics account with a store and a wallet (xPub) attached
  • A Medusa server reachable from the internet, for callbacks

Install

Configure

1. Register the plugin and the provider

Both entries are required. Without the entry, callbacks return and no payment completes.

Generate the callback secret in your project and add the printed line to with your API key:

The secret must start with . It is yours, not issued by Blockonomics.

2. Set the callback URL in Blockonomics

In the Blockonomics dashboard, under Stores, set the store's callback URL to:

https://your-store.com/hooks/blockonomics/blockonomics_blockonomics?secret=YOUR_CALLBACK_SECRET

The path is , where is the provider . Callbacks with a wrong secret are ignored, so a typo leaves orders unpaid without any error.

3. Enable the provider in a region

In the Medusa admin, under Settings → Regions, add Blockonomics () to the region.

Options

Required

  • : your Blockonomics API key.
  • : the secret in the callback URL. Starts with .

Optional

  • (default ): confirmations needed before an order is paid. takes about 10 min, about 20 min. risks double-spends.
  • (default ): how long the BTC quote stays valid, from 300 to 1800.
  • (default ): how much of a shortfall still counts as paid. = 1%.
  • (default ): how much excess is allowed before the order is flagged as overpaid.
  • : part of the store's callback URL. Needed if your account has more than one store, otherwise you get error .
  • (default ): the API base URL. Only change it for testing.

Orders

  • A transaction is seen: the order is placed with payment status Awaiting.
  • It reaches and covers the amount: Captured. Only fulfil captured orders.
  • Underpaid: the order stays Awaiting. The remainder is quoted on a new address.
  • Overpaid: the order is captured, and the admin order page shows the amount received with an Overpaid flag. Refund the difference from your wallet.
  • Never confirms: the order stays Awaiting. Cancel it in the admin.

Storefront

There is no hosted payment page. Your storefront renders the payment from the session's . is a complete payment screen in plain JavaScript that you can port.

Key fields: , , , , , (Unix ms), ( none, in progress, settled), , , (all addresses for the session).

The page should:

  1. Show a QR code for and count down to .
  2. When the quote expires, or after an underpayment confirms, call the re-quote route below. Do not create a new payment session.
  3. Listen on to detect the payment.
  4. Poll the cart until is set. Callbacks complete the order, so don't complete the cart from the storefront.

Re-quoting

This refreshes the amount once the price lock has expired. If the session has a settled underpayment, it returns a new for the remainder.

Refunds

Bitcoin payments are irreversible, and refunds cannot go through the provider. Refund in the Medusa admin throws an error. Send refunds from your wallet and record them outside Medusa.

Testing

  1. Expose your server (e.g. ngrok) and point the store's callback URL at it.
  2. Enable Testmode on the store in Blockonomics.
  3. Check out with Blockonomics, then send the amount from the Test Bench.

Callbacks arrive with status right away, after about 5 minutes and after about 10.

To test without a storefront:

License

MIT