VelyoPay API

Accept cards, Apple Pay, Google Pay and crypto with a single REST API. Funds are paid out automatically in USDC to your own wallet.

Introduction

The API is organised around REST. It accepts JSON or form-encoded request bodies, returns JSON, and uses standard HTTP status codes. All requests must use HTTPS.

Base URL: https://api.velyopay.com/v1

A typical integration takes three steps:

Authentication

Authenticate every request with your secret API key in the Authorization header, using the Bearer scheme. Keys start with vp_live_ and are created in your dashboard. A key is shown only once: store it safely and never expose it in front-end code or a public repository.

curl https://api.velyopay.com/v1/payments \
  -H "Authorization: Bearer vp_live_xxxxxxxxxxxxxxxxxxxxxxxx"

A missing, invalid or revoked key returns 401:

{
  "error": {
    "type": "authentication_error",
    "message": "Clé API absente, invalide ou révoquée."
  }
}

Errors

StatusMeaning
200 / 201Success / resource created.
401authentication_error: missing, invalid or revoked API key.
404The resource does not exist or does not belong to your account.
422Invalid parameters, or payment_error when the payment cannot be created (for example, no payout wallet set on your account).
429Too many requests. See rate limits.
5xxSomething went wrong on our side. Retry with exponential backoff.

Validation errors list the faulty fields:

{
  "message": "The amount field is required.",
  "errors": {
    "amount": ["The amount field is required."]
  }
}

Rate limits

Each API key can make up to 120 requests per minute. Beyond that the API answers 429 Too Many Requests; wait for the number of seconds given in the Retry-After header before retrying.

The payment object

{
  "id": "pay_8f3k2m9x1q7w4e6r5t0y2u8i",
  "object": "payment",
  "livemode": true,
  "status": "pending",
  "method": "card",
  "amount": "149.00",
  "currency": "EUR",
  "reference": "ORDER-1042",
  "description": "Premium plan (1 year)",
  "customer_email": "[email protected]",
  "checkout_url": "https://checkout.velyopay.com/pay/pay_8f3k2m9x1q7w4e6r5t0y2u8i",
  "txid_out": null,
  "value_coin": null,
  "metadata": { "customer_id": "4821" },
  "paid_at": null,
  "created_at": "2026-12-04T19:30:00+00:00"
}
FieldDescription
idUnique identifier, prefixed with pay_.
statuspending, paid, expired or failed.
methodcard (cards, Apple Pay, Google Pay and other providers).
amountAmount charged to the customer, as a decimal string.
currencyThree-letter ISO currency code.
referenceYour own order reference.
checkout_urlHosted payment page to send your customer to.
txid_outPolygon transaction of the payout to your wallet, once paid.
value_coinAmount received in USDC, once paid.
metadataUp to 20 key/value pairs you attached to the payment.
paid_atTime the payment was confirmed (ISO 8601), or null.

POSTCreate a payment

POST /v1/payments
ParameterDescription
amount requiredAmount to charge, between 1 and 100,000.
currency requiredOne of USD, EUR, GBP, CAD, AUD, CHF, MAD.
referenceYour order number (max 191 characters).
descriptionShown to the customer on the payment page.
customer_emailCustomer email. If omitted, the payment page asks for it.
providerForce a single provider (for example stripe, applepay, googlepay, paypal). If omitted, the customer chooses.
return_urlWhere to send the customer after a successful payment.
cancel_urlWhere to send the customer if they cancel.
webhook_urlWebhook endpoint for this payment only. Overrides the account webhook URL.
metadataObject of up to 20 key/value pairs, returned in the payment and in webhooks.

Example

curl https://api.velyopay.com/v1/payments \
  -H "Authorization: Bearer vp_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 149,
    "currency": "EUR",
    "reference": "ORDER-1042",
    "customer_email": "[email protected]",
    "return_url": "https://myshop.com/thanks",
    "cancel_url": "https://myshop.com/cart",
    "metadata": { "customer_id": "4821" }
  }'

Returns 201 Created with the payment object. Redirect your customer to checkout_url.

PHP

$ch = curl_init('https://api.velyopay.com/v1/payments');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('VELYOPAY_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'amount' => 149,
        'currency' => 'EUR',
        'reference' => 'ORDER-1042',
        'return_url' => 'https://myshop.com/thanks',
    ]),
]);
$payment = json_decode(curl_exec($ch), true);
header('Location: ' . $payment['checkout_url']);

Node.js

const res = await fetch('https://api.velyopay.com/v1/payments', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.VELYOPAY_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ amount: 149, currency: 'EUR', reference: 'ORDER-1042' }),
});
const payment = await res.json();
// redirect the customer to payment.checkout_url

GETRetrieve a payment

GET /v1/payments/{id}

curl https://api.velyopay.com/v1/payments/pay_8f3k2m9x1q7w4e6r5t0y2u8i \
  -H "Authorization: Bearer vp_live_..."

Returns the payment object, or 404 if it does not exist or belongs to another account.

GETList payments

GET /v1/payments?limit=20&page=1
ParameterDescription
limitNumber of payments per page, 1 to 100 (default 20).
pagePage number, starting at 1.
{
  "object": "list",
  "data": [ { "id": "pay_...", "object": "payment", ... } ],
  "has_more": true
}

Payments are sorted from newest to oldest.

Hosted checkout

The checkout_url opens a VelyoPay-branded payment page on checkout.velyopay.com. The customer chooses a provider (card, Apple Pay, Google Pay, PayPal, Revolut…) and pays. The page is shown in the customer's browser language (English, French, Spanish, Arabic, Portuguese, Russian or Turkish); add ?lang=fr to force a language.

After paying, the customer is sent back to your return_url. Never treat a return as proof of payment: confirm the order only when you receive the payment.paid webhook, or when GET /v1/payments/{id} returns status: "paid".

Each provider has its own minimum amount (usually between 2 and 30 USD). The page only offers providers that accept the amount.

Test mode

Build and test your integration without moving real money. Create a test key in your dashboard (API keys → Mode: Test). Test keys start with vp_test_ and work exactly like live keys, with three differences:

Your server receives the same payment.paid or payment.failed webhook as in production, signed with the same secret, so you can test your signature check and order fulfilment end to end. Switch to a live key when you are ready.

curl https://api.velyopay.com/v1/payments \
  -H "Authorization: Bearer vp_test_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -d amount=25 -d currency=EUR -d reference=TEST-1001

Webhooks

Webhooks notify your server in real time when a payment changes. Set a default webhook URL on your account in the dashboard, or pass webhook_url when you create a payment. The endpoint must be reachable over HTTPS.

Events

EventSent when
payment.paidThe payment is confirmed and the funds have been sent to your wallet.

Request

VelyoPay sends a POST request with a JSON body and these headers:

HeaderValue
VelyoPay-EventEvent type, for example payment.paid.
VelyoPay-Event-IdUnique event identifier (evt_...), identical on every retry.
VelyoPay-Signaturet=<timestamp>,v1=<signature>. See below.
User-AgentVelyoPay-Webhooks/1.0
{
  "id": "evt_2k9d7s1m4n8b6v3c0x5z7a1q",
  "object": "event",
  "type": "payment.paid",
  "created_at": "2026-12-04T19:32:10+00:00",
  "data": {
    "id": "pay_8f3k2m9x1q7w4e6r5t0y2u8i",
    "object": "payment",
    "status": "paid",
    "amount": "149.00",
    "currency": "EUR",
    "reference": "ORDER-1042",
    "txid_out": "0x5b1e...c9a2",
    "value_coin": "158.21",
    "metadata": { "customer_id": "4821" },
    "paid_at": "2026-12-04T19:32:09+00:00",
    ...
  }
}

Verify signatures

Every webhook is signed with your account's webhook secret (whsec_..., shown in your dashboard). Always verify the signature before trusting a webhook:

PHP

$body = file_get_contents('php://input');
$header = $_SERVER['HTTP_VELYOPAY_SIGNATURE'] ?? '';
$secret = getenv('VELYOPAY_WEBHOOK_SECRET');

preg_match('/t=(\d+),v1=([0-9a-f]{64})/', $header, $m);
$expected = hash_hmac('sha256', ($m[1] ?? '') . '.' . $body, $secret);

if (!$m || !hash_equals($expected, $m[2]) || abs(time() - (int) $m[1]) > 300) {
    http_response_code(400);
    exit;
}

$event = json_decode($body, true);
if ($event['type'] === 'payment.paid') {
    // mark $event['data']['reference'] as paid (only once)
}
http_response_code(200);

Node.js (Express)

import crypto from 'node:crypto';
import express from 'express';

const app = express();

app.post('/webhooks/velyopay', express.raw({ type: 'application/json' }), (req, res) => {
  const [, t, v1] = /t=(\d+),v1=([0-9a-f]{64})/.exec(req.get('VelyoPay-Signature') || '') || [];
  const expected = crypto
    .createHmac('sha256', process.env.VELYOPAY_WEBHOOK_SECRET)
    .update(`${t}.${req.body}`)
    .digest('hex');

  const valid = v1 && crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(v1))
    && Math.abs(Date.now() / 1000 - Number(t)) < 300;
  if (!valid) return res.sendStatus(400);

  const event = JSON.parse(req.body);
  if (event.type === 'payment.paid') {
    // mark event.data.reference as paid (only once)
  }
  res.sendStatus(200);
});

Python (Flask)

import hashlib, hmac, os, re, time
from flask import Flask, request, abort

app = Flask(__name__)

@app.post("/webhooks/velyopay")
def velyopay_webhook():
    body = request.get_data()
    m = re.search(r"t=(\d+),v1=([0-9a-f]{64})", request.headers.get("VelyoPay-Signature", ""))
    if not m:
        abort(400)
    expected = hmac.new(os.environ["VELYOPAY_WEBHOOK_SECRET"].encode(),
                        m.group(1).encode() + b"." + body, hashlib.sha256).hexdigest()
    if not hmac.compare_digest(expected, m.group(2)) or abs(time.time() - int(m.group(1))) > 300:
        abort(400)

    event = request.get_json()
    if event["type"] == "payment.paid":
        pass  # mark event["data"]["reference"] as paid (only once)
    return "", 200

Retries & best practices

Your endpoint must answer with a 2xx status within 10 seconds. Any other answer, a timeout or a connection error counts as a failure, and the event is sent again after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 24 hours (7 attempts in total).

Currencies & statuses

Currencies

USD · EUR · GBP · CAD · AUD · CHF · MAD

Payment statuses

StatusMeaning
pendingCreated, waiting for the customer to pay.
paidPaid and confirmed. The funds are on their way to your wallet in USDC (Polygon).
expiredNot paid in time.
failedThe payment could not be completed.

Fees

5.99% per successful transaction, deducted automatically before the payout, plus the payment provider's own fee. There are no monthly or setup fees.