Crypto On-Ramp Gateway for Merchants & PSPs

<?php

// POST /api/sandbox/payment/create  (live: /api/payment/create)
$payload = json_encode([
    'amount'            => 19.99,
    'currency'          => 'EUR',
    'product_name'      => 'Premium plan',
    'method'            => 'credit_cards',
    'RefOrder'          => 'ORDER_123',
    'Customer_Email'    => '[email protected]',
    'Customer_Name'     => 'Jane',
    'Customer_LastName' => 'Doe',
    'country'           => 'FR',
    'store_name'        => 'Example Store',
    'urlOK'             => 'https://example.com/success',
    'urlKO'             => 'https://example.com/cancel',
    'ipnURL'            => 'https://example.com/webhooks/payblis',
]);

$ch = curl_init('https://payblis.com/api/sandbox/payment/create');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_HTTPHEADER     => [
        'X-API-Key: YOUR_SANDBOX_KEY',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS     => $payload,
    CURLOPT_RETURNTRANSFER => true,
]);
$res = json_decode(curl_exec($ch), true);

// Response: RefOrder + checkout_url
header('Location: ' . $res['checkout_url']);