API reference

Liens de paiement

A payment link is a reusable checkout page. It carries a title, an optional description, a fixed price or an open amount, and where to send the customer afterwards. Customers pick the coin themselves on the page.

The payment link object

Field Type Description
id string Public code, also the last path segment of the checkout URL.
title string Shown to the customer.
description string|null Optional, shown under the title.
pricing_type "fixed" | "open" Fixed price, or the customer types the amount.
amount string|null Decimal string with two places when fixed, null when open.
suggested_amounts array Up to four one-click amounts offered on an open-amount checkout. The customer can still type another.
currency string USD, EUR, GBP, CAD, AUD, CHF, TRY
status "active" | "archived" Archived links return 404 to customers.
success_url string|null Where the customer is sent after paying.
cancel_url string|null Adds a "cancel and return" link to the checkout.
collect_name, require_email boolean Ask for the customer name, and make the email mandatory.
expires_at, max_payments string|null, integer|null Close the link after a date (ISO 8601) or a number of completed payments. accepting_payments tells you whether it is open right now.
views_count integer How many visitors opened the checkout page, counted once per browser session.
custom_fields array Up to five extra questions the checkout asks: label, required. The answers come back on the charge.
success_message string|null Shown to the customer after payment and included in the receipt email.
delivery object Digital delivery: enabled once the link has been given stock, and in_stock, the items left. The link closes when it reaches zero.
checkout_url string The hosted page to share.
created_at, updated_at string ISO 8601 timestamps in UTC.

Endpoints

  • GET /v1/payment-links List links, newest first. Paginated with ?page= and ?per_page= (max 100).
  • POST /v1/payment-links Create a link. Body: title, description, pricing_type, amount, currency, success_url, cancel_url, collect_name, require_email, expires_at, max_payments.
  • GET /v1/payment-links/{id} Retrieve a link.
  • PATCH /v1/payment-links/{id} Update any subset of fields. Switching to fixed pricing requires an amount.
  • POST /v1/payment-links/{id}/deliverables Add stock for digital delivery. Body: items, a list of strings (license keys, codes, links), 1000 at most. Duplicates of what is waiting in stock are skipped; meta.added says how many went in.
  • POST /v1/payment-links/{id}/archive Stop accepting payments.
  • DELETE /v1/payment-links/{id}/archive Restore an archived link.

Example: create a link

curl -X POST https://api.velirapay.com/v1/payment-links \
  -H "Authorization: Bearer vp_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Consulting hour",
    "pricing_type": "fixed",
    "amount": "150.00",
    "currency": "USD",
    "success_url": "https://example.com/thanks"
  }'

HTTP/1.1 201 Created
{
  "data": {
    "id": "6dprcllogj1a",
    "object": "payment_link",
    "title": "Consulting hour",
    "pricing_type": "fixed",
    "amount": "150.00",
    "currency": "USD",
    "status": "active",
    "checkout_url": "https://velirapay.com/pay/6dprcllogj1a",
    …
  }
}