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.
Requires WordPress 6.0+, WooCommerce 8.0+, PHP 7.4+. Works with both Classic and Block Checkout.
Install in 4 steps
Download the .zip
Upload to WordPress
Activate
Paste your API Key
Generate your key under Dashboard → API Keys. The plugin only needs the API Key — no secret, no merchant ID.
Verify it works
- In PayCryptoHost → Settings click Test connection — you should see a green Connected badge.
- 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.
- 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.
Requires WHMCS 8.0+, PHP 7.4+, cURL + OpenSSL. Module path: modules/gateways/paycryptohost.
Install in 5 steps
Download the .zip
Upload to WHMCS
modules/ folder via FTP/SSH so files land at /whmcs/modules/gateways/paycryptohost.php.Activate gateway
Enter credentials
Register webhook
payment.* events.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.
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
Open the listing
Approve permissions
Paste your API Key
Add receiving wallets
Activate at checkout
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
| PayCryptoHost | Shopify order |
|---|---|
| Pending | Payment pending |
| Detected | Payment pending (awaiting confirmations) |
| Paid | Paid |
| Expired | Payment failed → order voided |
| Failed | Payment 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.
{
"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.
curl https://api.paycryptohost.com/v1/invoices \
-H "Authorization: Bearer sk_live_YOUR_KEY"Create invoice
Create a USD-priced Bitcoin invoice. The BTC amount is locked to the spot rate at creation.
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
}'{
"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
curl https://api.paycryptohost.com/v1/invoices/a1b2c3d4 \
-H "Authorization: Bearer sk_live_YOUR_KEY"List 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.
{
"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.
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Invalid request body |
| 401 | Missing or invalid API key |
| 404 | Resource not found |
| 429 | Rate limit exceeded |
| 5xx | Server-side error — retry with backoff |