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

# About the Server-to-Server Model

In this flow, a server-to-server communication occurs. After a purchase, Appcharge triggers a webhook to the publisher’s backend with the transaction details. The publisher's server updates the player's balance accordingly.

**High-Level Flow:**

1. **Player clicks to purchase** The player selects an item to purchase from the in-game store. The game server initiates server-to-server communication with Appcharge's backend to handle the checkout process.
2. **Create Checkout Session** The game server uses the SDK to request from Appcharge’s backend a session that contains all the details needed for opening the checkout. This session setup involves localization, tax calculations, and payment method preparation, all managed through server-to-server API calls.
3. **Checkout Response** The SDK receives a response from the backend confirming that a checkout session has been successfully created. This response includes all the necessary information to proceed with the payment.
4. **Acknowledgement** Once the payment is successfully processed, Appcharge's backend sends a confirmation directly to the game server. This confirmation acknowledges that the purchase was successful and that the player will receive the purchased item.
5. **Balance Update** Following the confirmation, the game server updates the player’s balance in the game to reflect the purchase, thereby completing the transaction.

<img src="https://mintcdn.com/appcharge/Gmzl86FePs5bNqWW/images/docs/2c1de6655b7912a4274d660ec030e049d8520ca53ec42893b39817901fba107e-In-Game_Checkout_Flow_Award.png?fit=max&auto=format&n=Gmzl86FePs5bNqWW&q=85&s=df66750e6e9f9ac02aa937a7d702fdbf" alt="" width="3952" height="2774" data-path="images/docs/2c1de6655b7912a4274d660ec030e049d8520ca53ec42893b39817901fba107e-In-Game_Checkout_Flow_Award.png" />
