Enter at least two characters to search. Searching documentation… No matching sections. Try an endpoint, field or event name.
Pagination and filters
View as MarkdownPaginated endpoints return 25 records at a time, newest first except for members, which are listed oldest first. Ask for another page with ?page= and another size with ?per_page= (1 to 100; a size outside that range is brought within it rather than refused). Alongside data you get Laravel's meta and links objects, so you can walk the pages without counting yourself.
On this page
Copy failed. Select the code and copy it manually.
curl 'https://api.velirapay.com/v1/charges?status=paid&per_page=50&page=2' \
--fail-with-body --silent --show-error --max-time 30 \
-H "Authorization: Bearer ${VELIRAPAY_API_KEY:?Set VELIRAPAY_API_KEY}" \
-H 'Accept: application/json'
<?php
use VeliraPay\VeliraPayClient;
require __DIR__.'/vendor/autoload.php';
$apiKey = getenv('VELIRAPAY_API_KEY') ?: throw new RuntimeException('Set VELIRAPAY_API_KEY.');
$velirapay = new VeliraPayClient($apiKey, baseUrl: 'https://api.velirapay.com');
$charges = $velirapay->charges->list([
'status' => 'paid',
'per_page' => 50,
'page' => 2,
]);
echo json_encode($charges, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR), PHP_EOL;
use VeliraPay\Laravel\Facades\VeliraPay;
$charges = VeliraPay::charges()->list([
'status' => 'paid',
'per_page' => 50,
'page' => 2,
]);
const secretKey = process.env.VELIRAPAY_API_KEY;
if (!secretKey) throw new Error('Set VELIRAPAY_API_KEY.');
const response = await fetch('https://api.velirapay.com/v1/charges?status=paid&per_page=50&page=2', {
headers: {
Authorization: `Bearer ${secretKey}`,
Accept: 'application/json',
},
redirect: 'error',
signal: AbortSignal.timeout(30_000),
});
if (!response.ok) {
throw new Error(`VeliraPay ${response.status}: ${await response.text()}`);
}
const charges = response.status === 204 ? null : (await response.json()).data;
console.log(JSON.stringify(charges, null, 2));
import json
import os
import requests
api_key = os.environ["VELIRAPAY_API_KEY"]
response = requests.get(
"https://api.velirapay.com/v1/charges",
headers={
"Authorization": f"Bearer {api_key}",
"Accept": "application/json",
},
params={
"status": "paid",
"per_page": 50,
"page": 2,
},
timeout=(5, 30),
allow_redirects=False,
)
if not 200 <= response.status_code < 300:
raise RuntimeError(f"VeliraPay {response.status_code}: {response.text}")
charges = None if response.status_code == 204 else response.json()["data"]
print(json.dumps(charges, indent=2))
using System;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text.Json;
var secretKey = Environment.GetEnvironmentVariable("VELIRAPAY_API_KEY")
?? throw new InvalidOperationException("Set VELIRAPAY_API_KEY.");
using var client = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false })
{
Timeout = TimeSpan.FromSeconds(30),
};
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.velirapay.com/v1/charges?status=paid&per_page=50&page=2");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", secretKey);
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
using var response = await client.SendAsync(request);
var responseBody = await response.Content.ReadAsStringAsync();
if (!response.IsSuccessStatusCode)
{
throw new HttpRequestException($"VeliraPay {(int)response.StatusCode}: {responseBody}");
}
JsonElement? charges = null;
if (response.StatusCode != HttpStatusCode.NoContent)
{
using var document = JsonDocument.Parse(responseBody);
charges = document.RootElement.GetProperty("data").Clone();
}
Console.WriteLine(charges?.GetRawText() ?? "null");
Copy failed. Select the code and copy it manually.
{
"data": [ … ],
"links": { "first": "…", "last": "…", "prev": "…", "next": null },
"meta": {
"current_page": 2, "from": 51, "last_page": 2, "links": [ … ],
"path": "…", "per_page": 50, "to": 63, "total": 63
}
}
These are numbered pages, not a snapshot. Records added, removed or moved out of your filters while you page can cause repeats or skips. Ignore ids you already have, and repeat the scan if you need to reconcile a changing list.
Filters
Each list endpoint takes the filters that make sense for it, and they combine with paging.
-
GET
/v1/chargesFilter with ?status= (pending, underpaid, paid, expired or canceled), ?payment_link= (a payment link id), ?asset= (a coin), ?search= (the charge id, customer email or customer name), ?created_from= and ?created_to= (ISO 8601 dates in UTC; a bare ?created_to= date includes that whole day). -
GET
/v1/invoicesFilter with ?status= (open, paid or void), ?search= (the number, customer name or customer email) and ?overdue=true. -
GET
/v1/payment-linksFilter with ?status= (active or archived) and ?search= (the title). -
GET
/v1/couponsFilter with ?search= (the code). -
GET
/v1/payoutsFilter with ?status= (pending, sending, sent, failed or manual), ?asset= (a coin) and ?search= (a charge id or a transaction hash). -
GET
/v1/eventsFilter with ?type= (one event name), ?charge= (a charge id) and ?invoice= (an invoice id). ?invoice= returns the invoice.* events only: the events of its charges are found with ?charge=. -
GET
/v1/webhook-endpointsNo filters. -
GET
/v1/webhook-endpoints/{id}/deliveriesFilter with ?status= (pending, succeeded, failed) and ?event= (one event name). -
GET
/v1/api-keysActive keys in the key's mode. No filters. -
GET
/v1/membersMembers, oldest first. No filters. -
GET
/v1/invitationsUnaccepted invitations, including expired ones. No filters. -
GET
/v1/activityFilter with ?action= (an action or sensitive), ?person= (a name or email), ?q= (a subject or IP address), ?from= and ?to= (YYYY-MM-DD).
An invalid status, event type, coin or date in these filters is ignored; other valid filters still apply. An id or search that matches nothing gives an empty list. GET /v1/assets, GET /v1/payout-addresses and GET /v1/payouts/summary return complete lists without paging. GET /v1/assets accepts ?currency= and rejects an unsupported currency with 422.