PayCryptoHost — non-custodial crypto payment gateway

How to Accept Bitcoin Payments on Magento / Adobe Commerce

Magento stores tend to be developer-supported, which makes the API route the natural fit. You add an offline payment method, call the PayCryptoHost invoice API at order placement, and consume the webhook to move the order through the invoice-and-ship flow.

Integration method
REST API
Time needed
About an hour for a developer
Skill level
Developer

Before you start

  • A free PayCryptoHost account.
  • Your Bitcoin extended public key (xPub / zPub) from a wallet you control — Sparrow, Electrum, BlueWallet, Trezor or Ledger all export one.
  • Admin access to your store or billing panel.
  • Magento 2.4+ and a developer who can add a payment module or observer.

An extended public key only lets software watch addresses and derive new ones — it can never move funds. Never paste a private key or seed phrase anywhere, including here.

Step-by-step setup

  1. 1

    Create a restricted API key

    Generate a PayCryptoHost API key and store it in Magento's encrypted configuration, never in source control.

  2. 2

    Add an offline payment method

    Register a payment method so 'Pay with crypto' appears at checkout for the customer to select.

  3. 3

    Create the invoice on order placement

    In a sales_order_place_after observer, POST the order total and currency to the invoice endpoint and store the returned payment ID on the order.

  4. 4

    Redirect to the hosted invoice

    Send the customer to the returned payment URL, which shows the amount, address, QR code and live confirmation status.

  5. 5

    Handle the webhook

    Expose a controller that verifies the webhook signature, then creates the Magento invoice on confirmation.

  6. 6

    Test in staging first

    Run the full cycle on staging with a small real payment before enabling in production.

What you get

  • Full control over checkout UX on a platform you already self-host.
  • Self-custodial settlement with no processor holding enterprise volume.
  • Signed webhooks make reconciliation deterministic.
  • Same API powers headless PWA storefronts.

Troubleshooting

Webhook signature verification fails

Verify against the raw request body before any JSON parsing or middleware transformation — re-serialising the payload changes the bytes and breaks the HMAC.

Order placed but no invoice created

Check the observer is registered for the right area and inspect exception.log; a failed API call should never silently swallow the error.

Frequently asked questions

Is there an official Magento extension?

The integration is API-first today. Magento builds vary widely, so a thin custom module against the REST API is usually less fragile than a generic extension.

Does it work with headless Magento?

Yes — the invoice API and webhooks are transport-agnostic and work the same behind a PWA storefront.

Ready to take your first crypto payment?

Create an account, add your xPub, and send a test invoice — most merchants are live the same day.

Other platform guides

See all platform integrations, browse industry guides, or compare us against other gateways.