ShaunSocial docs ShaunSocial mobile app guide
Version 1.5.6
  • 1.5.6 (this version)

ShaunSocial mobile app guide 1.5.6 / In-app purchases

Overview

AdminDeveloper

This page explains how members buy eWallet credits inside your Android and iOS apps, and what you prepare once for both stores. The steps in each store, from the first test build to refunds and payouts, are on their own pages: Google Play (Android) and App Store (iOS). Each section says who does it: Admin for the site owner, who also owns the Google Play and App Store accounts, and Developer for the person who builds and tests the app.

How buying credits in the app works#

AdminDeveloper

Last updated: 2026-11-19 · v1.5.6

Apple and Google require digital goods bought inside an app to be paid through their own stores. So in the app, members do not pay with PayPal or Stripe: they add credits to their eWallet with an in-app purchase, and then spend the credits as usual. Each in-app purchase is one of your deposit packages: the member pays the store's price and receives the package's amount of credits. The store keeps its commission and pays you the rest.

What the member sees:

  1. In the app, Menu → the wallet row under their name (it shows your site's credit name) opens the Wallet page. It has an Add fund button.
  2. Add fund opens Add fund to wallet with one button per package. The member picks one and taps Proceed to add ….
  3. The store's own payment sheet opens. After paying, the app shows "Processing your payment…" while your site checks the purchase with Apple or Google.
  4. The credits arrive and the app says "Your wallet has been topped up."

There is a second way in: when a member buys something in the app that costs more than their balance, for example a gift, a membership or a paid post, the app first asks for the password (if your site asks for one on payments) and then offers "You need … more to buy this." with Top up … (the smallest package that covers the difference) and Choose another amount. After a successful top-up the purchase goes through straight away.

Add fund and these top-up offers appear only when the eWallet is switched on and at least one active deposit package carries a store product ID for that phone's store.

What has to be in place#

PieceWhereWho
A product in each store for every package you sell in the appGoogle Play Console, App Store ConnectAdmin
The store product IDs on your deposit packagesAdminCP → eWallet → Deposit PackagesAdmin
A key that lets your site ask Google and Apple about a purchase, plus the app's package name and bundle IDAdminCP → Mobile Application → General ConfigurationAdmin
An app built with that package name and bundle ID, uploaded to the storesthe app project, the stores' test tracksDeveloper
Test accounts and a test phonethe stores, the phoneAdmin creates the accounts, Developer tests
Products alone are not enough

Your site checks every purchase with Google or Apple before it adds credits. Without the keys, the member pays and gets no credits until the keys are in place. The app keeps the purchase and tries again by itself (see When an Android purchase does not work and When an iOS purchase does not work).

Read from the code; store steps not run

The app's behaviour on this page was read from the code of the ShaunSocial app 1.5.6. The steps in Google Play Console, Google Cloud and App Store Connect were not run for this guide, and those consoles rename their menus from time to time: look for the same words if a menu is named a little differently. The official help pages are listed at the end of each store's page (Google Play, App Store).

Before you start#

AdminDeveloper

Last updated: 2026-11-19 · v1.5.6

  • Your site runs ShaunSocial 1.5.6 or later. This app version shows Add fund only when the site says in-app top-ups are available, which sites before 1.5.6 do not.
  • The eWallet is switched on and has the deposit packages you want to sell (see Deposit packages in the ShaunSocial guide).
  • Your site runs over HTTPS and its cron job runs every minute (see HTTPS and Set up the cron job). Apple sends refund notices to an HTTPS address, and Google refunds are fetched by a task that runs every hour.
  • Plan your product IDs. Pick one ID per package, for example wallet_credit_100 and wallet_credit_500. Using the same ID in both stores keeps things simple. A product ID can never be changed or reused once created.
  • The app is built with your own package name (Android) and bundle ID (iOS), the same values you enter in the AdminCP (see App name, package name and bundle ID).
For your server administrator

App Store purchases are checked with PHP's built-in web requests, which need the PHP setting allow_url_fopen on. With it off, every iOS purchase fails to verify. Google Play purchases are not affected. Check it on the server:

php -r 'var_dump(ini_get("allow_url_fopen"));'
string(1) "1"

Many hosting panels switch it off by default; it is a server-level setting, so turn it on in the hosting panel's PHP settings or ask your host. It cannot be changed from .htaccess or the site's code.

When this is in place, set up each store you sell in: Google Play (Android) and App Store (iOS). What each AdminCP field for in-app purchases means is explained in Buying credits in the apps in the ShaunSocial guide.

After the stores approve your app#

Admin

Last updated: 2026-11-19 · v1.5.6

  • Test purchases. The eWallet setting Accept sandbox and test store purchases is on after installing, so test accounts (Apple sandbox and TestFlight, Google Play license testers) add real credits to real wallets. Keep it on while any version of your app is in store review: reviewers pay with sandbox accounts. Between reviews you may switch it off, so test accounts cannot create credits; a test purchase is then refused with "Test purchases are not accepted." and no credits are added (see The In-App Purchase settings).
  • New packages. To sell a new package, create the store products (Google Play: active at once; App Store: submitted for review) and add their IDs to a new active deposit package.
  • Refunds are handled by your site on its own: see Refunds and other events.

Change log#

Last updated: 2026-11-19 · v1.5.6

Date (GMT+7)SectionWhat changed
2026-11-19allFirst version for the ShaunSocial app 1.5.6. The app's behaviour was read from the 1.5.6 code; the steps in the store consoles were not run for this guide.
2026-11-19allSplit by platform: Android and iOS have their own pages.