Testing BillingClient SDK payments in RuStore Console
To test payments:
-
Make sure test mode is enabled for you.
To apply changes after switching test mode, you need either to wait a few minutes or restart your app if it was open.
-
If you are not yet authorized in RuStore on the device you are using for testing, sign in via VK ID that you are registered with in RuStore Console as the app tester.
-
Open the app on the device or install it if this has not been done yet.
-
Make a purchase in the app. For example, purchase a subscription.
During payment, a payment window will appear with the Test purchase label.
cautionIf the Test purchase label does not appear, you are making a purchase not in the test environment but in the production version of the app. Make sure test mode is enabled, and that you are signed in to the RuStore mobile app with the correct VK ID.
-
Add one of the test bank cards and select it for payment. After adding, this card will be saved in the test profile and then purchases with this card will be available in one click.
When your account is in test mode, use only test cards. If you try to pay with a real bank card, an error will occur.
tip-
Use different test cards to check both successful and unsuccessful payment scenarios. For example, simulate an error when the payment amount exceeds the bank card limit.
-
If you need to test the grace and hold period, use the test card with a 1 kopeck balance. With this card, you can buy a subscription with a free period. After the free period ends, there will be one failed charge attempt, and then the subscription will immediately switch to the grace or hold period, if they are configured for this subscription.
For more details about periods, see How to create a subscription.
-
-
Click Pay.
-
Check whether the payment was successful and whether your app processed the purchase.
If the payment is successful but access to the purchase does not appear, check the implementation in your app. For other issues with testing scenarios, contact support at support@rustore.ru.
When test mode is enabled, the in-app and subscription payments SDK methods for Getting purchase information and Getting the purchase list return only test purchases for the user who is specified as the tester.
Server-side validation of test payments and subscriptions
Using API requests, you can get:
- test payment data;
- test subscription data;
- test subscription status;
- subscription presence confirmation.
Before using the RuStore API, create a new key and specify the methods for testing.
Viewing test payments in RuStore Console
To view the test payment history:
- Open RuStore Console.
- Select Applications in the top menu and open the app in which the test purchase was made.
- Go to the Monetization — Test payments tab.
On the Payment history tab, you can see all payments that were made in test mode. In terms of functionality, this section mirrors Managing payments, which shows user purchases made in the production version of the app.
On the Payment history tab, you can:
-
Switch between SDKs — use the toggle at the top of the tab to select payments for the corresponding SDK (BillingClient or Pay).
-
View detailed information for each payment by clicking it.
-
Issue a refund to retest purchasing a non-consumable item. To do this, click the payment and then click Refund payment.
-
Filter payments by:
- amount — specify the minimum and maximum amount or only one of the parameters;
- status;
- the last 4 digits of the card number — specify at least 4 digits; if you specify fewer, the filter will not work;
- order number;
- date — click the filter again and select a date to specify the required period. By default, the filter shows all payments since the start of the calendar month.