Best Practices
Payment Process
The Tap Payment SDK provides the methods required to handle essential user operations (such as initiating purchase flows and processing corresponding results).
At the transaction confirmation stage, we provide two integration methods:
- (Recommended)For game backend integration, connect to the Tap Payment Server API to fulfill orders, enabling efficient and secure purchase transaction management.
Users can initiate refund requests through the TapTap client. For more information, refer to Refund Processing.
The game backend must integrate the Tap Server Webhook to receive refund result notifications.
- Game clients directly call Tap Payment SDK methods to fulfill orders.
Detect and process purchase transactions
We recommend retrieving a list of unfinished orders before processing payments, as this may reveal potential reasons for unfinished orders
- Network Issues During Purchase: The user successfully purchased an item and received confirmation from the respective channel, but the user's device lost network connectivity before receiving purchase transaction notification via
PurchasesUpdatedListener
. - Multiple Devices: The user purchased an item on one device and then expected to see the item when switching devices.
- Unexpected Crash: The app crashed when a purchase was successfully made externally.
To help games fulfill unfinished orders, we provide two integration methods:
- (Recommended) For game backend integration, use the Tap Payment Server API
- Game clients directly call Tap Payment SDK methods.
Tap Payment Checkout
- The Tap Payment SDK integrates the Tap Login SDK internally. Users must complete authorization and login before the checkout page can be displayed.
- Tap Payment SDK provides built-in checkout UI components to streamline the entire payment flow for games.
Checklist
Before providing payment functionality to players, developers need to test whether the payment process is completed normally and check the following items:
- Does the game meet the SDK Environment Requirements?
- Have the relevant configurations for the Android platform or iOS platform been filled out in the TapTap Developer Backend? Refer to Configure Signature Certificate.
- On a device without the TapTap client installed, can the login process be completed using the WebView method, and can the player's authorized basic information be obtained?
- On a device with the latest TapTap client installed, can the TapTap client be launched to complete the login process, and can the player's authorized basic information be obtained?
- Can Game fetch the product list and display the product information?
- After completing Tap authorization and login, can it launch the checkout page?
- Can payments be completed through the checkout page? During testing, you can configure a sandbox environment for testing purposes.
- After payment completion, can the game retrieve the order information to fulfill and deliver the order?
- Simulate user testing in the production environment to verify the smoothness of the entire payment flow.