Developers

Origin API reference

Take card, Apple Pay and Google Pay payments from your own website, app or Discord bot with a few lines of code.

BASE URLhttps://originpayments.org/api/public/v1

How it works

You don't need Komerza or SellAuth. From your own server: 1) create a checkout session with the amount, 2) send the buyer to the url you get back, 3) the buyer pays by card, Apple Pay or Google Pay, 4) they're sent to your success_url and you confirm the payment by fetching the session (status paid). Sessions expire after 2 hours.

Flow
Your server ──POST /checkout-sessions──▶ Origin
Your server ◀── { id, url } ─────────── Origin
Buyer ──────── opens url, pays ───────▶ Origin
Buyer ◀──── redirected to success_url ── Origin
Your server ──GET /checkout-sessions/{id}──▶ status: "paid"

Authentication

Create a secret key in Dashboard → Developers. Send it as a Bearer token on every request. Keys start with pf_live_, are shown once, and can be revoked any time. Only call the API from your server — never from a browser or a public bot repo.

HTTP
Authorization: Bearer pf_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Base URL: https://originpayments.org/api/public/v1

POST/checkout-sessions

Create a checkout session

POST /checkout-sessions. amount is an integer in minor units (1000 = $10.00), min 50. Required: amount, description. Optional: currency (default USD), customer_email, success_url, cancel_url, reference (your own order id), metadata (string → string). The 2% checkout fee is added on the payment page — don't add it yourself.

cURL
curl -X POST https://originpayments.org/api/public/v1/checkout-sessions \
  -H "Authorization: Bearer $ORIGIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 1000,
    "currency": "USD",
    "description": "VIP rank — 30 days",
    "customer_email": "buyer@example.com",
    "reference": "order_123",
    "success_url": "https://yourshop.com/thanks?order=order_123",
    "cancel_url": "https://yourshop.com/cart"
  }'

# 201 Created
{
  "id": "6f1c…",
  "object": "checkout_session",
  "status": "open",
  "amount": 1000,
  "currency": "USD",
  "url": "https://originpayments.org/pay/session/6f1c…",
  "expires_at": "2026-10-28T23:00:00.000Z",
  ...
}

GET/checkout-sessions/{id}

Check a session

GET /checkout-sessions/{id}. status is open, paid or expired. Always confirm paid from your server before delivering — never trust the redirect alone.

cURL
curl https://originpayments.org/api/public/v1/checkout-sessions/6f1c… -H "Authorization: Bearer $ORIGIN_KEY"

{ "id": "6f1c…", "status": "paid", "paid_at": "2026-10-28T21:14:03Z", "reference": "order_123", ... }

GET/checkout-sessions?reference=…

Look up by your order id

Pass your own order number as reference when creating a session, then look it up with GET /checkout-sessions/{reference} (paid sessions win if there are several) or list with GET /checkout-sessions?reference=…&status=paid. Every session includes paid: true|false.

cURL
curl https://originpayments.org/api/public/v1/checkout-sessions/HB-11074 -H "Authorization: Bearer $ORIGIN_KEY"
curl "https://originpayments.org/api/public/v1/checkout-sessions?reference=HB-11074&status=paid" -H "Authorization: Bearer $ORIGIN_KEY"

Webhooks (auto-delivery)

Set an https URL in Dashboard → Developers → Order webhook. When a session is paid we POST a checkout_session.paid event (retried 3×; resend any time from the dashboard). Verify the Origin-Signature header: t=<unix>,v1=<hex> where v1 = HMAC-SHA256 of `${t}.${rawBody}` with your signing secret. Reply 2xx quickly; the same event may arrive twice, so deliver once per data.object.id.

JavaScript
// Express — use the RAW body for the signature
app.post("/api/webhooks/origin", express.raw({ type: "application/json" }), (req, res) => {
  const [t, v1] = req.get("Origin-Signature").split(",").map((p) => p.split("=")[1]);
  const expected = crypto.createHmac("sha256", process.env.ORIGIN_WEBHOOK_SECRET)
    .update(`${t}.${req.body}`).digest("hex");
  if (!crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(expected))) return res.status(400).end();
  if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return res.status(400).end();
  const event = JSON.parse(req.body);
  if (event.type === "checkout_session.paid") deliverOrder(event.data.object.reference); // e.g. "HB-11074"
  res.sendStatus(200);
});

// Payload
{ "id": "evt_6f1c…", "type": "checkout_session.paid", "created": 1793923423,
  "data": { "object": { "id": "6f1c…", "status": "paid", "paid": true, "reference": "HB-11074",
                        "amount": 1307, "currency": "USD", "metadata": { … }, "paid_at": "…" } } }

Example: Node.js / Discord bot

A full flow in a few lines. Works in Express, Next.js API routes, discord.js bots, etc.

JavaScript
const API = "https://originpayments.org/api/public/v1";
const headers = { Authorization: `Bearer ${process.env.ORIGIN_KEY}`, "Content-Type": "application/json" };

// 1. Create a payment link
const session = await fetch(`${API}/checkout-sessions`, {
  method: "POST", headers,
  body: JSON.stringify({ amount: 499, description: "Premium role", reference: interaction.user.id }),
}).then((r) => r.json());
await interaction.reply(`Pay here: ${session.url}`);

// 2. Later (e.g. poll every 10s, or when the buyer returns to success_url)
const s = await fetch(`${API}/checkout-sessions/${session.id}`, { headers }).then((r) => r.json());
if (s.status === "paid") giveRole(s.reference);

Example: Python

Python
import os, requests
API = "https://originpayments.org/api/public/v1"
H = {"Authorization": f"Bearer {os.environ['ORIGIN_KEY']}"}

s = requests.post(f"{API}/checkout-sessions", headers=H,
                  json={"amount": 2500, "description": "Pro license"}).json()
print("Send buyer to:", s["url"])

status = requests.get(f"{API}/checkout-sessions/{s['id']}", headers=H).json()["status"]

Errors

Errors return JSON { "error": { "message": "…" } } with status 400 (bad input), 401 (missing, revoked or unapproved key), or 404 (no such session for your account).

Fees

The buyer pays the amount + 2% checkout fee (shown as its own line). From the amount, Origin keeps 4.5%; you receive the rest in your balance. Rounded half-up to the nearest cent.

JSON
{ "amount": 1000, "checkout_fee": 20, "customer_pays": 1020, "processing_fee": 45, "you_receive": 955 }

Discord sale notifications

Paste a Discord channel webhook in Dashboard → Developers. Every successful payment — API, Komerza or SellAuth — posts a message with the amount paid, what you receive, customer email, country and the invoice / session id.

Payouts

Balances are paid out in the coin you choose: USDC on Solana, SOL, BTC, LTC or ETH. Payouts go out every Friday and are marked completed only after the transaction is confirmed on-chain.