Start
Make your first verification request.
Create an API key in the dashboard, keep it on your server, and call the universal verification route with a payment reference.
1. Create a key
Open Dashboard → API Keys and create a key with verification access. The complete key is shown once; store it as a server-side secret.
2. Set your environment
env
VERITAS_API_KEY=sk_live_replace_me
# Optional: only set this when using your own Veritas API fork
# VERITAS_API_URL=https://your-api-host.example3. Add a small server client
Create this helper in your server code, for example at src/lib/veritas.ts. The remaining TypeScript examples use it.
typescript
const apiUrl =
process.env.VERITAS_API_URL ?? "https://verifyapi.leulzenebe.pro";
const apiKey = process.env.VERITAS_API_KEY;
if (!apiKey) throw new Error("VERITAS_API_KEY is required");
type VeritasResponse = { success?: boolean; error?: string };
export async function veritas<T>(
path: string,
init: RequestInit = {},
): Promise<T> {
const headers = new Headers(init.headers);
headers.set("x-api-key", apiKey);
if (init.body && !(init.body instanceof FormData)) {
headers.set("content-type", "application/json");
}
const response = await fetch(`${apiUrl}${path}`, {
...init,
headers,
});
const result = (await response.json()) as T & VeritasResponse;
if (!response.ok || result.success === false) {
throw new Error(result.error ?? `Veritas request failed (${response.status})`);
}
return result;
}4. Verify
bash
curl --request POST "https://verifyapi.leulzenebe.pro/verify" \
--header "content-type: application/json" \
--header "x-api-key: $VERITAS_API_KEY" \
--data '{"reference":"ABC123DE45"}'typescript
import { veritas } from "@/lib/veritas";
const result = await veritas<{
success: boolean;
data?: unknown;
}>("/verify", {
method: "POST",
body: JSON.stringify({ reference: "ABC123DE45" }),
});5. Handle the result
Success envelopes vary by provider. Always treat a non-2xx response or a body with success: false as failure. Preserve the original provider result while mapping the fields your application needs.