← Home
POST/hyax-api/v1/orders

Report an order from the browser

Provider-agnostic browser reporting for your order confirmation page. With hyax.js installed, `hyax('order', { … })` posts to this endpoint and fills in `teamId` and `visitorId` for you. Because there is no API key, the `teamId` in the body is only trusted when the request carries an `Origin` or `Referer` on one of the team's allowed tracking domains — requests with no origin get 403 `Origin required`, and unknown hosts get 403 `Domain not allowed`. `source` defaults to `OTHER` here (it defaults to `MANUAL` when called with an API key).

Base URL: https://platform.hyax.com · Replace YOUR_API_KEY with your team API key.

Request body

FieldRequiredDescription
teamId Required Sent automatically by hyax.js
email Required Buyer email; creates the person if new
amount Required Number
orderIdNoYour payment/order ID — deduplication key
currencyNoDefault `USD`
sourceNo`STRIPE` | `PAYPAL` | `NOWPAYMENTS` | `USDC_BASE` | `MANUAL` | `OTHER`
nameNoCustomer name
itemsNoArray of line item objects
visitorIdNoSent automatically by hyax.js; required for attribution

Request

curl -X POST 'https://platform.hyax.com/hyax-api/v1/orders' \
  -H 'Content-Type: application/json' \
  -d '{
    "teamId": "clx_team_id",
    "email": "[email protected]",
    "amount": 49.99,
    "currency": "USD",
    "orderId": "pi_3abc123def456",
    "source": "STRIPE",
    "visitorId": "hyax_vid_abc123"
  }'

Response

// Equivalent hyax.js call on your thank-you page
hyax('order', {
  email: '[email protected]',
  amount: 49.99,
  orderId: 'pi_3abc123def456',
  source: 'stripe',
});

// Response
{
  "success": true,
  "data": {
    "id": "clx…",
    "orderNumber": "ORD-abc12345",
    "amount": 49.99,
    "currency": "USD",
    "paymentStatus": "PAID",
    "peopleId": "clx…",
    "isTest": false,
    "isNew": true,
    "createdAt": "2025-01-15T12:00:00.000Z"
  }
}