Paycryptohost

REST API · v1

Paycryptohost API

Create Bitcoin invoices, query their status, and react to confirmations in real time. All endpoints return JSON. Authentication uses bearer tokens scoped to a single merchant account.

PayCryptoHost Plugin

Accept Bitcoin on any WooCommerce store. Funds settle straight to your wallet — Paycryptohost never holds your coins.

Download plugin (v1.5.1)
paycryptohost-bitcoin-payments.zipv1.5.1

Requires WordPress 6.0+, WooCommerce 8.0+, PHP 7.4+. Works with both Classic and Block Checkout.

Install in 4 steps

1

Download the .zip

Click the orange Download plugin button above and save the file.
paycryptohost-bitcoin-payments.zip ↓
2

Upload to WordPress

In WP admin go to Plugins → Add New → Upload Plugin, choose the zip, click Install Now.
Plugins → Add New → [Upload Plugin]
3

Activate

Once installed click Activate Plugin. A new PayCryptoHost item appears in the sidebar.
[ Activate Plugin ]
4

Paste your API Key

Open PayCryptoHost → Settings, paste the API Key from your dashboard, save.
API Key: pch_live_••••••••

Generate your key under Dashboard → API Keys. The plugin only needs the API Key — no secret, no merchant ID.

Verify it works

  1. In PayCryptoHost → Settings click Test connection — you should see a green Connected badge.
  2. In PayCryptoHost → Wallet, paste your Bitcoin receiving address (bc1…, 1…, or 3…) and click Save & verify address. PayCryptoHost validates the format and registers it for direct deposits.
  3. Place a test order on your store — Pay with Bitcoin (PayCryptoHost) must appear at checkout.

Troubleshooting

"There are no payment methods available."

Your store uses Block Checkout. Make sure you are on v1.2.0 or newer — Block Checkout support is built in. Deactivate older versions and re-upload the latest zip above.

"Invalid credentials" / 401 on Test connection

The API Key in Settings does not match an active key. Copy a fresh Active key from your dashboard → API Keys and save again. Keys start with pch_live_ or pch_test_.

Bitcoin address rejected as invalid

Make sure the address starts with bc1, 1, or 3 and has no spaces. Only standard Bitcoin (BTC) addresses are accepted — Lightning, BCH and other formats are rejected.

"Key is suspended" / 403

Your API Key was disabled. Rotate or create a new one under Dashboard → API Keys, then update the plugin Settings.

Plugin menu does not appear after activation

WooCommerce must be installed and active first. Install WooCommerce, then re-activate PayCryptoHost.

You keep custody

Customers pay BTC directly to the Bitcoin address you registered. Paycryptohost never touches the funds.

WHMCS module

Accept Bitcoin on any WHMCS install. Unique address per invoice, signed webhooks, auto-mark as paid — funds settle straight to your wallet.

Download module (v1.0.0)
paycryptohost-whmcs.zipv1.0.0

Requires WHMCS 8.0+, PHP 7.4+, cURL + OpenSSL. Module path: modules/gateways/paycryptohost.

Install in 5 steps

1

Download the .zip

Click the orange Download module button above.
paycryptohost-whmcs.zip ↓
2

Upload to WHMCS

Extract the zip and upload the modules/ folder via FTP/SSH so files land at /whmcs/modules/gateways/paycryptohost.php.
modules/gateways/paycryptohost*
3

Activate gateway

WHMCS Admin → Configuration → System Settings → Payment Gateways → All Payment Gateways → click PayCryptoHost.
Payment Gateways → PayCryptoHost
4

Enter credentials

Paste your API Key, API Secret, Merchant ID, Webhook Secret and your Bitcoin receiving address from your PayCryptoHost dashboard.
API Key: pch_live_••••••
5

Register webhook

Copy the auto-filled Callback URL into Dashboard → Webhooks → Add endpoint. Subscribe to payment.* events.
/modules/gateways/callback/paycryptohost.php

Grab credentials under Dashboard → API Keys. Use pch_test_* keys for Sandbox mode.

What it does on the invoice page

  • Adds a Pay with Bitcoin button to every unpaid WHMCS invoice.
  • Generates an invoice routed to your registered Bitcoin receiving address.
  • Shows a QR code, countdown, and live confirmation progress (Awaiting → Detected → Confirming → Paid).
  • Marks the invoice Paid automatically when confirmations reach your threshold, records the TXID, and emails the customer.

Troubleshooting

"Module not active" on the callback URL

The gateway is not activated in WHMCS. Go to Configuration → System Settings → Payment Gateways → All Payment Gateways and click PayCryptoHost.

Webhook returns 401 "Invalid signature"

Webhook Secret in WHMCS does not match the one shown in Dashboard → Webhooks. Reveal the secret, paste it into the gateway settings, save.

Invoice stays Unpaid after payment

Make sure the Callback URL is reachable from the public internet (no HTTP basic auth, no firewall rules) and that the webhook is enabled for payment.confirmed in your dashboard.

Admin status shows "API connection failed"

API Key is missing, wrong environment, or suspended. Rotate the key under Dashboard → API Keys and update the gateway settings.

Non-custodial by design

Each invoice is paid straight to your registered Bitcoin address. Funds never pass through PayCryptoHost.

Shopify app

Accept Bitcoin and other crypto on any Shopify store. Each order gets a unique address and a live confirmation timer — funds settle straight to your wallet, Paycryptohost never holds them.

Install from Shopify App Store
PayCryptoHost for Shopifyv1.0.0

Works with every Shopify plan that supports custom payment apps (Basic and up). Self-hosted source archive also available: paycryptohost-shopify.zip.

Install in 5 steps

1

Open the listing

Click Install from Shopify App Store above and pick the store to install on.
apps.shopify.com/paycryptohost
2

Approve permissions

Shopify shows the requested scopes (read orders, write payment sessions). Click Install app.
scopes: read_orders, write_payments
3

Paste your API Key

In the app's Settings screen paste the API Key from your PayCryptoHost dashboard.
API Key: pch_live_••••••••
4

Add receiving wallets

Paste a Bitcoin address (and optionally ETH / LTC / USDT). PayCryptoHost validates the format before saving.
BTC: bc1q… ✓ valid
5

Activate at checkout

Shopify Admin → Settings → Payments → Alternative payment methods → enable PayCryptoHost.
Settings → Payments → Activate

Generate your key under Dashboard → API Keys. Use pch_test_* keys against a development store.

What it does at checkout

  • Adds Pay with crypto (PayCryptoHost) as a payment option on every Shopify checkout.
  • Lets the customer pick a coin — BTC, ETH, LTC, USDT (TRC20) or USDT (ERC20).
  • Shows the exact amount, a unique address, a QR code and a live countdown.
  • Verifies the on-chain TXID, amount, confirmation count and order number on the webhook.
  • Marks the order Paid, records the TXID in order notes, and emails the customer.
  • Rejects duplicate TXIDs, reused addresses, underpayments and overpayments.

Supported currencies

Bitcoin (BTC), Ethereum (ETH), Litecoin (LTC), USDT (TRC20), USDT (ERC20), and additional coins as PayCryptoHost adds support.

Order status mapping

PayCryptoHostShopify order
PendingPayment pending
DetectedPayment pending (awaiting confirmations)
PaidPaid
ExpiredPayment failed → order voided
FailedPayment failed

Webhook

The app auto-registers its callback URL with PayCryptoHost on install. Each webhook is HMAC-signed with the X-Paycrypto-Signature header — invalid signatures are rejected with a 401 before any order is touched.

json
{
  "event": "invoice.confirmed",
  "data": {
    "payment_id": "a1b2c3d4",
    "order_number": "#1042",
    "currency": "BTC",
    "amount": 0.00298507,
    "tx_hash": "9f3a…",
    "confirmations": 2
  }
}

Troubleshooting

"PayCryptoHost" not visible at checkout

Activate it under Settings → Payments → Alternative payment methods. Some Shopify plans hide alternative methods until at least one is enabled.

Webhook returns 401 "Invalid signature"

Rotate the Webhook Secret in Dashboard → Webhooks, paste the new value into the app settings, and save.

Order stays Pending after payment

Customer paid below the required amount, or the network is still confirming. Underpayments are flagged on the order — the customer can top up within the expiry window.

"Invalid API Key" / 401 on save

Make sure the key is Active and matches the environment (pch_live_ on live stores, pch_test_ on development stores).

Crypto address rejected as invalid

The app validates format per network. Make sure BTC starts with bc1/1/3, ETH/ERC20 with 0x, LTC with ltc1/L/M, and TRC20 with T.

Non-custodial by design

Each Shopify order is paid straight to your registered wallet address. Funds never pass through PayCryptoHost.

Authentication

Send your secret key as a bearer token on every request. Keys can be created from the dashboard under Settings → API keys. Treat secret keys like a password — never ship them in browser code.

bash
curl https://api.paycryptohost.com/v1/invoices \
  -H "Authorization: Bearer sk_live_YOUR_KEY"

Create invoice

POST/invoices

Create a USD-priced Bitcoin invoice. The BTC amount is locked to the spot rate at creation.

bash
curl -X POST https://api.paycryptohost.com/v1/invoices \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "order_number": "ORD-1042",
    "customer_email": "jane@example.com",
    "amount_usd": 199.00,
    "expires_minutes": 15
  }'
json
{
  "payment_id": "a1b2c3d4",
  "amount_btc": 0.00298507,
  "amount_usd": 199.00,
  "payment_address": "bc1qxy2...",
  "status": "Pending",
  "expires_at": "2026-05-27T14:32:00Z",
  "payment_url": "https://paycryptohost.com/pay/a1b2c3d4"
}

Get invoice

GET/invoices/:payment_id
bash
curl https://api.paycryptohost.com/v1/invoices/a1b2c3d4 \
  -H "Authorization: Bearer sk_live_YOUR_KEY"

List invoices

GET/invoices

Supports ?status=Paid&limit=50&cursor=… for pagination.

Webhooks

Configure a webhook URL to receive invoice.paid, invoice.expired, and invoice.confirmed events. Every payload is HMAC-signed via the X-Paycrypto-Signature header.

json
{
  "event": "invoice.paid",
  "created_at": "2026-05-27T14:35:11Z",
  "data": {
    "payment_id": "a1b2c3d4",
    "amount_btc": 0.00298507,
    "tx_hash": "9f3a..."
  }
}

Errors

The API uses conventional HTTP status codes.

CodeMeaning
200Success
400Invalid request body
401Missing or invalid API key
404Resource not found
429Rate limit exceeded
5xxServer-side error — retry with backoff
Get started free