@biqli/analytics method storeStripeSession() is the recommended client. It reads the SDK’s current click ID, adds a fresh idempotency key, and sends the authenticated request.
SDK request
bq_id. You can pass bq_id explicitly only when your application already obtained and validated the click ID through the same browser attribution flow.
Authentication and origin
Send the workspace publishable key as a bearer token:Origin whose hostname is allowed in the workspace tracking settings. The publishable key, allowed hostname, click, and Stripe connection must all belong to the same workspace.
Do not use a secret workspace API key for this browser endpoint. Never expose a Stripe secret or restricted key in the request.
Headers
The JSON request body cannot exceed 8,192 bytes.
Request fields
The endpoint rejects unknown fields.Exact mapping request
Origin is rejected by design.
Pending fallback request
You can omitstripe_session_id when it is not yet available:
Response
A new registration returns201 Created:
200 OK. checkout.id is Biqli’s public registration ID, not the Stripe Checkout Session ID.
Exact Checkout mappings default to a 90-day eligibility window. Pending registrations without a Session ID default to 24 hours. Treat these as upper bounds, not a reason to delay payment.
Idempotency
The endpoint requiresIdempotency-Key.
- Repeating the same key and canonical request returns the original response and adds
Idempotency-Replayed: true. - Reusing the key with different request data returns
409 idempotency_conflict. - Attempting to bind an existing Stripe Checkout identity to another click returns
409 stripe_attribution_conflict. - Idempotency records are retained for seven days.
Errors
Errors use Biqli’s structured API error format unless a readiness failure occurs before the controller.
The client tracking limit is 120 requests per 60 seconds for a publishable-key and IP pair. Responses include standard and
X-RateLimit-* diagnostic headers.
SDK errors
The browser method throwsBiqliError. Two client-side errors can occur before an HTTP request:
consent_requiredwhen browser tracking consent is disabled;missing_click_idwhen neither an explicit nor stored valid click ID exists.

