Skip to content
For LLMsView as Markdown·

Open a cashier deposit or withdrawal for a player ​

http
POST https://api.onehazel.com/onehazel-api/embed/v1/{key}/payments/intents

Unauthenticated. key is the operator's public embed key (never the operator id) and the browser Origin must be on the operator's allowed websites list, else 403 unauthorized with details.code SURFACE_ORIGIN_NOT_ALLOWED; an unknown or rotated key, an operator id in place of the key, or an account that is not active all get this route's unknown answer (422 invalid_request). The caller proves the player with the same short-lived player token as real-money launch. Body: { "rail": "<connector key>", "direction": "deposit" | "withdrawal", "amount_minor": <positive integer>, "currency": "<the player token currency>", "method": "card", "return_url": "<https url>", "player_token": "<jwt>" } (method defaults to card; a Stripe deposit needs return_url). The player comes from the verified token and the idempotency key is minted server-side. Returns 201 { intent_id, status, redirect_url, exponent }; for a deposit, send the player to redirect_url. Errors use the flat { code, message, retryable } envelope: 400 invalid_request (including "rail unavailable" when the operator turned the provider's Show in cashier switch off), 401 unauthorized ("player token invalid"), 422 invalid_request ("unknown rail", or a currency other than the token's), 422 currency_unsupported, and 404 unavailable while the cashier is not enabled. Rate limited per client IP and per operator.

Section: Surfaces
Operation id: postEmbedV1ByKeyPaymentsIntents

Authentication ​

No authentication.

Parameters ​

NameInRequiredDescription
keypathyes

Request body ​

JSON object.

Responses ​

200 { "success": true, "data": ... }

Errors return { "success": false, "error": { "code": "...", "message": "..." } } with a 4xx or 5xx status.

Example ​

bash
curl -X POST "https://api.onehazel.com/onehazel-api/embed/v1/{key}/payments/intents" \
  -H "Content-Type: application/json" \
  -d '{}'

Machine-readable: openapi.yaml, openapi.json.