Medusa 2 payment provider
Accept crypto payments in Medusa
A crypto payment provider for Medusa 2. Customers pay on the ArionPay page, straight to your own wallet.
Install
npm install medusa-payment-arionpayWhat it does
ArionPay for Medusa
Read more
When ArionPay confirms the full payment, its signed webhook makes Medusa authorize the payment session and turn the cart into an order, even if the customer never comes back. It is a package for developers who run their own Medusa backend and storefront.- Published on npm as medusa-payment-arionpay, with no dependencies besides Medusa itself.
- A signed invoice.paid webhook turns the cart into an order, even if the customer never comes back.
- When the storefront completes the cart, the provider asks ArionPay directly, so a lost webhook is caught.
- A session counts as paid only when ArionPay itself confirms the invoice for the same amount, currency and mode.
- If the cart changes, the next session gets a new invoice for the new total.
- Crypto payments are final, so the payment is captured at once.
- testMode is on unless you set it to false, so a missing setting never takes real money.
Requirements and licence
- Works with
- Medusa 2 · Node 20 or newer
- Tested
- Medusa 2.22.7 with Node 22 and PostgreSQL 16: 21 checks through the Store API, plus 7 unit tests
- Cost
- The plugin is free. ArionPay charges 0.5% per payment, with no monthly fee.
- Source
- Open source (MIT) on GitHub.
Setup
Set it up in 5 steps
Step 1
Install the package
Run npm install medusa-payment-arionpay in your Medusa backend.
Step 2
Register the provider
In medusa-config.ts, add medusa-payment-arionpay/providers/arionpay to the payment module with the id arionpay. Put your three ArionPay keys and your backend address in .env.
Step 3
Add it to your regions
Restart Medusa, open Settings > Regions in the admin and add ArionPay (pp_arionpay_arionpay) to each region that should offer crypto.
Step 4
Update the storefront
Create the payment session with a return_url, send the customer to session.data.invoice_url, and complete the cart when they come back.
Step 5
Test, then go live
Test mode with pretend money stays on until you set ARIONPAY_TEST_MODE to false. Check that Old ArionPay (v1) integration compatibility is off in your ArionPay store settings.
After the setup
How orders change
- When ArionPay confirms the full payment, its signed webhook makes Medusa authorize the payment session and turn the cart into an order.
- Crypto payments are final, so the payment is captured at once.
- When the storefront completes the cart, the provider asks ArionPay directly. A cart that is already an order returns that order.
- If the cart changes after the session was made, the next session gets a new invoice for the new total.
- A payment that is not exact goes to Payment Radar. A small difference inside your store's payment tolerance (default 1%) is accepted automatically; anything else you decide. Late payments still complete the order.
- The session data records the paid invoice, the coin and notes such as paid_late or underpaid_within_tolerance.
16 coins and tokens on 9 networks
All coins- BTCBitcoin
- ETHEthereum
- USDTEthereum
- USDCEthereum
- BNBBNB Smart Chain
- USDTBNB Smart Chain
- USDCBNB Smart Chain
- POLPolygon
- USDTPolygon
- USDCPolygon
- TRXTRON
- USDTTRON
- LTCLitecoin
- DOGEDogecoin
- BCHBitcoin Cash
- DASHDash
Questions about ArionPay for Medusa
Short answers before you install it.