Docs menu · Other checkouts (API)

Connect your sales

Other checkouts (API)

Report sales from any checkout with two HTTP calls. No SDK.

Use this if your sales don't go through Stripe, or you want to report them from your own server.

Before you start

Create an API key under Settings → Workspace → API keys. Keep it on your server; never put it in browser code.

1. Keep the click id

Every Bridgly link adds ?bridgly_click_id=<uuid> to your page. Save it when the visitor lands, for example in a first-party cookie. If you use the Bridgly widget, window.Bridgly.getClickId() returns it.

2. Report the sale

Call this from your server when an order is paid:

curl -X POST https://www.bridgly.co/api/track/sale \
  -H "Authorization: Bearer <your API key>" \
  -H "Content-Type: application/json" \
  -d '{
    "customerExternalId": "user_123",
    "eventName": "purchase",
    "amountCents": 4999,
    "currency": "usd",
    "invoiceId": "order_1001",
    "clickId": "<bridgly_click_id>"
  }'
FieldNotes
customerExternalIdYour id (or email) for the customer
amountCentsOrder total in cents
invoiceIdAlways send it. Your order id. A retry with the same id returns duplicate: true and doesn't pay commission twice
clickIdOptional. Without it, Bridgly reuses the click from this customer's earlier activity

Leads (optional)

For sign-ups or other actions before a sale:

curl -X POST https://www.bridgly.co/api/track/lead \
  -H "Authorization: Bearer <your API key>" \
  -H "Content-Type: application/json" \
  -d '{ "customerExternalId": "user_123", "eventName": "signup", "clickId": "<bridgly_click_id>" }'

Leads count once per customer and event name.

From Node (no package needed)

await fetch("https://www.bridgly.co/api/track/sale", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BRIDGLY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    customerExternalId: order.customerId,
    eventName: "purchase",
    amountCents: order.totalCents,
    currency: "usd",
    invoiceId: order.id,
    clickId: order.bridglyClickId,
  }),
});

Bookings

Booking tools can post to POST /api/integrations/booking/webhook with the same API key. A body with amountCents records a sale; without it, a lead.

Errors

StatusMeaning
400Missing or invalid field, or the workspace has several links and no projectId was sent
401Missing, invalid or revoked key
403Blocked, for example a partner buying through their own link
429Over 120 requests per minute. Wait Retry-After seconds

Stuck? Contact us and a person will reply.