B2B Agency Portal, Enterprise Reseller API & Pay-Links
OnwardTicket.us offers three integration paths depending on whether your team places orders manually for visa applicants, automates fulfillment from an internal back-office via REST & webhooks, or monetizes referrals with prefilled checkout links.
48h or 7d. Orders are fulfilled asynchronously by our live desk: Instant Delivery targets 2–20 minutes when the Desk is Online, while Standard and Scheduled (“Need Later”) orders follow your agency's configured SLA. All B2B wallet accounts maintain a $50.00 mandatory minimum reserve at all times — only funds above the reserve are spendable on new orders.Integration Tiers at a Glance
| Tier | Setup Cost | Auth Mechanism | Best For |
|---|---|---|---|
| 1. B2B Agency Web Portal /b2b/apply · /b2b | Free ($0) Prepaid wallet ($50 reserve) | Cookie-backed agency session login | Travel agencies, visa consultants, and relocation teams placing bookings in a web dashboard with custom wholesale pricing and white-label controls. |
2. Enterprise Async Reseller API/api/b2b/* | $1,000 one-time setup Requires active B2B agency | Authorization: Bearer b2b_live_... or b2b_test_... | OTAs, immigration platforms, and travel software automating high-volume order creation, wallet balance checks, PDF retrieval, and HMAC webhook updates. |
3. Public Partner Pay-Links & MCPPOST /api/v1/pay-links | Free ($0) Public / Optional OAuth / MCP | No B2B key required (optional partner ref) | Affiliates, content sites, and AI agents (see /docs/mcp and /docs/api) sending travelers directly to prefilled Stripe checkout. |
1. Free B2B Agency Web Portal
Apply at /b2b/apply. Once approved by our desk, your account is provisioned with bespoke per-route wholesale rates (One-Way, Return, Multi-City, Hotel itineraries, and urgency options), custom SLA labels, white-label traveler email controls, and prepaid wallet funding via Stripe or wire adjustment.
- Reserve protection: Wallet balance minus the agency's mandatory
minBalanceUsd(default$50.00) equalsavailableToSpendUsd. Orders debit only spendable funds. - Pre-fulfillment cancellation: Orders still in
pendingorpaid_pending_fulfillmentcan be cancelled in one click from the Order Drawer for an automatic wallet refund. - Audit exports: Download CSV exports of both orders and wallet ledger transactions directly from /b2b.
2. Enterprise Async Reseller REST API ($1,000 Setup)
Existing approved agencies can request Enterprise API activation from the API Access tab inside /b2b or indicate API requirements when applying at /b2b/apply. Once the one-time $1,000 onboarding setup fee is confirmed, your agency can mint scoped keys with prefixes b2b_live_ (production wallet debits + real fulfillment) and b2b_test_ (sandbox testing).
Authentication & Idempotency
- Send
Authorization: Bearer b2b_live_...on all server-to-server API requests. - Always pass an
Idempotency-Keyheader (for example a UUID per client booking) onPOST /api/b2b/ordersso network retries never double-debit your wallet. - Check
GET /api/b2b/checkorGET /api/b2b/walletbefore high-volume dispatch to confirmavailableToSpendUsdcovers the order total.
Place an Async Flight Order
curl -X POST https://onwardticket.us/api/b2b/orders \
-H "Authorization: Bearer b2b_live_YOUR_SECRET_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 9b2c1d88-44f0-4c9d-9f31-123456789abc" \
-d '{
"serviceKey": "flight",
"tripType": "oneway",
"pnrValidity": "48h",
"urgencyTier": "standard",
"fromAirport": { "iata": "JFK", "city": "New York", "name": "John F. Kennedy Intl", "country": "US" },
"toAirport": { "iata": "LHR", "city": "London", "name": "London Heathrow", "country": "GB" },
"departureDate": "2026-12-15",
"passengers": [
{
"title": "Mr",
"firstName": "ALEX",
"lastName": "MERCER",
"passengerType": "adult"
}
],
"clientReferenceId": "CRM-ORD-4021",
"sendEmailToTraveler": false
}'Endpoint Reference
| Method & Path | Purpose |
|---|---|
GET /api/b2b/check | Inspect agency profile, pricing schedule, SLA labels, wallet balance, mandatory reserve, and spendable balance. |
POST /api/b2b/orders | Create a flight or combined flight + hotel order (debits wallet spendable balance atomically; supports Idempotency-Key and b2b_test_ sandbox keys). |
GET /api/b2b/orders | Paginated order listing with status, search, page, and limit query filters. |
GET /api/b2b/orders/:id | Retrieve full status, assigned PNR numbers, delivery airline metadata, and document IDs. |
GET /api/b2b/orders/:id/download?docId=... | Stream the fulfilled itinerary PDF binary directly from your backend. |
POST /api/b2b/orders/:id/cancel | Cancel pre-fulfillment orders (pending or paid_pending_fulfillment) with instant wallet refund. |
GET /api/b2b/wallet | Retrieve wallet balance, reserve breakdown, and ledger history. |
HMAC-SHA256 Webhook Delivery & Signature Verification
Configure your HTTPS webhook endpoint and subscribe to events (order.created, order.processing, order.completed, order.delivered, order.cancelled, order.refunded, webhook.test) in the API Access tab of /b2b. Every delivery includes:
X-Onward-Event— event name (for exampleorder.delivered)X-Onward-Delivery-Id— unique delivery ID for deduplicationX-Onward-Timestamp— Unix timestamp in secondsX-Onward-Signature— formatted ast=<timestamp>,v1=<hex>(HMAC-SHA256 of"${timestamp}.${rawBody}"using yourwhsec_...webhook secret)X-B2B-Signature— compatibility headersha256=<hex>over the raw JSON payload
import crypto from 'node:crypto';
export function verifyOnwardWebhook(
rawBody: string,
timestampHeader: string,
signatureHeader: string,
webhookSecret: string,
): boolean {
const sigMatch = /v1=([0-9a-f]+)/i.exec(signatureHeader || '');
if (!sigMatch || !timestampHeader) return false;
const ageSeconds = Math.abs(Math.floor(Date.now() / 1000) - Number(timestampHeader));
if (!Number.isFinite(ageSeconds) || ageSeconds > 300) return false;
const expectedHex = crypto
.createHmac('sha256', webhookSecret)
.update(`${timestampHeader}.${rawBody}`)
.digest('hex');
const actual = Buffer.from(sigMatch[1], 'hex');
const expected = Buffer.from(expectedHex, 'hex');
return actual.length === expected.length && crypto.timingSafeEqual(actual, expected);
}3. Public Partner Pay-Links (No B2B Account Required)
If your integration prefers that each traveler pay directly by card instead of drawing from a prepaid B2B wallet, call POST /api/v1/pay-links (or invoke our MCP tools — see /docs/mcp and /docs/api) to generate a prefilled checkout link carrying optional affiliate/partner attribution.
Questions about wholesale rates, Enterprise API onboarding, or custom SLAs? Email contact@onwardticket.us or submit an agency application at /b2b/apply.