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:
- 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. - 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. - 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. - 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. - Balance Update
Following the confirmation, the game server updates the player’s balance in the game to reflect the purchase, thereby completing the transaction.

Updated 6 days ago