> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orsunpay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Embed the cashier

> Open a cashier for an authenticated player and keep merchant credentials on your server.

Use the cashier when a signed-in player needs to choose a deposit or withdrawal method in your application. For a single purchase, start with a [hosted sale](https://docs.orsunpay.com/create-sale.md).

**1. Create the session on your backend**

Authenticate the player, then call `POST /v1/cashier/sessions` with your merchant key. Bind the embedded session to the parent origin where the player will open it. Use the session and origin returned or assigned for that integration.

**2. Mount the frame on the allowed origin**

Configure the OrsunPay browser SDK with `createCashier`, the cashier origin and a `getSessionToken` callback. Your backend calls `POST /v1/cashier/sessions/{id}/access-grants` for the current instance. Hand the grant to the SDK in memory. Keep it out of URLs, analytics and browser storage.

**3. Track the operation and wallet receipt**

The frame reads eligible methods and quotes for this session. If your integration handles wallet effects, verify the signed `cashier.wallet.effect_requested` event, apply the effect once and acknowledge it through `POST /v1/cashier/wallet/receipts`. A buyer closing the frame does not confirm a wallet credit.

Call `POST /v1/cashier/sessions/{id}/revoke` from your server to close a session. See the **API Reference** tab for required fields and [webhook events](https://docs.orsunpay.com/webhook-events.md) for the wallet event contract.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.