Server-to-Server (Webstore-like)
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 17 days ago