Start building
Libraries & plugins
Official Node.js and PHP libraries and a WooCommerce plugin. Each wraps the same public API, retries safely with idempotency keys and verifies webhook signatures for you.
Node.js
The @veyqo/node package has no dependencies and runs on Node 18 or later. It ships with TypeScript types. Source: github.com/veyqo-hq/veyqo-node.
It covers payments (including split payments), refunds, checkout sessions, plans and subscriptions (including changePlan), bank transfers (transfers.banks, resolve, create, list, retrieve and batches), balances, beneficiaries, virtual accounts, split recipients, events and webhook verification.
npm install @veyqo/node
// server.js
import { Veyqo } from '@veyqo/node'
const veyqo = new Veyqo(process.env.VEYQO_SECRET_KEY)
const payment = await veyqo.payments.create({
amount: 50000, // NGN 500.00, in kobo
currency: 'NGN',
reference: 'ORDER-1001',
customer: { email: 'customer@example.com' },
callback_url: 'https://shop.example.com/thanks',
})
// redirect the customer to payment.checkout_urlPHP
veyqo/veyqo-php needs PHP 8.1 or later with the curl and json extensions, and nothing else. It works in Laravel, Symfony or plain PHP. Source: github.com/veyqo-hq/veyqo-php.
It has the same coverage as the Node library: $veyqo->transfers->create([...]) sends a bank transfer, $veyqo->transfers->createBatch([...]) sends up to 200, $veyqo->virtualAccounts->create([...]) gives a customer their own account number, and $veyqo->subscriptions->changePlan($id, [...]) moves a subscriber to another plan.
composer require veyqo/veyqo-php
<?php
$veyqo = new Veyqo\Veyqo(getenv('VEYQO_SECRET_KEY'));
$payment = $veyqo->payments->create([
'amount' => 50000,
'currency' => 'NGN',
'reference' => 'ORDER-1001',
'customer' => ['email' => 'customer@example.com'],
'callback_url' => 'https://shop.example.com/thanks',
]);
header('Location: '.$payment['checkout_url']);Verifying webhooks with a library
Both libraries check the Veyqo-Signature and Veyqo-Timestamp headers against the raw body and reject replays older than five minutes. Pass the body exactly as received, before any JSON parsing.
// Node (Express)
app.post('/webhooks/veyqo', express.raw({ type: 'application/json' }), (req, res) => {
const event = verifyWebhook(req.body, req.headers, process.env.VEYQO_WEBHOOK_SECRET)
// throws VeyqoSignatureError if it is not genuine
res.sendStatus(200)
})
// PHP
$event = Veyqo\Webhook::verify(file_get_contents('php://input'), getallheaders(), getenv('VEYQO_WEBHOOK_SECRET'));WooCommerce
- 1Download veyqo-woocommerce.zip from github.com/veyqo-hq/veyqo-woocommerce/releases.
- 2In WordPress, open Plugins → Add New → Upload Plugin, choose the zip, then Install and Activate.
- 3Open WooCommerce → Settings → Payments → Veyqo. Paste your test secret key and leave Test mode on.
- 4In the Veyqo dashboard, add a webhook endpoint with the URL shown on that settings page, subscribed to payment.succeeded and payment.failed. Paste its signing secret into the plugin.
- 5Place a test order. When it is marked Processing, add your live key and turn Test mode off.
Other languages
Any language with an HTTP client works: send Authorization: Bearer with your secret key, JSON bodies, and an Idempotency-Key on every POST. The API reference documents each request and response.