Integrations

Accept crypto payments in OpenCart

OpenCart payment extensions follow a fixed structure (a controller, a model and a template under extension/crybit/payment). The controller creates a CryBit invoice for the order total and sends the customer to the payment page.

Confirm handler

PHP (extension/crybit/payment/crybit.php)

public function confirm() {
    $order = $this->model_checkout_order->getOrder($this->session->data['order_id']);
    $ch = curl_init('https://api.crybit.net/api/v1/payments');
    curl_setopt_array($ch, [
        CURLOPT_POST => true,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => ['X-Public-Key: ' . $this->config->get('crybit_public_key'), 'X-Private-Key: ' . $this->config->get('crybit_private_key'), 'Content-Type: application/json'],
        CURLOPT_POSTFIELDS => json_encode([
            'amount' => (float) $order['total'],
            'currency' => $order['currency_code'],
            'order_id' => (string) $order['order_id'],
            'return_url' => $this->url->link('checkout.success'),
        ]),
    ]);
    $inv = json_decode(curl_exec($ch), true);
    $this->response->redirect($inv['callback_url']);
}

Order status on payment

A small controller behind the CryBit webhook verifies the signature and calls addOrderHistory() with your “processing” status id, matched by order_id.

FAQ

Is there an extension in the OpenCart Marketplace?

Not yet — the controller above is the direct path today, built on the same public API as every other integration.

Other platforms

API-Schlüssel erhalten