API documentation
Everything you need to take payments with Helix from an app, a custom site, WooCommerce or WHMCS.
Overview
The base URL is https://helixmerchantprocessing.com/api/v1. Requests and responses are JSON. Amounts are integers in the currency's smallest unit (cents for USD), the same as Stripe.
Each payment is charged on the Helix platform on behalf of your business, so your business name appears on the customer's statement. When it succeeds, your share (amount − 25% − Stripe's fee) is transferred to your Stripe account.
Authentication
Create an integration under Dashboard → Integrations to get an API key (hx_sk_…, shown once) and a webhook secret (hxwh_…). Send the key as a bearer token:
curl https://helixmerchantprocessing.com/api/v1/ping \
-H "Authorization: Bearer hx_sk_your_key"
Hosted checkout
Create a checkout session and redirect the customer to checkout_url. Stripe hosts the payment page (cards and wallets) and returns the customer to your success_url.
curl -X POST https://helixmerchantprocessing.com/api/v1/checkout_sessions \
-H "Authorization: Bearer hx_sk_your_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 1999,
"currency": "usd",
"reference": "order_1042",
"description": "Pro plan — 1 year",
"customer_email": "jane@example.com",
"success_url": "https://yourapp.com/thanks?session={CHECKOUT_SESSION_ID}",
"cancel_url": "https://yourapp.com/cart",
"notify_url": "https://yourapp.com/webhooks/helix",
"metadata": { "user_id": "8812" }
}'
Response:
{
"checkout_url": "https://checkout.stripe.com/c/pay/cs_live_…",
"checkout_session": "cs_live_…",
"expires_at": 1764720000,
"payment": { "id": "pay_…", "status": "pending", "amount": 1999, "currency": "usd", … }
}
Parameters
amount(required) — integer, minimum 50 for USD.currency— 3-letter code, defaultusd.success_url,cancel_url(required) — absolute URLs.{CHECKOUT_SESSION_ID}is replaced by Stripe.reference— your order or invoice ID. Shown in the dashboard and used for dispute evidence.description,customer_email,customer_name.line_items— optional array of{"name","quantity","unit_amount"}; must add up toamount.notify_url— where to send signed events for this payment (defaults to the integration's notify URL).metadata— up to 20 string keys (thehelix_prefix is reserved).reuse_open— iftrue, an open checkout for the samereferenceand amount is returned instead of creating another.
In-app payments (Payment Sheet)
For native iOS/Android checkout with Stripe's Payment Sheet, create a PaymentIntent from your backend and hand client_secret and publishable_key to the app. Initialize the Stripe SDK with the returned publishable key — no connected-account header is needed.
curl -X POST https://helixmerchantprocessing.com/api/v1/payment_intents \
-H "Authorization: Bearer hx_sk_your_key" \
-H "Content-Type: application/json" \
-d '{ "amount": 499, "currency": "usd", "reference": "iap_77", "customer_email": "sam@example.com" }'
{ "client_secret": "pi_…_secret_…", "publishable_key": "pk_live_…", "payment_intent": "pi_…", "payment": { … } }
Retrieve a payment
Accepts a Helix payment ID (pay_…), a checkout session ID (cs_…) or a PaymentIntent ID (pi_…). If a checkout is still pending, Helix checks Stripe directly before answering, so this is safe to call from your success page.
curl https://helixmerchantprocessing.com/api/v1/payments/pay_abc123 -H "Authorization: Bearer hx_sk_your_key"
Key fields: status (pending, succeeded, partially_refunded, refunded, disputed, dispute_lost, canceled, failed), amount, helix_fee, stripe_fee, net_amount, refunded_amount, refunds[].
List payments: GET /api/v1/payments?limit=25&offset=0&status=succeeded&reference=order_1042. Month-to-date totals: GET /api/v1/balance.
Refunds
curl -X POST https://helixmerchantprocessing.com/api/v1/payments/pay_abc123/refunds \
-H "Authorization: Bearer hx_sk_your_key" \
-H "Content-Type: application/json" \
-d '{ "amount": 500, "reason": "requested_by_customer", "external_refund_id": "rf-1042-1" }'
Omit amount for a full refund. external_refund_id makes the call idempotent — retrying with the same value returns the original refund. Valid reason values sent to the card network: requested_by_customer, duplicate, fraudulent; any other text is kept as an internal note.
Processing fees are not returned on refunds. The refunded amount is recovered from the payment's transfer, or from future payouts if it was already paid out.
Webhooks to you
Helix sends a POST with a JSON body to the payment's notify_url (or the integration's notify URL) for these events:
payment.succeeded— the customer paid. Fulfil the order.payment.refunded— includesdata.refund.dispute.created,dispute.closed— includedata.dispute.service.provisioned,service.failed,service.renewed,service.updated,service.suspended,service.unsuspended,service.terminated,service.password_changed,service.expired— includedata.servicewith the current username, password and connection details.
{
"id": "evt_…", "object": "event", "type": "payment.succeeded", "created": 1764633600, "livemode": true,
"data": { "payment": { "id": "pay_…", "external_ref": "order_1042", "amount": 1999, "currency": "usd",
"status": "succeeded", "fees_total": 588, "net_amount": 1411, … } }
}
Respond with any 2xx within 30 seconds. Other responses are retried after 1m, 5m, 15m, 1h, 3h, 6h, 12h and 24h. Events can arrive more than once or out of order — key your handling on data.payment.id and the current status.
Verifying signatures
Each delivery has X-Helix-Signature: t=<unix time>,v1=<hex>, where v1 = HMAC-SHA256(webhook_secret, t + "." + raw_body). Reject requests older than 5 minutes.
PHP
$body = file_get_contents('php://input');
parse_str(str_replace(',', '&', $_SERVER['HTTP_X_HELIX_SIGNATURE'] ?? ''), $sig);
$expected = hash_hmac('sha256', $sig['t'] . '.' . $body, getenv('HELIX_WEBHOOK_SECRET'));
if (!hash_equals($expected, $sig['v1'] ?? '') || abs(time() - (int)$sig['t']) > 300) {
http_response_code(400); exit;
}
$event = json_decode($body, true);
Node.js
const crypto = require('crypto');
function verifyHelix(rawBody, header, secret) {
const parts = Object.fromEntries(header.split(',').map(p => p.split('=')));
const expected = crypto.createHmac('sha256', secret).update(parts.t + '.' + rawBody).digest('hex');
const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
return fresh && crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1 || ''));
}
Provisioning
Helix can deliver what the customer bought the moment the payment succeeds: an IPTV line on ProPanel, XUI.one or Xtream Codes, or a Linode server. Helix creates it, keeps the purchaser's username and password, emails setup instructions from your brand, and records every step as delivery evidence for chargebacks.
- Provisioning → Connections: add your panel or Linode account. Keys are encrypted at rest (AES-256-GCM) and never shown again. Test checks the key and lists bouquets, packages, regions, plans and images.
- XUI.one — the admin API URL including your access code (for example
https://panel.example.com:8443/AbCdEf) and an API key. - Xtream Codes — the panel URL; add Helix's server IP to the panel's API allow-list (the XC admin API authenticates by IP).
- ProPanel — your panel URL and either your reseller username and password (full control: connections, bouquets, expiry, password changes and deletes; the account can't use 2FA) or a reseller API key (
rk_…), where the ProPanel package decides connections, bouquets and duration. - Linode — a personal access token with Linodes read/write.
- XUI.one — the admin API URL including your access code (for example
- Provisioning → Plans: name a plan and set its defaults — max connections, bouquets (checkboxes loaded from the panel), duration, trial, package; or region, Linode type, image and grace days.
- Attach the plan to a WooCommerce product, a WHMCS product, or pass it in a checkout (below).
Provision from a checkout
Add provision to POST /api/v1/checkout_sessions or /api/v1/payment_intents. customer_email is required. Each unit becomes one service after payment.
"provision": [
{ "plan": "plan_…", "quantity": 1, "item_ref": "line-77", "name": "Premium 3 screens",
"max_connections": 3, "bouquets": [1, 4, 9], "duration_days": 30 }
]
Overrides you can pass per item: max_connections, bouquets, duration_days, is_trial, package_id, region, type, image.
Lifecycle
- Failures are retried after 1m, 5m, 20m and 1h, then marked failed and you're emailed.
- Helix-managed services get a reminder 3 days before expiry. At expiry IPTV lines expire on the panel; Linode servers are powered off, then deleted after the plan's grace days. Customers renew from the support portal when the plan has a renewal price.
- When a payment is disputed or fully refunded, its services are suspended (toggle in Provisioning → Settings). A won dispute restores them. Renewals never lift a dispute hold.
Plans & services API
GET /api/v1/plans | Your plans with defaults and connection. |
GET /api/v1/plans/{id}/options | Bouquets, packages, regions, types and images from the panel or Linode (cached 10 minutes). |
POST /api/v1/services | Create a service now (synchronous). Idempotent on external_ref. |
GET /api/v1/services | Filter by external_ref, order_ref, customer_email, status. |
GET /api/v1/services/{id} | By svc_… ID or your external_ref. Includes the password. |
POST /api/v1/services/{id}/{action} | renew (expires_at or days), update (plan overrides), suspend, unsuspend, terminate, password, resend, retry, status, event. |
curl https://helixmerchantprocessing.com/api/v1/services \
-H "Authorization: Bearer hx_sk_…" -H "Content-Type: application/json" \
-d '{ "plan": "plan_…", "customer_email": "pat@example.com", "customer_name": "Pat",
"external_ref": "sub-881", "order_ref": "1042", "max_connections": 2 }'
Omit username/password and Helix generates them. Set managed_by to "whmcs" (or anything other than helix) when your system handles billing and expiry; Helix then never expires or reminds on its own. A provider error returns 502 with the service (status pending) so you can show it and let Helix retry.
event records delivery evidence from your store, such as the buyer opening their credentials:
{ "event": "store.view_credentials", "ip": "203.0.113.7", "user_agent": "Mozilla/5.0 …",
"detail": "Viewed in My Account → Orders" }
Support portal & evidence
Every merchant gets a branded customer portal at https://helixmerchantprocessing.com/s/<your-slug>: your name, logo, accent color, reply-to address and support hours. Customers sign in with their service username and password (Linode customers get a separate portal login) to see credentials, setup guides, renew, request their setup email again and open support tickets. Anyone can open a ticket from the portal's contact form.
In Support → Settings you edit the email templates: setup instructions (IPTV and Linode), renewed, expiring, suspended, ticket received and ticket reply. Placeholders include {{name}}, {{username}}, {{password}}, {{server_url}}, {{m3u_url}}, {{ip}}, {{portal_url}}, {{expires}} and {{instructions}}.
Helix logs, with time, IP and device where available: the panel's reply when the line or server was created, each email sent / delivered / opened, portal sign-ins and credential views, store credential views, tickets and replies, and live line status checks. When a payment is disputed Helix builds a Service delivery report and a Customer communication PDF, fills the activity log and service date, and attaches them to the response we submit to the bank.
WooCommerce
- In your Helix dashboard, go to Integrations and create a WooCommerce integration. Copy the API key (shown once), the integration ID and the webhook secret.
- Download the plugin: helix-merchant-woocommerce.zip. In WordPress go to Plugins → Add New → Upload Plugin, upload it and activate.
- Open WooCommerce → Settings → Payments → Helix Merchant Processing, paste the three values and save. The plugin tests the key and registers the order webhooks (order created / updated / deleted) pointing at Helix.
- Place a test order. It's marked Processing when payment succeeds. Refund from the order screen with Refund via Helix.
Prefer to set up webhooks by hand? Under WooCommerce → Settings → Advanced → Webhooks, add one webhook per topic (Order created, Order updated, Order deleted) with delivery URL https://helixmerchantprocessing.com/webhooks/woocommerce/<integration id> and your webhook secret. Helix verifies the X-WC-Webhook-Signature header on every delivery.
Selling IPTV lines or servers
Edit a product and open the Helix provisioning tab. Pick a plan, then optionally override max connections, duration, trial, ProPanel package and bouquets (checkboxes from your panel) — or, for Linode, region, plan and image. Each unit sold creates one service after payment. The credentials and portal link appear on the order confirmation page, in My Account → Orders and in a Helix services box on the admin order screen; each view is logged in Helix as delivery evidence. WooCommerce Subscriptions renewal orders renew the existing services.
WHMCS
- Create a WHMCS integration in your Helix dashboard and copy the API key, integration ID and webhook secret.
- Download helix-merchant-whmcs.zip and upload its contents to your WHMCS root. It contains:
modules/gateways/helixmerchant.php— the payment gatewaymodules/gateways/callback/helixmerchant.php— receives payment confirmationsincludes/hooks/helixmerchant.php— sends invoice events to Helixmodules/servers/helixprovision/— the Helix Provisioning server module (IPTV lines and Linode servers)includes/hooks/helixprovision.php— pushes the new expiry to the panel when a renewal invoice is paid
- In WHMCS go to System Settings → Payment Gateways → All Payment Gateways, activate Helix Merchant Processing and paste the three values.
- Open an unpaid invoice and click Pay Now. After payment the invoice is marked paid with the transaction ID and fees recorded. Refunds from Invoice → Refund go back to the card through Helix.
Provisioning products
In System Settings → Products/Services, edit a product, open Module Settings and choose Helix Provisioning (IPTV & Linode). Pick the Helix plan and optionally set max connections, bouquet IDs, trial, ProPanel package, Linode region/type/image, expiry grace days and whether Helix sends the setup email. Configurable options named Max Connections, Bouquets, Region, Linode Type, Image or Package override these per order (use 1,4,9|Sports pack style option names for bouquets).
Create, Suspend, Unsuspend, Terminate, Change Package, Change Password and Renew run through Helix. The panel line's expiry is the service's next due date plus the grace days; WHMCS handles overdue suspension. Helix's username, password and server IP are copied onto the WHMCS service, and the client area shows the connection details (each view is logged as evidence). If Helix suspends a line because a payment was disputed, the WHMCS service is suspended with reason Helix: dispute …, and unsuspended if you win.
Invoice events are posted to https://helixmerchantprocessing.com/webhooks/whmcs/<integration id> with X-Helix-Timestamp and X-Helix-Signature (hex HMAC-SHA256 of timestamp + "." + body using your webhook secret).
Errors
{ "error": { "type": "invalid_request_error", "message": "amount must be at least 0.50 USD" } }
400 invalid_request_error— fix the request.401 authentication_error— missing or invalid key.402 processor_error— Stripe declined the operation; the message explains why.403 permission_error— account suspended, or refunds disabled.429 rate_limit_error— slow down (600 requests/minute per key).500 api_error— try again; contact us if it persists.