Quickstart
Create your first invoice and receive a webhook in under five minutes.
1. Get your keys
Sign up, open API & webhooks, click Generate API keys and set a default webhook URL.
2. Create an invoice
BODY='{"amount":"10.00","order_id":"INV-1001","return_url":"https://shop.example/thanks"}'
SIG=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$ZYVO_SECRET" | cut -d" " -f2)
curl -X POST https://api.zyvopay.com/v1/invoices \
-H "X-Zyvo-Key: $ZYVO_KEY" -H "X-Zyvo-Signature: $SIG" \
-H "Content-Type: application/json" -d "$BODY"
3. Redirect the buyer
Send the buyer to checkout_url. They choose a network, scan the QR code or use a wallet deep link, and see live confirmations. Inside Telegram the checkout opens as a Mini App.
4. Handle the webhook
$raw = file_get_contents('php://input');
$expected = hash_hmac('sha256', $raw, getenv('ZYVO_WEBHOOK_SECRET'));
if (! hash_equals($expected, $_SERVER['HTTP_X_ZYVO_SIGNATURE'] ?? '')) {
http_response_code(401); exit;
}
$event = json_decode($raw, true);
if (in_array($event['event'], ['invoice.paid', 'invoice.overpaid'], true)) {
markOrderPaid($event['data']['order_id']);
}
http_response_code(200);
Respond with any 2xx within 10 seconds. Failed deliveries are retried automatically and can be resent from the dashboard.