Sell shop items for real money through the App Store and Google Play.
A real-money item is a shop item the player pays for in the App Store or Google Play. The store
charges the player; Flock asks the store whether the purchase is real, then delivers the item. Your
game makes the same call it makes for any item: Shop.PurchaseAsync(item.Id) in Unity, the shop
provider’s Purchase (the Flock Purchase node) in Unreal.
Player taps Buy ──▶ store charges ──▶ Flock checks with the store ──▶ item delivered ──▶ store purchase finished
The store’s purchase is finished only after Flock delivered, so a crash or a lost connection in
between never loses what the player paid for: the store hands the purchase back at the next launch
and Flock delivers it then. One store purchase is delivered once, however many times it is sent.
Real-money purchases need the Flock SDK for Unity 1.98.0 or later, or the Flock SDK for Unreal 1.45.0
or later (its Blueprint nodes from 1.47.0). Wallet purchases need neither: see
Shops and Inventory.
Unity needs Unity IAP 5 (com.unity.purchasing 5.x) in the project. On Android, set Minimum
API Level to 23 or higher (Player Settings → Other Settings): Unity IAP 5’s Google Play Billing
library needs it, and a Unity 2021.3 project starts at 22, so its build stops with a manifest merger
error.
Unreal needs nothing installed: Flock reaches the store through the engine’s online subsystem,
which it turns on. Google Play needs UE 5.8 or later, the first engine with a Billing Library Google
Play still takes; on UE 5.4 to 5.7 connecting the store is refused.
Connect each store to Flock in the dashboard, with your game’s own keys.
Price the items in real money and give each the id of its product in the store.
Create the products in the store with those ids.
Connect the store in your game once at start.
Check the setup from the game.
1
Connect the stores to Flock
Open Monetization → Payments in the Flock dashboard and connect each store you sell in. Flock uses
these keys to ask the store about a purchase; they never reach the player’s device.
In the menu at the top of the page, choose the game: each game connects its own stores.
On the Providers tab, under Mobile stores, press Connect beside Google Play or
App Store.
Fill in every field, as the tables below say, and leave Active ticked.
Press Save. Success: the store shows Connected and names the keys it holds.
The keys are encrypted before they are stored and are never shown again: to replace one, press
Update keys and enter every field again. Only studio admins and managers connect stores. The
Sales tab lists every sale, and refunds one when you press Refund.
Google Play
App Store
Field
What to enter
Package name
Your app’s package name, as in the Google Play Console (e.g. com.studio.game)
Service account JSON
The whole text of a Google Cloud service account’s JSON key
To make the service account:
In the Google Cloud console, in any project, turn on the Google Play Android Developer API.
Create a service account there, and add a JSON key to it. The key downloads as a file.
In the Google Play Console, under Users and permissions, invite the service account’s email
address, give it your app, and allow View financial data and Manage orders and
subscriptions.
Paste the JSON file’s whole text into Service account JSON.
Google can take a while to accept a new service account. Until it does, the setup check below says
the store refused your keys. In our test it took effect a minute after re-saving one of the app’s
products in the Play Console.
Field
What to enter
Issuer ID
From App Store Connect, Users and Access → Integrations → In-App Purchase
Key ID
The key you generate on that page
Private key
The whole text of the .p8 file that key downloads as
Bundle ID
Your app’s bundle identifier
Each store’s form also shows a Notification URL. Give it to the store (App Store Connect’s App
Store Server Notifications, Google Play’s real-time developer notifications) so Flock hears about
refunds.
2
Price the items in real money
An item costs real money when its currency is one of the Real Currencies in the currency config of
its Game Version (Monetization → Currencies, the Real Currencies tab; see
Currencies and Wallets). In the item’s form (Monetization → Shops,
the shop’s Items tab; see Shops and Inventory), type the Price as
the player sees it, such as 3.99; the server keeps it in the currency’s smallest unit, so the SDK
reads 399 in SAR for SAR 3.99. Success: the item’s tile shows Real money.On each such item, under Store product IDs, enter its product id for each store, exactly as the
store has it. The item’s type decides what kind of product it is in the store:
Item type
Store product
What the player gets
Currency pack
Consumable
Its rewards, straight into the wallet
Consumable
Consumable
An inventory entry, used up later with ConsumeOneAsync (Unreal: ConsumeOne)
Standard
One-time (non-consumable)
An inventory entry. The store sells it once per store account
3
Create the products in the store
Create each product with the same id: in the Google Play Console under Monetize → Products → One-time
products, in App Store Connect under your app’s In-App Purchases. Activate it. The price the
player sees is the one the store sets for their country.
4
Connect the store in your game
Connect once, after the SDK starts, and keep the connection for the whole session. On a phone the
store is found by itself; on Windows, macOS, Linux and WebGL the same call connects a web checkout instead
(Web Payments).
Unity
Unreal
The Unity editor cannot show a store purchase succeed. It connects a web checkout unless the build
target is Android or iOS, and then Unity IAP’s fake store answers, whose purchases Flock refuses. To
see a store purchase go through, build to a device that has the store (see
Test before you ship).First install Unity IAP 5: open Window → Package Manager, click +, choose Add package by
name… (Install package by name… in Unity 6), enter com.unity.purchasing and a 5.x version.
Window → Package Manager with In-App Purchasing (com.unity.purchasing) selected, version 5.
For Android, also set Minimum API Level to 23 or higher in Edit → Project Settings → Player →
Android → Other Settings.Then add this component to an object in your first scene. RefreshTheShop stands for your own code
that reads the wallet and inventory again and redraws the shop.
using Flock.Exceptions;using Flock.Providers;using UnityEngine;public class GameStore : MonoBehaviour{ FlockStore store; async void Start() { try { store = await FlockStore.ConnectAsync(); } catch (FlockException e) { Debug.LogWarning(e.Message); // what is wrong, then a Fix: line return; } // Every real-money purchase Flock delivers, the ones PurchaseAsync answers included: // refresh what the screen shows here. store.PurchaseCompleted += (item, result) => RefreshTheShop(); // A purchase the player paid for that Flock could not deliver. It comes back at the next launch. store.PurchaseNotDelivered += purchase => Debug.LogWarning(purchase.Error.Message); } void OnDestroy() => store?.Dispose(); void RefreshTheShop() { // Read the wallet and inventory again, then redraw the shop. }}
From now on Shop.PurchaseAsync buys real-money items through this connection. Without one, it
refuses a real-money item before anything is sent, and says to connect the store. Connecting a
store is refused when Unity IAP 5 is not installed. The examples below use this store.
First set up the store in the project:
Android (UE 5.8 or later): in Project Settings → Platforms → Android, turn on Enable
Google Play Support, enter the game’s Google Play license key, and add the
com.android.vending.BILLING permission. Keep bSupportsInAppPurchasing=true under
[OnlineSubsystemGooglePlay.Store] (the engine’s default). Google Play takes new builds only with a
current Billing Library, and only UE 5.8 ships one; on UE 5.4 to 5.7, a game with billing code of
its own hands each purchase to Flock itself (Your own store code in Unreal).
iOS: in Project Settings → Platforms → iOS, turn on Enable StoreKit Support, and add the
In-App Purchase capability to the app. Flock’s App Store support is written against the engine’s own
StoreKit code and has not yet run on an iPhone: buy in the App Store’s sandbox before you ship.
Windows, Mac and Linux have no phone store: real-money items are bought through a
web checkout. A Steam build must not use one, since Steam allows payments
only through its own wallet; Flock has no store provider for Steam, the Epic Games Store or consoles.
Then connect once Flock has initialized. Flock’s subsystem keeps the connection (Sdk->GetStore())
until it is disconnected or Flock shuts down.
#include "FlockSubsystem.h"#include "Store/FlockStore.h"UFlockSubsystem* Sdk = UFlockSubsystem::Get(this); // this: any object in the game's worldUFlockStore::Connect(Sdk, FFlockStoreOptions(), [](TFlockResult<UFlockStore*> Connected){ if (!Connected.bSuccess) { UE_LOG(LogTemp, Warning, TEXT("%s"), *Connected.Error.ToDisplayText()); // what is wrong, then a Fix: line return; } // Every real-money purchase Flock delivers, the ones Purchase answers included: // refresh what the screen shows here. Connected.Value->OnPurchaseCompleted.AddLambda([](const FFlockShopItem& Item, const FFlockPurchaseResult& Result) { }); // A purchase the player paid for that Flock refused to deliver, or whose delivery is unknown // (Purchase.Error.bOutcomeUnknown: Flock may have delivered it). It stays unfinished in the store // and is sent again at the next launch, or by Restore: tell the player it will arrive. Connected.Value->OnPurchaseNotDelivered.AddLambda([](const FFlockUndeliveredPurchase& Purchase) { UE_LOG(LogTemp, Warning, TEXT("%s"), *Purchase.Error.ToDisplayText()); });});
From now on the shop provider’s Purchase buys real-money items through this connection. Without
one, it refuses a real-money item before anything is sent, and says to connect the store. Leave
FFlockStoreOptions::PaymentProvider empty for this platform’s own way to pay. Connect is refused:
when Flock’s store module is not loaded, for example with the engine’s Online Subsystem plugin
turned off: a phone store’s rules forbid paying for digital goods elsewhere, so Flock never opens
a web page instead;
on Android with an engine older than UE 5.8, or with bDisableLocalAcknowledgeAndConsume=true under
[OnlineSubsystemGooglePlay.Store] (the engine would then finish nothing Flock delivers);
for a payment gateway (Stripe, Tap or Moyasar) named on Android or iOS: a phone store’s rules forbid
paying for digital goods on a web page;
for a PaymentProvider Flock does not know: name one of FlockPaymentProviders, or leave it empty;
on a platform that is neither a phone nor Windows, Mac or Linux (a console): it has no store Flock pays
through, and a web checkout opens only on a computer;
while another connection is connected: use that one, or disconnect it first.
Receipts are not tied to the player’s store account, on Android and iOS alike. The engine hashes an
account id before Google sees it and never hands one to Apple, so Flock sends none, and the server
marks each such purchase unbound: a receipt taken from one device could be redeemed once by another Flock account.In Blueprint, call Flock Connect Store (under Flock | Store) from Call or Register on
Initialized on Flock’s events (Get Events), which runs at once when Flock has already
initialized. Leave its Options pin unwired for every default. Bind On Store Purchase
Completed and On Store Purchase Not Delivered on Flock’s events once: they hear every
delivery the connected store reports, whichever connection made it.
Connect the store once Flock is ready, then buy: Is Purchase Paid tells a delivered purchase from one the store is still waiting to be paid for.
The picture buys straight after connecting only to stay short. In your game, connect once at start
as above, and run Flock Purchase from the player’s Buy button with the Id of an item read
from its shop (Flock Get Shop By Name, then its Shop Items, then each item’s Id):
gem_pack_small is an example item id, not a name.
5
Check the setup
The setup check asks the store and Flock’s server whether everything is in place, without buying
anything. It needs a signed-in player, so run it from a developer button after signing in, while you
set up.
Unity
Unreal
CheckSetupAsync throws FlockAuthException without a signed-in player, so sign the player in
first (Authenticate a player). The code runs inside an async
method.
using Flock.Models;using Flock.Providers;using UnityEngine;FlockStoreSetupCheck check = await store.CheckSetupAsync();if (check.IsReady) Debug.Log("The store has every item, and Flock can check purchases with your keys.");foreach (ShopItem item in check.NotFoundInTheStore) Debug.Log($"{item.Name}: the store has no product with this item's id.");foreach (ShopItem item in check.MissingProductId) Debug.Log($"{item.Name}: no product id for this store on the item.");if (check.ServerProblem != null) Debug.Log(check.ServerProblem.Message); // the keys in Monetization > Payments, and how to fix themif (check.NotChecked != null) Debug.Log(check.NotChecked); // on a web checkout: the gateway, and how to check it instead
CheckSetup fails (Auth) without a signed-in player.
UFlockStore* Store = UFlockSubsystem::Get(this)->GetStore(); // null until the store is connectedif (Store == nullptr){ return;}Store->CheckSetup([](TFlockResult<FFlockStoreSetupCheck> Checked){ if (!Checked.bSuccess) { UE_LOG(LogTemp, Warning, TEXT("%s"), *Checked.Error.ToDisplayText()); // no player signed in, for one return; } const FFlockStoreSetupCheck& Check = Checked.Value; if (Check.IsReady()) { UE_LOG(LogTemp, Display, TEXT("The store has every item, and Flock can check purchases with your keys.")); } for (const FFlockShopItem& Item : Check.NotFoundInTheStore) { UE_LOG(LogTemp, Display, TEXT("%s: the store has no product with this item's id."), *Item.Name); } for (const FFlockShopItem& Item : Check.MissingProductId) { UE_LOG(LogTemp, Display, TEXT("%s: no product id for this store on the item."), *Item.Name); } if (Check.bHasServerProblem) { // The keys in Monetization → Payments, and how to fix them. UE_LOG(LogTemp, Display, TEXT("%s"), *Check.ServerProblem.ToDisplayText()); }});
In Blueprint this is Flock Check Store Setup; Is Store Ready says whether anything needs
fixing.
Show the price the store gives, which is in the player’s currency with their taxes, rather than the
item’s Flock price.
Unity
Unreal
item is a real-money ShopItem read from its shop.
using Flock.Providers;FlockStorePrice price = store.GetPrice(item.Id);string label = price != null ? price.Text : "Not available"; // e.g. "SAR 4.59", "$1.09"
GetPrice is null when the store did not find the product. The prices in the comment are examples:
the text is the store’s own. On a web checkout GetPrice gives the item’s own price and is never null.
UFlockStore* Store = UFlockSubsystem::Get(this)->GetStore(); // null until the store is connectedif (Store == nullptr){ return;}// Item: an FFlockShopItem read from its shop.const TFlockResult<FFlockStorePrice> Price = Store->GetPrice(Item.Id);const FString Label = Price.bSuccess && Price.Value.bFoundInTheStore ? Price.Value.Text // e.g. "SAR 4.59", "$1.09" : FString(TEXT("Not available"));
bFoundInTheStore is false when the store did not find the product. GetPrice fails (Validation)
for an item that was not in the game’s shops when the store connected, or has no product id for this
store. The prices in the comment are examples: the text is the store’s own. On a web checkout it gives
the item’s own price. In Blueprint this is Flock Get Store Price: false, with an Error saying
why, when no store is connected or the item has no price here.
The code runs inside an async method; item is a real-money ShopItem read from its shop (see
Shops and Inventory), and ShowReward and ShowWaitingForPayment
stand for your own screens.
using Flock;using Flock.Exceptions;using Flock.Models;using Flock.Providers;using UnityEngine;try{ PurchaseResult bought = await FlockClient.Instance.Shop.PurchaseAsync(item.Id); if (bought.IsPaid) ShowReward(bought.Granted); // delivered else ShowWaitingForPayment(); // pending: PurchaseCompleted reports it once paid}catch (FlockStoreException e) when (e.Reason == FlockStoreFailureReasons.Cancelled){ // The player closed the store's dialog. Nothing was charged.}catch (FlockStoreException e) when (e.Reason == FlockStoreFailureReasons.AlreadyOwned){ // This store account already owns the one-time item: offer Restore purchases.}catch (FlockStoreException e){ // No payment went through (declined, not available, store down, a web checkout refunded...). Nothing was bought. Debug.Log(e.Reason + ": " + e.Message);}catch (FlockException e) when (e.OutcomeUnknown){ // No answer said whether Flock delivered. Read the wallet and inventory again.}catch (FlockException e){ // The player paid, and Flock refused the purchase (e.ErrorCode says why). The store keeps it, // and it is sent again at the next launch. PurchaseNotDelivered reports it too. Debug.LogWarning(e.Message);}
Every case, in short:
What happens
What PurchaseAsync does
What the player sees
Paid and delivered
Returns, IsPaid true
The reward
The store waits for the payment (a slow way to pay, “Ask to Buy”)
Returns, Status pending
”Waiting for payment”; PurchaseCompleted follows once paid
The player cancels
Throws FlockStoreException, Cancelled
Nothing; nothing charged
The payment is declined (App Store)
FlockStoreException, PaymentDeclined
Try another way to pay; nothing charged
A one-time item already owned
FlockStoreException, AlreadyOwned
Offer Restore purchases
An earlier purchase of it still waits
FlockStoreException, AlreadyPending
It arrives through PurchaseCompleted
The product is not in the store
FlockStoreException, ProductUnavailable
Check the product id (the setup check lists it)
The store is offline or off, or Google Play declined the payment (Google reports both the same way)
FlockStoreException, StoreUnavailable
Check the connection and the way to pay, then try again; nothing charged
Nobody signed in to the store
FlockStoreException, NotSignedInToTheStore
Sign in to the store, then try again
Paid, and Flock refused it
Throws FlockException with its code
Delivered at a later launch once fixed
No answer from Flock
FlockException, OutcomeUnknown true
Read the wallet and inventory again
If you cancel the call’s own CancellationToken, the store’s purchase carries on, and
PurchaseCompleted reports it once paid. If the player signs out while the store’s dialog is open, the call
ends as cancelled too, and the store’s purchase, once paid, is delivered to the player who bought it at a
later sign-in, or through Restore purchases.
UFlockSubsystem* Sdk = UFlockSubsystem::Get(this);const TWeakObjectPtr<UFlockSubsystem> WeakSdk(Sdk);// Item: an FFlockShopItem read from its shop.Sdk->GetShopProvider()->Purchase(Item.Id, [WeakSdk](TFlockResult<FFlockPurchaseResult> Bought){ if (Bought.bSuccess && Bought.Value.IsPaid()) { return; // delivered: Bought.Value.Granted lists what the player got } if (Bought.bSuccess) { return; // pending: show "Waiting for payment"; OnPurchaseCompleted reports it once paid } const FFlockError& Error = Bought.Error; if (Error.Type == EFlockErrorType::Store) { // The store did not take the payment. Nothing was charged. if (Error.StoreFailureReason.Equals(FlockStoreFailureReasons::Cancelled, ESearchCase::CaseSensitive)) { return; // the player closed the store's dialog } if (Error.StoreFailureReason.Equals(FlockStoreFailureReasons::AlreadyOwned, ESearchCase::CaseSensitive)) { return; // this store account already owns the one-time item: offer Restore purchases } UE_LOG(LogTemp, Warning, TEXT("%s"), *Error.ToDisplayText()); // declined, not available, store down... return; } if (Error.bOutcomeUnknown) { UFlockSubsystem* Flock = WeakSdk.Get(); UFlockStore* Store = Flock ? Flock->GetStore() : nullptr; if (Store && Store->IsWebCheckout()) { // The payment page may still be paid: read the open checkouts before offering the item // again. One paid meanwhile is reported through OnPurchaseCompleted. Store->Restore([](TFlockResult<FFlockStoreRestore> Read) {}); return; } // A phone's store took the payment; only Flock's delivery is unknown. Tell the player it will // arrive, and never offer the item again on this answer: OnPurchaseCompleted reports it once // delivered, at the next launch or after Restore purchases. return; } if (Error.Type == EFlockErrorType::Cancelled) { return; // the player signed out or changed: a payment already made is still delivered (see below) } if (Error.Type == EFlockErrorType::Auth && Error.StatusCode != 403) { // The sign-in was refused or has ended. Sign the player in again: a payment already made stays // unfinished in the store, raises no OnPurchaseNotDelivered, and is delivered after that sign-in. return; } // Otherwise Flock refused it. Most refusals come before the store's dialog opens, and nothing was // charged: another store purchase under way, the item no longer for sale, nobody signed in. If the // player paid and Flock refused the delivery, OnPurchaseNotDelivered reported it just before this // answer: the store keeps the purchase and sends it again at the next launch, so do not sell it again. // Error.ToDisplayText() says which, and how to fix it. UE_LOG(LogTemp, Warning, TEXT("%s"), *Error.ToDisplayText());});
Every case, in short:
What happens
What Purchase completes with
What the player sees
Paid and delivered
Success, IsPaid() true
The reward
The store waits for the payment (a slow way to pay, “Ask to Buy”)
Success, StatusFlockPurchaseStatuses::Pending
”Waiting for payment”; OnPurchaseCompleted follows once paid
The player cancels
Failure of type Store, StoreFailureReasonCancelled
Nothing; nothing charged
The payment is declined (App Store)
Store, PaymentDeclined
Try another way to pay; nothing charged
A one-time item already owned
Store, AlreadyOwned
Offer Restore purchases
An earlier purchase of it still waits
Store, AlreadyPending
It arrives through OnPurchaseCompleted
The product is not in the store
Store, ProductUnavailable
Check the product id (the setup check lists it)
The store is offline or off, or Google Play declined the payment
Store, StoreUnavailable
Check the connection and the way to pay, then try again; nothing charged
Nobody signed in to the store
Store, NotSignedInToTheStore
Sign in to the store, then try again
A second store purchase while one is under way
Validation
Wait for the first to end; nothing charged
Refused before the store’s dialog: the item is no longer for sale, or nobody is signed in to Flock
Validation (ShopItemNotForSale) or Auth
Nothing charged: read the shop again, or sign in first
The player signs out or changes while it runs
Cancelled
A payment already made is still delivered (below)
Paid, and Flock refused it
Failure with its ErrorCode; OnPurchaseNotDelivered reports it just before
Delivered at a later launch once fixed; do not sell it again
No answer from Flock, on a phone’s store
Failure with bOutcomeUnknown true; OnPurchaseNotDelivered may report it too
Paid: say it will arrive. OnPurchaseCompleted reports it at the next launch, or after Restore purchases. Never offer it again on this answer
No answer from Flock, on a web checkout
Failure with bOutcomeUnknown true
The payment page may still be paid: read the open checkouts with Restore before offering it again
The store keeps one purchase dialog open at a time, so a second purchase, of any item, is refused
until the first has ended. If the player signs out, or another player signs in, while the store’s
dialog is open, the call ends Cancelled; a payment made after that is delivered when the player who
opened the dialog signs in again during this run of the game. After a restart the store hands it back
to whoever is signed in then, or to Restore purchases.OnPurchaseNotDelivered reports a delivery Flock refused, and also one whose answer never came
(Error.bOutcomeUnknown), which Flock may have made. Either way the store keeps the purchase and sends
it again, so treat it as on its way, never as lost or as something to sell again.In Blueprint, buy with Flock Purchase (under Flock | Shop). Its success pin can carry a
purchase the store is still waiting to be paid for: check Is Purchase Paid before handing anything
over; On Store Purchase Completed follows once it is paid. On its failure pin, compare the
Error’s Store Failure Reason with the Flock Store Failure Reason nodes (Cancelled, Payment
Declined, Already Owned, Already Pending, Product Unavailable, Store Unavailable, Not Signed
In To The Store, Expired, Unknown), and check Outcome Unknown. True means no answer came:
On a phone’s store the player has paid, and only Flock’s delivery is unknown. Tell them it will
arrive and never offer the item again on this answer; On Store Purchase Completed reports it at
the next launch, or after Flock Restore Purchases.
On a web checkout (Is Web Checkout on Flock Get Store) the payment page may still be
paid. Run Flock Restore Purchases, which reads the player’s open checkouts, before offering the
item again.
A player on a new phone, or after a reinstall, gets their one-time items back with Restore
purchases. Start it from a button once the player is signed in to Flock: without a signed-in player
it fails. On the App Store it also asks the player to sign in to the store.
Unity
Unreal
RestoreAsync throws FlockAuthException without a signed-in player. The code runs inside an
async method.
using Flock.Models;using Flock.Providers;using UnityEngine;FlockStoreRestore restore = await store.RestoreAsync();foreach (ShopItem item in restore.Restored) Debug.Log("Restored " + item.Name);foreach (FlockUndeliveredPurchase purchase in restore.NotDelivered) Debug.Log(purchase.ProductId + ": " + purchase.Error.Message); // e.g. bought by another Flock player
UFlockStore* Store = UFlockSubsystem::Get(this)->GetStore(); // null until the store is connectedif (Store == nullptr){ return;}Store->Restore([](TFlockResult<FFlockStoreRestore> Restored){ if (!Restored.bSuccess) { UE_LOG(LogTemp, Warning, TEXT("%s"), *Restored.Error.ToDisplayText()); // no player signed in, for one return; } for (const FFlockShopItem& Item : Restored.Value.Restored) { UE_LOG(LogTemp, Display, TEXT("Restored %s"), *Item.Name); } for (const FFlockUndeliveredPurchase& Purchase : Restored.Value.NotDelivered) { // e.g. bought by another Flock player UE_LOG(LogTemp, Display, TEXT("%s: %s"), *Purchase.ProductId, *Purchase.Error.ToDisplayText()); }});
One restore runs at a time on a phone’s store: a second is refused until the first completes. In
Blueprint this is Flock Restore Purchases (Restored, Not Delivered).
A purchase delivered before grants nothing again. One-time items belong to the Flock player who bought
them, so the player must sign in to that same Flock account (a device sign-in is tied to the device;
link the account to keep purchases across devices). See Linking Accounts.
Some purchases end after the call: a payment that clears later, or a purchase interrupted by a crash or
a lost connection. The store hands each back when the game connects to it; once a player is signed in,
Flock delivers it and PurchaseCompleted reports it (Unreal: OnPurchaseCompleted, or On Store
Purchase Completed in Blueprint). One Flock could not be reached for is sent again at
the next launch, or at once when the player taps Restore purchases. Subscribe to it
before anything else needs it, and use it to refresh the shop and the wallet.
Set the item, or its shop, to Inactive in the dashboard. Players’ shop reads leave it out at once,
and the purchase call checks with Flock just before the store’s dialog, so a game still showing the item
refuses with ShopItemNotForSale and the store never charges. A purchase the player already paid for is
still delivered: the game keeps the products it sold, so an unfinished purchase of an inactive item is
delivered at the next launch, and restoring still gives back one-time items.
In the Unity editor, the build target decides: with Android or iOS selected, Unity IAP’s fake store
answers. On another build target, name the store to test with:
FlockStore.ConnectAsync(new FlockStoreOptions { PaymentProvider = PaymentProviders.GooglePlay }). The
setup check works there and tests your keys, but Flock refuses the fake store’s purchases, so a
purchase in the editor ends as not delivered.
In Unreal, the store is reached on an Android or iOS device only: in the editor and on Windows,
macOS and Linux, Connect makes a web checkout. Test store purchases on a device, installed as below.
Google Play: upload a build to the internal testing track, add your testers under
License testing in the Play Console, and install the game from the testing link in the Play Store.
A tester’s purchase is not charged.
App Store: use a Sandbox tester from App Store Connect on a device.
Flock records revenue on the server, once per store purchase, at the item’s Flock price and currency.
The SDK sends no revenue of its own for a store purchase, and a wallet purchase is never counted as
revenue.
Every failure says what went wrong and how to fix it: in Unity its Message, with the fix on a Fix:
line; in Unreal Error.ToDisplayText(), with the fix in Error.Hint. In Unreal each code below is
EFlockErrorCode:: followed by its name. The store purchase’s own codes:
Code
What happened
What to do
PaymentProviderStoreCredentialsRejected
The store refused your game’s keys
Check the keys in Monetization → Payments, and the service account’s access in the Play Console. The same purchase goes through once fixed
PaymentProviderCredentialsUnreadable
The server cannot read the stored keys
Enter the keys again
PaymentProviderProviderNotFound
The store is not connected, or it is paused
Connect it, or turn Active back on
PaymentProviderReceiptProductMismatch
The purchase is for another product than the item’s
Check the item’s Store product IDs
PaymentProviderReceiptBelongsToAnotherPlayer
Another Flock player bought it, or redeemed it
Sign in as the player who bought it
PaymentProviderReceiptPending
The store still waits for the payment
Nothing to do: it is sent again at the next launch
PaymentProviderStoreUnavailable
Flock could not reach the store
Nothing to do: it is sent again at the next launch
PaymentProviderReceiptInvalid
The store did not confirm the purchase
Read the reason: a fake purchase, a refunded one, or a bad moment at the store
A game on Unity IAP 4.x keeps its own purchase code and hands each purchase to Flock with
Shop.RedeemStoreReceiptAsync, finishing it in the store only once that returns.
FlockUnityIap4Store.cs
in the SDK’s GitHub repository is a ready-made version to copy into your project (the .unitypackage
does not include it).
A game with billing code of its own (on Android with UE 5.4 to 5.7, for one) hands each purchase to Flock
with the shop provider’s RedeemStoreReceipt (Flock Redeem Store Receipt, with Make Google Play
Receipt or Make App Store Receipt), finishing it in the store only once that succeeds. A redemption
is safe to send again: one store purchase makes one Flock purchase.Use one way to buy. The engine’s own in-app purchase Blueprint nodes finish a purchase as it is made,
before Flock has delivered it, so a purchase Flock then refuses is lost. The editor’s Flock setup panel
warns when a Blueprint uses them in a game whose shops sell real-money items; keep them only for
products no Flock shop item sells.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Qwacks","description":"Developer documentation for the Qwacks platform — Flock, Protokite, and Data Duck.","colors":{"primary":"#0099FF","light":"#33ADFF","dark":"#0077CC"},"logo":{"light":"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9","dark":"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9"},"favicon":"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9","appearance":{"default":"dark","strict":true},"background":{"image":{"light":"https://mintcdn.com/qwacks/YCE61raZ52-QoE_F/officalbg.jpg?fit=max\u0026auto=format\u0026n=YCE61raZ52-QoE_F\u0026q=85\u0026s=5be5500ff5788565cf90d6a3e2111d47","dark":"https://mintcdn.com/qwacks/YCE61raZ52-QoE_F/officalbg.jpg?fit=max\u0026auto=format\u0026n=YCE61raZ52-QoE_F\u0026q=85\u0026s=5be5500ff5788565cf90d6a3e2111d47"},"color":{"light":"#FFFFFF","dark":"#181E2E"}},"navbar":{"links":[{"href":"https://www.qwacks.com/pricing","label":"Pricing"},{"href":"https://github.com/QwackStack/FlockUnitySdk/releases","label":"Unity SDK"},{"href":"https://github.com/QwackStack/FlockUnrealSdk/releases","label":"Unreal SDK"}],"primary":{"type":"button","label":"Dashboard","href":"https://flock-saas.qwacks.com"}},"fonts":{"heading":{"family":"Readex Pro"},"body":{"family":"Inter"}},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":"welcome"},{"language":"ar","navbar":{"links":[{"href":"https://www.qwacks.com/pricing","label":"الأسعار"},{"href":"https://github.com/QwackStack/FlockUnitySdk/releases","label":"حزمة Unity"},{"href":"https://github.com/QwackStack/FlockUnrealSdk/releases","label":"حزمة Unreal"}],"primary":{"type":"button","label":"لوحة التحكم","href":"https://flock-saas.qwacks.com"}},"href":"ar/welcome"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"qwacks","hasAudioNarration":false,"actualSubdomain":"qwacks","customDomains":["docs.qwacks.com"],"gitSource":{"type":"github","owner":"qwackstack","repo":"qwacksdocs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6af4bb9aa7570e2358297eb2","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"ar","tag":"Flock","count":31},{"language":"en","tag":"Flock","count":31},{"language":"ar","tag":"الميزات","count":22},{"language":"en","tag":"Features","count":22},{"language":"ar","tag":"Qwacks","count":12},{"language":"en","tag":"Qwacks","count":12},{"language":"ar","tag":"بدء الاستخدام","count":11},{"language":"en","tag":"Getting Started","count":11},{"language":"ar","tag":"اللعب الجماعي","count":5},{"language":"ar","tag":"Protokite","count":5},{"language":"ar","tag":"المدفوعات والفوترة","count":5},{"language":"en","tag":"Multiplayer","count":5},{"language":"en","tag":"Protokite","count":5},{"language":"en","tag":"Payments \u0026 Billing","count":5},{"language":"ar","tag":"اللاعبون","count":4},{"language":"ar","tag":"الاقتصاد والمدفوعات","count":4},{"language":"en","tag":"Players","count":4},{"language":"en","tag":"Economy and Payments","count":4},{"language":"ar","tag":"المفاهيم","count":3},{"language":"en","tag":"Concepts","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":".nav-logo{height:2.5rem!important;max-width:none!important}#topbar-cta-button .bg-primary-dark{background-color:#feca13!important}#topbar-cta-button:hover .bg-primary-dark{background-color:#f89c1c!important}#topbar-cta-button a,#topbar-cta-button a *{color:#1a1206!important}.qwacks-lang-toggle{display:inline-flex;align-items:center;align-self:center;gap:0.5rem;padding:0.25rem 1rem;border:1px solid rgba(255, 255, 255, 0.1);border-radius:56px;background:transparent;color:#fafafa;font-family:\"Readex Pro\", sans-serif;font-size:0.875rem;line-height:1.25rem;white-space:nowrap;margin-inline-start:auto;margin-inline-end:1rem}.qwacks-lang-toggle__option{color:inherit;text-decoration:none;font-weight:400;opacity:0.3}.qwacks-lang-toggle__option:hover{opacity:0.7}.qwacks-lang-toggle__option.is-active{font-weight:700;opacity:1}@media (min-width: 1024px){#localization-select-trigger{display:none!important}}:is(h1,h2,h3,h4){position:relative}:is(h1,h2,h3,h4)>div.absolute{left:auto;right:auto;inset-inline-end:0}:is(h1,h2,h3,h4)>div.absolute>a{margin-inline:0!important}"},{"filePath":"rtl.css","content":"html[data-current-path^=\"/ar\"]{direction:rtl}[dir=\"rtl\"]{direction:rtl}html[lang=\"ar\"]{direction:rtl}@media (min-width: 1024px){html[lang=\"ar\"] .lg\\:-ml-12{margin-left:0;margin-right:-3rem}html[lang=\"ar\"] .lg\\:pl-\\[5\\.7rem\\]{padding-left:0.25rem;padding-right:5.7rem}html[lang=\"ar\"] .lg\\:pl-\\[23\\.7rem\\]{padding-left:0.25rem;padding-right:23.7rem}}[dir=\"rtl\"] :is(pre,code,kbd,samp){direction:ltr;text-align:left}[dir=\"rtl\"] :not(pre)>code{unicode-bidi:isolate}[dir=\"rtl\"] pre>*{direction:ltr}[dir=\"rtl\"] .pl-3\\.5{padding-left:0;padding-right:0.875rem}[dir=\"rtl\"] .pl-3{padding-left:0;padding-right:0.75rem}[dir=\"rtl\"] .pl-4{padding-left:0;padding-right:1rem}[dir=\"rtl\"] .pr-3{padding-right:0;padding-left:0.75rem}[dir=\"rtl\"] .pr-4{padding-right:0;padding-left:1rem}[dir=\"rtl\"] .pr-8{padding-right:0;padding-left:2rem}[dir=\"rtl\"] .ml-2{margin-left:0;margin-right:0.5rem}[dir=\"rtl\"] .ml-4{margin-left:0;margin-right:1rem}[dir=\"rtl\"] .-ml-4{margin-left:0;margin-right:-1rem}[dir=\"rtl\"] .-ml-10{margin-left:0;margin-right:-2.5rem}[dir=\"rtl\"] .mr-2{margin-right:0;margin-left:0.5rem}[dir=\"rtl\"] .mr-4{margin-right:0;margin-left:1rem}[dir=\"rtl\"] .text-left{text-align:right}[dir=\"rtl\"] .text-right{text-align:left}[dir=\"rtl\"] .left-0{left:auto;right:0}[dir=\"rtl\"] .right-0{right:auto;left:0}[dir=\"rtl\"] .space-x-2>:not([hidden])~:not([hidden]),[dir=\"rtl\"] .space-x-3>:not([hidden])~:not([hidden]),[dir=\"rtl\"] .space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 1}[dir=\"rtl\"] .border-l{border-left-width:0;border-right-width:1px}[dir=\"rtl\"] .border-r{border-right-width:0;border-left-width:1px}@media (min-width: 1024px){[dir=\"rtl\"] .lg\\:-ml-12{margin-left:0;margin-right:-3rem}}[dir=\"rtl\"] :is(ul,ol){padding-left:0;padding-right:1.5rem}[dir=\"rtl\"] blockquote{border-left:0;border-right:4px solid currentColor;padding-left:0;padding-right:1rem}[dir=\"rtl\"] :is(th,td){text-align:right}[dir=\"rtl\"] .steps{margin-left:0;margin-right:0.875rem}[dir=\"rtl\"] .step>.absolute:not(.w-px){margin-left:0;margin-right:-13px}[dir=\"rtl\"] .step>:not(.absolute){padding-left:1px;padding-right:2rem}[dir=\"rtl\"] #table-of-contents{padding-inline-start:0.75rem;scrollbar-gutter:stable}[dir=\"rtl\"] #sidebar-content a[style*=\"padding-left\"]{padding-left:0!important;padding-right:1rem!important}[dir=\"rtl\"] .card .absolute{right:auto;left:1.25rem}[dir=\"rtl\"] .card .absolute svg{transform:scaleX(-1)}[dir=\"rtl\"] :is(.qwacks-flip-icon,[data-flip-rtl]) svg{transform:scaleX(-1)}[dir=\"rtl\"] #topbar-cta-button svg{transform:scaleX(-1)}[dir=\"rtl\"] .qwacks-lang-toggle svg{transform:none}[dir=\"rtl\"],[dir=\"rtl\"] body{font-family:\"Readex Pro\", system-ui, sans-serif;letter-spacing:normal;line-height:1.85}[dir=\"rtl\"] :is(h1,h2,h3,h4,h5,h6){font-family:\"Readex Pro\", system-ui, sans-serif;letter-spacing:normal;line-height:1.5}[dir=\"rtl\"] :is(pre,code,kbd,samp){font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;line-height:1.6}[dir=\"rtl\"]{font-variant-numeric:lining-nums}"}],"page":{"pagePath":"guides/real-money-purchases","slug":"/guides/real-money-purchases","pageMetadata":{"title":"In-App Purchases","description":"Sell shop items for real money through the App Store and Google Play.","href":"/guides/real-money-purchases"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Sell shop items for real money through the App Store and Google Play.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Frame,Heading,Note,OptimizedImage,Step,Steps,Tab,Table,Tabs}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`A real-money item is a shop item the player pays for in the App Store or Google Play. The store\ncharges the player; Flock asks the store whether the purchase is real, then delivers the item. Your\ngame makes the same call it makes for any item: `,_jsx(_components.code,{children:`Shop.PurchaseAsync(item.Id)`}),` in Unity, the shop\nprovider’s `,_jsx(_components.code,{children:`Purchase`}),` (the `,_jsx(_components.strong,{children:`Flock Purchase`}),` node) in Unreal.`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Player taps Buy ──▶ store charges ──▶ Flock checks with the store ──▶ item delivered ──▶ store purchase finished`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`The store’s purchase is finished only after Flock delivered, so a crash or a lost connection in\nbetween never loses what the player paid for: the store hands the purchase back at the next launch\nand Flock delivers it then. One store purchase is delivered once, however many times it is sent.`}),`\n`,_jsxs(Note,{children:[_jsxs(_components.p,{children:[`Real-money purchases need the Flock SDK for Unity 1.98.0 or later, or the Flock SDK for Unreal 1.45.0\nor later (its Blueprint nodes from 1.47.0). Wallet purchases need neither: see\n`,_jsx(_components.a,{href:`/guides/shops-and-inventory`,children:`Shops and Inventory`}),`.`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Unity`}),` needs Unity IAP 5 (`,_jsx(_components.code,{children:`com.unity.purchasing`}),` 5.x) in the project. On Android, set `,_jsx(_components.strong,{children:`Minimum\nAPI Level`}),` to 23 or higher (`,_jsx(_components.strong,{children:`Player Settings → Other Settings`}),`): Unity IAP 5’s Google Play Billing\nlibrary needs it, and a Unity 2021.3 project starts at 22, so its build stops with a manifest merger\nerror.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Unreal`}),` needs nothing installed: Flock reaches the store through the engine’s online subsystem,\nwhich it turns on. Google Play needs UE 5.8 or later, the first engine with a Billing Library Google\nPlay still takes; on UE 5.4 to 5.7 connecting the store is refused.`]}),`\n`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`what-you-set-up`,children:`What you set up`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Connect each store to Flock`}),` in the dashboard, with your game’s own keys.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Price the items in real money`}),` and give each the id of its product in the store.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Create the products in the store`}),` with those ids.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Connect the store in your game`}),` once at start.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Check the setup`}),` from the game.`]}),`\n`]}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Connect the stores to Flock`,children:[_jsxs(_components.p,{children:[`Open `,_jsx(_components.strong,{children:`Monetization → Payments`}),` in the Flock dashboard and connect each store you sell in. Flock uses\nthese keys to ask the store about a purchase; they never reach the player’s device.`]}),_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`In the menu at the top of the page, choose the game: each game connects its own stores.`}),`\n`,_jsxs(_components.li,{children:[`On the `,_jsx(_components.strong,{children:`Providers`}),` tab, under `,_jsx(_components.strong,{children:`Mobile stores`}),`, press `,_jsx(_components.strong,{children:`Connect`}),` beside `,_jsx(_components.strong,{children:`Google Play`}),` or\n`,_jsx(_components.strong,{children:`App Store`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Fill in every field, as the tables below say, and leave `,_jsx(_components.strong,{children:`Active`}),` ticked.`]}),`\n`,_jsxs(_components.li,{children:[`Press `,_jsx(_components.strong,{children:`Save`}),`. `,_jsx(_components.strong,{children:`Success:`}),` the store shows `,_jsx(_components.strong,{children:`Connected`}),` and names the keys it holds.`]}),`\n`]}),_jsxs(_components.p,{children:[`The keys are encrypted before they are stored and are never shown again: to replace one, press\n`,_jsx(_components.strong,{children:`Update keys`}),` and enter every field again. Only studio admins and managers connect stores. The\n`,_jsx(_components.strong,{children:`Sales`}),` tab lists every sale, and refunds one when you press `,_jsx(_components.strong,{children:`Refund`}),`.`]}),_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Google Play`,id:`google-play`,children:[_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`What to enter`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Package name`}),_jsxs(_components.td,{children:[`Your app’s package name, as in the Google Play Console (e.g. `,_jsx(_components.code,{children:`com.studio.game`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Service account JSON`}),_jsx(_components.td,{children:`The whole text of a Google Cloud service account’s JSON key`})]})]})]}),_jsx(_components.p,{children:`To make the service account:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`In the Google Cloud console, in any project, turn on the `,_jsx(_components.strong,{children:`Google Play Android Developer API`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Create a `,_jsx(_components.strong,{children:`service account`}),` there, and add a `,_jsx(_components.strong,{children:`JSON key`}),` to it. The key downloads as a file.`]}),`\n`,_jsxs(_components.li,{children:[`In the Google Play Console, under `,_jsx(_components.strong,{children:`Users and permissions`}),`, invite the service account’s email\naddress, give it your app, and allow `,_jsx(_components.strong,{children:`View financial data`}),` and `,_jsx(_components.strong,{children:`Manage orders and\nsubscriptions`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Paste the JSON file’s whole text into `,_jsx(_components.strong,{children:`Service account JSON`}),`.`]}),`\n`]}),_jsx(_components.p,{children:`Google can take a while to accept a new service account. Until it does, the setup check below says\nthe store refused your keys. In our test it took effect a minute after re-saving one of the app’s\nproducts in the Play Console.`})]}),_jsx(Tab,{title:`App Store`,id:`app-store`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`What to enter`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Issuer ID`}),_jsxs(_components.td,{children:[`From App Store Connect, `,_jsx(_components.strong,{children:`Users and Access → Integrations → In-App Purchase`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Key ID`}),_jsx(_components.td,{children:`The key you generate on that page`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Private key`}),_jsxs(_components.td,{children:[`The whole text of the `,_jsx(_components.code,{children:`.p8`}),` file that key downloads as`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Bundle ID`}),_jsx(_components.td,{children:`Your app’s bundle identifier`})]})]})]})})]}),_jsxs(_components.p,{children:[`Each store’s form also shows a `,_jsx(_components.strong,{children:`Notification URL`}),`. Give it to the store (App Store Connect’s App\nStore Server Notifications, Google Play’s real-time developer notifications) so Flock hears about\nrefunds.`]})]}),_jsxs(Step,{title:`Price the items in real money`,children:[_jsxs(_components.p,{children:[`An item costs real money when its currency is one of the `,_jsx(_components.strong,{children:`Real Currencies`}),` in the currency config of\nits Game Version (`,_jsx(_components.strong,{children:`Monetization → Currencies`}),`, the `,_jsx(_components.strong,{children:`Real Currencies`}),` tab; see\n`,_jsx(_components.a,{href:`/guides/currencies-and-wallets`,children:`Currencies and Wallets`}),`). In the item’s form (`,_jsx(_components.strong,{children:`Monetization → Shops`}),`,\nthe shop’s `,_jsx(_components.strong,{children:`Items`}),` tab; see `,_jsx(_components.a,{href:`/guides/shops-and-inventory`,children:`Shops and Inventory`}),`), type the `,_jsx(_components.strong,{children:`Price`}),` as\nthe player sees it, such as `,_jsx(_components.code,{children:`3.99`}),`; the server keeps it in the currency’s smallest unit, so the SDK\nreads `,_jsx(_components.code,{children:`399`}),` in `,_jsx(_components.code,{children:`SAR`}),` for SAR 3.99. `,_jsx(_components.strong,{children:`Success:`}),` the item’s tile shows `,_jsx(_components.strong,{children:`Real money`}),`.`]}),_jsxs(_components.p,{children:[`On each such item, under `,_jsx(_components.strong,{children:`Store product IDs`}),`, enter its product id for each store, exactly as the\nstore has it. The item’s type decides what kind of product it is in the store:`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Item type`}),_jsx(_components.th,{children:`Store product`}),_jsx(_components.th,{children:`What the player gets`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Currency pack`}),_jsx(_components.td,{children:`Consumable`}),_jsx(_components.td,{children:`Its rewards, straight into the wallet`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Consumable`}),_jsx(_components.td,{children:`Consumable`}),_jsxs(_components.td,{children:[`An inventory entry, used up later with `,_jsx(_components.code,{children:`ConsumeOneAsync`}),` (Unreal: `,_jsx(_components.code,{children:`ConsumeOne`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Standard`}),_jsx(_components.td,{children:`One-time (non-consumable)`}),_jsx(_components.td,{children:`An inventory entry. The store sells it once per store account`})]})]})]})]}),_jsx(Step,{title:`Create the products in the store`,children:_jsxs(_components.p,{children:[`Create each product with the same id: in the Google Play Console under `,_jsx(_components.strong,{children:`Monetize → Products → One-time\nproducts`}),`, in App Store Connect under your app’s `,_jsx(_components.strong,{children:`In-App Purchases`}),`. Activate it. The price the\nplayer sees is the one the store sets for their country.`]})}),_jsxs(Step,{title:`Connect the store in your game`,children:[_jsxs(_components.p,{children:[`Connect once, after the SDK starts, and keep the connection for the whole session. On a phone the\nstore is found by itself; on Windows, macOS, Linux and WebGL the same call connects a web checkout instead\n(`,_jsx(_components.a,{href:`/guides/web-checkout`,children:`Web Payments`}),`).`]}),_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Unity`,id:`unity`,children:[_jsxs(_components.p,{children:[`The Unity editor cannot show a store purchase succeed. It connects a web checkout unless the build\ntarget is Android or iOS, and then Unity IAP’s fake store answers, whose purchases Flock refuses. To\nsee a store purchase go through, build to a device that has the store (see\n`,_jsx(_components.a,{href:`#test-before-you-ship`,children:`Test before you ship`}),`).`]}),_jsxs(_components.p,{children:[`First install Unity IAP 5: open `,_jsx(_components.strong,{children:`Window → Package Manager`}),`, click `,_jsx(_components.strong,{children:`+`}),`, choose `,_jsx(_components.strong,{children:`Add package by\nname…`}),` (`,_jsx(_components.strong,{children:`Install package by name…`}),` in Unity 6), enter `,_jsx(_components.code,{children:`com.unity.purchasing`}),` and a 5.x version.`]}),_jsx(Frame,{caption:`Window → Package Manager with In-App Purchasing (com.unity.purchasing) selected, version 5.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/unity/real-money-purchases-package-manager.png?fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=618591881e2ab0dce4615c98dcc8384b`,alt:`Unity's Package Manager with In-App Purchasing selected`,\"data-og-width\":`1100`,width:`1100`,\"data-og-height\":`700`,height:`700`,\"data-path\":`images/unity/real-money-purchases-package-manager.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/unity/real-money-purchases-package-manager.png?w=280\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=22f9c68462d749df0696bf82a71b05c8 280w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/unity/real-money-purchases-package-manager.png?w=560\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=b212399cbc526c9e1ef2c5c840c35fab 560w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/unity/real-money-purchases-package-manager.png?w=840\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=5c6b1e2a8bc5ecdfc78f5d970d2ddf4f 840w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/unity/real-money-purchases-package-manager.png?w=1100\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=096eb9872e4b260c8be502865764a067 1100w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/unity/real-money-purchases-package-manager.png?w=1650\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=58e7c5bc8ca91a1f708af8d9f4bd0091 1650w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/unity/real-money-purchases-package-manager.png?w=2500\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=51968b9141daad3a3627d3837c285d40 2500w`})}),_jsxs(_components.p,{children:[`For Android, also set `,_jsx(_components.strong,{children:`Minimum API Level`}),` to 23 or higher in `,_jsx(_components.strong,{children:`Edit → Project Settings → Player →\nAndroid → Other Settings`}),`.`]}),_jsxs(_components.p,{children:[`Then add this component to an object in your first scene. `,_jsx(_components.code,{children:`RefreshTheShop`}),` stands for your own code\nthat reads the wallet and inventory again and redraws the shop.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`35`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`35`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Exceptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Providers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UnityEngine`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` GameStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` : `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`MonoBehaviour`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` FlockStore`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` void`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Start`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` store`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ConnectAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockException`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`LogWarning`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// what is wrong, then a Fix: line`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Every real-money purchase Flock delivers, the ones PurchaseAsync answers included:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // refresh what the screen shows here.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`PurchaseCompleted`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=>`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` RefreshTheShop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // A purchase the player paid for that Flock could not deliver. It comes back at the next launch.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`PurchaseNotDelivered`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +=`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` purchase`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`LogWarning`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` void`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` OnDestroy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` store`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Dispose`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` void`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` RefreshTheShop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Read the wallet and inventory again, then redraw the shop.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`From now on `,_jsx(_components.code,{children:`Shop.PurchaseAsync`}),` buys real-money items through this connection. Without one, it\nrefuses a real-money item before anything is sent, and says to connect the store. Connecting a\nstore is refused when Unity IAP 5 is not installed. The examples below use this `,_jsx(_components.code,{children:`store`}),`.`]})]}),_jsxs(Tab,{title:`Unreal`,id:`unreal`,children:[_jsx(_components.p,{children:`First set up the store in the project:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Android`}),` (UE 5.8 or later): in `,_jsx(_components.strong,{children:`Project Settings → Platforms → Android`}),`, turn on `,_jsx(_components.strong,{children:`Enable\nGoogle Play Support`}),`, enter the game’s Google Play license key, and add the\n`,_jsx(_components.code,{children:`com.android.vending.BILLING`}),` permission. Keep `,_jsx(_components.code,{children:`bSupportsInAppPurchasing=true`}),` under\n`,_jsx(_components.code,{children:`[OnlineSubsystemGooglePlay.Store]`}),` (the engine’s default). Google Play takes new builds only with a\ncurrent Billing Library, and only UE 5.8 ships one; on UE 5.4 to 5.7, a game with billing code of\nits own hands each purchase to Flock itself (`,_jsx(_components.a,{href:`#your-own-store-code-in-unreal`,children:`Your own store code in Unreal`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`iOS`}),`: in `,_jsx(_components.strong,{children:`Project Settings → Platforms → iOS`}),`, turn on `,_jsx(_components.strong,{children:`Enable StoreKit Support`}),`, and add the\nIn-App Purchase capability to the app. Flock’s App Store support is written against the engine’s own\nStoreKit code and has not yet run on an iPhone: buy in the App Store’s sandbox before you ship.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Windows, Mac and Linux`}),` have no phone store: real-money items are bought through a\n`,_jsx(_components.a,{href:`/guides/web-checkout`,children:`web checkout`}),`. A Steam build must not use one, since Steam allows payments\nonly through its own wallet; Flock has no store provider for Steam, the Epic Games Store or consoles.`]}),`\n`]}),_jsxs(_components.p,{children:[`Then connect once Flock has initialized. Flock’s subsystem keeps the connection (`,_jsx(_components.code,{children:`Sdk->GetStore()`}),`)\nuntil it is disconnected or Flock shuts down.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`27`,language:`cpp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`cpp`,children:_jsxs(_components.code,{language:`cpp`,numberOfLines:`27`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`#include`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"FlockSubsystem.h\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`#include`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Store/FlockStore.h\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`this`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // this: any object in the game's world`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`UFlockStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Connect`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(Sdk, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`FFlockStoreOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(), [](`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`TFlockResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`UFlockStore`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Connected`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Connected`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bSuccess`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Warning, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Connected`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToDisplayText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // what is wrong, then a Fix: line`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Every real-money purchase Flock delivers, the ones Purchase answers included:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // refresh what the screen shows here.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Connected`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OnPurchaseCompleted`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`AddLambda`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([](`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` FFlockShopItem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` Item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` FFlockPurchaseResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` Result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // A purchase the player paid for that Flock refused to deliver, or whose delivery is unknown`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // (Purchase.Error.bOutcomeUnknown: Flock may have delivered it). It stays unfinished in the store`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // and is sent again at the next launch, or by Restore: tell the player it will arrive.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Connected`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OnPurchaseNotDelivered`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`AddLambda`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([](`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` FFlockUndeliveredPurchase`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` Purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Warning, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToDisplayText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsxs(_components.p,{children:[`From now on the shop provider’s `,_jsx(_components.code,{children:`Purchase`}),` buys real-money items through this connection. Without\none, it refuses a real-money item before anything is sent, and says to connect the store. Leave\n`,_jsx(_components.code,{children:`FFlockStoreOptions::PaymentProvider`}),` empty for this platform’s own way to pay. `,_jsx(_components.code,{children:`Connect`}),` is refused:`]}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`when Flock’s store module is not loaded, for example with the engine’s Online Subsystem plugin\nturned off: a phone store’s rules forbid paying for digital goods elsewhere, so Flock never opens\na web page instead;`}),`\n`,_jsxs(_components.li,{children:[`on Android with an engine older than UE 5.8, or with `,_jsx(_components.code,{children:`bDisableLocalAcknowledgeAndConsume=true`}),` under\n`,_jsx(_components.code,{children:`[OnlineSubsystemGooglePlay.Store]`}),` (the engine would then finish nothing Flock delivers);`]}),`\n`,_jsx(_components.li,{children:`for a payment gateway (Stripe, Tap or Moyasar) named on Android or iOS: a phone store’s rules forbid\npaying for digital goods on a web page;`}),`\n`,_jsxs(_components.li,{children:[`for a `,_jsx(_components.code,{children:`PaymentProvider`}),` Flock does not know: name one of `,_jsx(_components.code,{children:`FlockPaymentProviders`}),`, or leave it empty;`]}),`\n`,_jsx(_components.li,{children:`on a platform that is neither a phone nor Windows, Mac or Linux (a console): it has no store Flock pays\nthrough, and a web checkout opens only on a computer;`}),`\n`,_jsx(_components.li,{children:`while another connection is connected: use that one, or disconnect it first.`}),`\n`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Receipts are not tied to the player’s store account`}),`, on Android and iOS alike. The engine hashes an\naccount id before Google sees it and never hands one to Apple, so Flock sends none, and the server\nmarks each such purchase unbound: a receipt taken from one device could be redeemed once by another Flock account.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`In Blueprint`}),`, call `,_jsx(_components.strong,{children:`Flock Connect Store`}),` (under `,_jsx(_components.em,{children:`Flock | Store`}),`) from `,_jsx(_components.em,{children:`Call or Register on\nInitialized`}),` on Flock’s events (`,_jsx(_components.em,{children:`Get Events`}),`), which runs at once when Flock has already\ninitialized. Leave its `,_jsx(_components.em,{children:`Options`}),` pin unwired for every default. Bind `,_jsx(_components.strong,{children:`On Store Purchase\nCompleted`}),` and `,_jsx(_components.strong,{children:`On Store Purchase Not Delivered`}),` on Flock’s events once: they hear every\ndelivery the connected store reports, whichever connection made it.`]}),_jsx(Frame,{caption:`Connect the store once Flock is ready, then buy: Is Purchase Paid tells a delivered purchase from one the store is still waiting to be paid for.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/store-connect-purchase.png?fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=e56f8413b9e7eef84e76603f96dc122c`,alt:`Event BeginPlay runs Call or Register on Initialized, whose Target is Flock Get Events (a node with no execution pins), with the custom event Flock Ready; Flock Ready runs Flock Connect Store, whose On Success runs Flock Purchase with the example Shop Item Id gem_pack_small; its On Success goes to a Branch on Is Purchase Paid`,\"data-og-width\":`1834`,width:`1834`,\"data-og-height\":`837`,height:`837`,\"data-path\":`images/sdk/unreal/store-connect-purchase.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/store-connect-purchase.png?w=280\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=ef8d00220d72ccd8db57860e7f757b87 280w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/store-connect-purchase.png?w=560\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=1dbd9b650365eadbc123560002c4a5ed 560w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/store-connect-purchase.png?w=840\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=37b350a537aef11ff6b6ed8f2c11217a 840w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/store-connect-purchase.png?w=1100\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=e51bb2a2388b233cbc138eca91af26a8 1100w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/store-connect-purchase.png?w=1650\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=ea6a56088fc58704c94299985664ed67 1650w, https://mintcdn.com/qwacks/MKbkfprdtExYWAeD/images/sdk/unreal/store-connect-purchase.png?w=2500\u0026fit=max\u0026auto=format\u0026n=MKbkfprdtExYWAeD\u0026q=85\u0026s=375bf0b964d552510adf2d73619342cb 2500w`})}),_jsxs(_components.p,{children:[`The picture buys straight after connecting only to stay short. In your game, connect once at start\nas above, and run `,_jsx(_components.strong,{children:`Flock Purchase`}),` from the player’s Buy button with the `,_jsx(_components.strong,{children:`Id`}),` of an item read\nfrom its shop (`,_jsx(_components.strong,{children:`Flock Get Shop By Name`}),`, then its `,_jsx(_components.em,{children:`Shop Items`}),`, then each item’s `,_jsx(_components.em,{children:`Id`}),`):\n`,_jsx(_components.code,{children:`gem_pack_small`}),` is an example item id, not a name.`]})]})]})]}),_jsxs(Step,{title:`Check the setup`,children:[_jsx(_components.p,{children:`The setup check asks the store and Flock’s server whether everything is in place, without buying\nanything. It needs a signed-in player, so run it from a developer button after signing in, while you\nset up.`}),_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Unity`,id:`unity-2`,children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`CheckSetupAsync`}),` throws `,_jsx(_components.code,{children:`FlockAuthException`}),` without a signed-in player, so sign the player in\nfirst (`,_jsx(_components.a,{href:`/sdk/unity#authenticate-a-player`,children:`Authenticate a player`}),`). The code runs inside an `,_jsx(_components.code,{children:`async`}),`\nmethod.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Providers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UnityEngine`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockStoreSetupCheck`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` check`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`CheckSetupAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`IsReady`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The store has every item, and Flock can check purchases with your keys.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`foreach`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`ShopItem`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` item`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NotFoundInTheStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`$\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`item`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: the store has no product with this item's id.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`foreach`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`ShopItem`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` item`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`MissingProductId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`$\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`item`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Name`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: no product id for this store on the item.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ServerProblem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ServerProblem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// the keys in Monetization > Payments, and how to fix them`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NotChecked`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NotChecked`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// on a web checkout: the gateway, and how to check it instead`})]}),`\n`]})})})]}),_jsxs(Tab,{title:`Unreal`,id:`unreal-2`,children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`CheckSetup`}),` fails (`,_jsx(_components.code,{children:`Auth`}),`) without a signed-in player.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`32`,language:`cpp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`cpp`,children:_jsxs(_components.code,{language:`cpp`,numberOfLines:`32`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`UFlockStore`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Store `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`this`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // null until the store is connected`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (Store `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nullptr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`CheckSetup`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([](`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`TFlockResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FFlockStoreSetupCheck`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Checked`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Checked`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bSuccess`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Warning, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Checked`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToDisplayText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // no player signed in, for one`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FFlockStoreSetupCheck`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Check `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Checked`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`IsReady`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`())`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Display, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"The store has every item, and Flock can check purchases with your keys.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FFlockShopItem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Item : `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NotFoundInTheStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Display, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: the store has no product with this item's id.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FFlockShopItem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Item : `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`MissingProductId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Display, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: no product id for this store on the item.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bHasServerProblem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // The keys in Monetization → Payments, and how to fix them.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Display, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Check`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ServerProblem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToDisplayText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsxs(_components.p,{children:[`In Blueprint this is `,_jsx(_components.strong,{children:`Flock Check Store Setup`}),`; `,_jsx(_components.strong,{children:`Is Store Ready`}),` says whether anything needs\nfixing.`]})]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`show-the-stores-price`,children:`Show the store’s price`}),`\n`,_jsx(_components.p,{children:`Show the price the store gives, which is in the player’s currency with their taxes, rather than the\nitem’s Flock price.`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Unity`,id:`unity-3`,children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`item`}),` is a real-money `,_jsx(_components.code,{children:`ShopItem`}),` read from its shop.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Providers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockStorePrice`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` price`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetPrice`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`string`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` label`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` price`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` price`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Not available\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// e.g. \"SAR 4.59\", \"$1.09\"`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`GetPrice`}),` is null when the store did not find the product. The prices in the comment are examples:\nthe text is the store’s own. On a web checkout `,_jsx(_components.code,{children:`GetPrice`}),` gives the item’s own price and is never null.`]})]}),_jsxs(Tab,{title:`Unreal`,id:`unreal-3`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`cpp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`cpp`,children:_jsxs(_components.code,{language:`cpp`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`UFlockStore`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Store `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`this`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // null until the store is connected`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (Store `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nullptr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Item: an FFlockShopItem read from its shop.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` TFlockResult`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`FFlockStorePrice`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Price `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetPrice`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FString Label `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Price`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bSuccess`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Price`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bFoundInTheStore`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Price`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Text`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // e.g. \"SAR 4.59\", \"$1.09\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` FString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Not available\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`bFoundInTheStore`}),` is false when the store did not find the product. `,_jsx(_components.code,{children:`GetPrice`}),` fails (`,_jsx(_components.code,{children:`Validation`}),`)\nfor an item that was not in the game’s shops when the store connected, or has no product id for this\nstore. The prices in the comment are examples: the text is the store’s own. On a web checkout it gives\nthe item’s own price. In Blueprint this is `,_jsx(_components.strong,{children:`Flock Get Store Price`}),`: false, with an `,_jsx(_components.em,{children:`Error`}),` saying\nwhy, when no store is connected or the item has no price here.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`buy`,children:`Buy`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Unity`,id:`unity-4`,children:[_jsxs(_components.p,{children:[`The code runs inside an `,_jsx(_components.code,{children:`async`}),` method; `,_jsx(_components.code,{children:`item`}),` is a real-money `,_jsx(_components.code,{children:`ShopItem`}),` read from its shop (see\n`,_jsx(_components.a,{href:`/guides/shops-and-inventory`,children:`Shops and Inventory`}),`), and `,_jsx(_components.code,{children:`ShowReward`}),` and `,_jsx(_components.code,{children:`ShowWaitingForPayment`}),`\nstand for your own screens.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`38`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`38`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Exceptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Providers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UnityEngine`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`try`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` PurchaseResult`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` bought`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Instance`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Shop`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`PurchaseAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`IsPaid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` ShowReward`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Granted`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// delivered`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` else`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` ShowWaitingForPayment`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// pending: PurchaseCompleted reports it once paid`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockStoreException`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`when`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Reason`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockStoreFailureReasons`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Cancelled`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // The player closed the store's dialog. Nothing was charged.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockStoreException`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`when`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Reason`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` FlockStoreFailureReasons`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`AlreadyOwned`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // This store account already owns the one-time item: offer Restore purchases.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockStoreException`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // No payment went through (declined, not available, store down, a web checkout refunded...). Nothing was bought.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Reason`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \": \"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockException`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`when`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OutcomeUnknown`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // No answer said whether Flock delivered. Read the wallet and inventory again.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockException`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // The player paid, and Flock refused the purchase (e.ErrorCode says why). The store keeps it,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // and it is sent again at the next launch. PurchaseNotDelivered reports it too.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`LogWarning`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(_components.p,{children:`Every case, in short:`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`What happens`}),_jsxs(_components.th,{children:[`What `,_jsx(_components.code,{children:`PurchaseAsync`}),` does`]}),_jsx(_components.th,{children:`What the player sees`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Paid and delivered`}),_jsxs(_components.td,{children:[`Returns, `,_jsx(_components.code,{children:`IsPaid`}),` true`]}),_jsx(_components.td,{children:`The reward`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The store waits for the payment (a slow way to pay, “Ask to Buy”)`}),_jsxs(_components.td,{children:[`Returns, `,_jsx(_components.code,{children:`Status`}),` pending`]}),_jsxs(_components.td,{children:[`”Waiting for payment”; `,_jsx(_components.code,{children:`PurchaseCompleted`}),` follows once paid`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The player cancels`}),_jsxs(_components.td,{children:[`Throws `,_jsx(_components.code,{children:`FlockStoreException`}),`, `,_jsx(_components.code,{children:`Cancelled`})]}),_jsx(_components.td,{children:`Nothing; nothing charged`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The payment is declined (App Store)`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FlockStoreException`}),`, `,_jsx(_components.code,{children:`PaymentDeclined`})]}),_jsx(_components.td,{children:`Try another way to pay; nothing charged`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`A one-time item already owned`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FlockStoreException`}),`, `,_jsx(_components.code,{children:`AlreadyOwned`})]}),_jsxs(_components.td,{children:[`Offer `,_jsx(_components.strong,{children:`Restore purchases`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`An earlier purchase of it still waits`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FlockStoreException`}),`, `,_jsx(_components.code,{children:`AlreadyPending`})]}),_jsxs(_components.td,{children:[`It arrives through `,_jsx(_components.code,{children:`PurchaseCompleted`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The product is not in the store`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FlockStoreException`}),`, `,_jsx(_components.code,{children:`ProductUnavailable`})]}),_jsx(_components.td,{children:`Check the product id (the setup check lists it)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The store is offline or off, or Google Play declined the payment (Google reports both the same way)`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FlockStoreException`}),`, `,_jsx(_components.code,{children:`StoreUnavailable`})]}),_jsx(_components.td,{children:`Check the connection and the way to pay, then try again; nothing charged`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Nobody signed in to the store`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FlockStoreException`}),`, `,_jsx(_components.code,{children:`NotSignedInToTheStore`})]}),_jsx(_components.td,{children:`Sign in to the store, then try again`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Paid, and Flock refused it`}),_jsxs(_components.td,{children:[`Throws `,_jsx(_components.code,{children:`FlockException`}),` with its code`]}),_jsx(_components.td,{children:`Delivered at a later launch once fixed`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`No answer from Flock`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`FlockException`}),`, `,_jsx(_components.code,{children:`OutcomeUnknown`}),` true`]}),_jsx(_components.td,{children:`Read the wallet and inventory again`})]})]})]}),_jsxs(_components.p,{children:[`If you cancel the call’s own `,_jsx(_components.code,{children:`CancellationToken`}),`, the store’s purchase carries on, and\n`,_jsx(_components.code,{children:`PurchaseCompleted`}),` reports it once paid. If the player signs out while the store’s dialog is open, the call\nends as cancelled too, and the store’s purchase, once paid, is delivered to the player who bought it at a\nlater sign-in, or through Restore purchases.`]})]}),_jsxs(Tab,{title:`Unreal`,id:`unreal-4`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`64`,language:`cpp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`cpp`,children:_jsxs(_components.code,{language:`cpp`,numberOfLines:`64`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`this`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` TWeakObjectPtr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`WeakSdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Sdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Item: an FFlockShopItem read from its shop.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Sdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetShopProvider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, [`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`WeakSdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`](`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`TFlockResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FFlockPurchaseResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bSuccess`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`IsPaid`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`())`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // delivered: Bought.Value.Granted lists what the player got`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bSuccess`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // pending: show \"Waiting for payment\"; OnPurchaseCompleted reports it once paid`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FFlockError`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Error `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Bought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` EFlockErrorType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::Store)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // The store did not take the payment. Nothing was charged.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`StoreFailureReason`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Equals`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockStoreFailureReasons`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::Cancelled, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`ESearchCase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::CaseSensitive))`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // the player closed the store's dialog`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`StoreFailureReason`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Equals`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockStoreFailureReasons`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::AlreadyOwned, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`ESearchCase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::CaseSensitive))`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // this store account already owns the one-time item: offer Restore purchases`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Warning, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToDisplayText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // declined, not available, store down...`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bOutcomeUnknown`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Flock `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` WeakSdk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` UFlockStore`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Store `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Flock `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nullptr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (Store `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`IsWebCheckout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`())`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // The payment page may still be paid: read the open checkouts before offering the item`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // again. One paid meanwhile is reported through OnPurchaseCompleted.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Restore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([](`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`TFlockResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FFlockStoreRestore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Read`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {});`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // A phone's store took the payment; only Flock's delivery is unknown. Tell the player it will`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // arrive, and never offer the item again on this answer: OnPurchaseCompleted reports it once`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // delivered, at the next launch or after Restore purchases.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` EFlockErrorType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::Cancelled)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // the player signed out or changed: a payment already made is still delivered (see below)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ==`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` EFlockErrorType`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::Auth `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`StatusCode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 403`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // The sign-in was refused or has ended. Sign the player in again: a payment already made stays`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // unfinished in the store, raises no OnPurchaseNotDelivered, and is delivered after that sign-in.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Otherwise Flock refused it. Most refusals come before the store's dialog opens, and nothing was`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // charged: another store purchase under way, the item no longer for sale, nobody signed in. If the`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // player paid and Flock refused the delivery, OnPurchaseNotDelivered reported it just before this`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // answer: the store keeps the purchase and sends it again at the next launch, so do not sell it again.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Error.ToDisplayText() says which, and how to fix it.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Warning, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToDisplayText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsx(_components.p,{children:`Every case, in short:`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`What happens`}),_jsxs(_components.th,{children:[`What `,_jsx(_components.code,{children:`Purchase`}),` completes with`]}),_jsx(_components.th,{children:`What the player sees`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Paid and delivered`}),_jsxs(_components.td,{children:[`Success, `,_jsx(_components.code,{children:`IsPaid()`}),` true`]}),_jsx(_components.td,{children:`The reward`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The store waits for the payment (a slow way to pay, “Ask to Buy”)`}),_jsxs(_components.td,{children:[`Success, `,_jsx(_components.code,{children:`Status`}),` `,_jsx(_components.code,{children:`FlockPurchaseStatuses::Pending`})]}),_jsxs(_components.td,{children:[`”Waiting for payment”; `,_jsx(_components.code,{children:`OnPurchaseCompleted`}),` follows once paid`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The player cancels`}),_jsxs(_components.td,{children:[`Failure of type `,_jsx(_components.code,{children:`Store`}),`, `,_jsx(_components.code,{children:`StoreFailureReason`}),` `,_jsx(_components.code,{children:`Cancelled`})]}),_jsx(_components.td,{children:`Nothing; nothing charged`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The payment is declined (App Store)`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Store`}),`, `,_jsx(_components.code,{children:`PaymentDeclined`})]}),_jsx(_components.td,{children:`Try another way to pay; nothing charged`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`A one-time item already owned`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Store`}),`, `,_jsx(_components.code,{children:`AlreadyOwned`})]}),_jsxs(_components.td,{children:[`Offer `,_jsx(_components.strong,{children:`Restore purchases`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`An earlier purchase of it still waits`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Store`}),`, `,_jsx(_components.code,{children:`AlreadyPending`})]}),_jsxs(_components.td,{children:[`It arrives through `,_jsx(_components.code,{children:`OnPurchaseCompleted`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The product is not in the store`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Store`}),`, `,_jsx(_components.code,{children:`ProductUnavailable`})]}),_jsx(_components.td,{children:`Check the product id (the setup check lists it)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The store is offline or off, or Google Play declined the payment`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Store`}),`, `,_jsx(_components.code,{children:`StoreUnavailable`})]}),_jsx(_components.td,{children:`Check the connection and the way to pay, then try again; nothing charged`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Nobody signed in to the store`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Store`}),`, `,_jsx(_components.code,{children:`NotSignedInToTheStore`})]}),_jsx(_components.td,{children:`Sign in to the store, then try again`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`A second store purchase while one is under way`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Validation`})}),_jsx(_components.td,{children:`Wait for the first to end; nothing charged`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Refused before the store’s dialog: the item is no longer for sale, or nobody is signed in to Flock`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`Validation`}),` (`,_jsx(_components.code,{children:`ShopItemNotForSale`}),`) or `,_jsx(_components.code,{children:`Auth`})]}),_jsx(_components.td,{children:`Nothing charged: read the shop again, or sign in first`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`The player signs out or changes while it runs`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Cancelled`})}),_jsx(_components.td,{children:`A payment already made is still delivered (below)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Paid, and Flock refused it`}),_jsxs(_components.td,{children:[`Failure with its `,_jsx(_components.code,{children:`ErrorCode`}),`; `,_jsx(_components.code,{children:`OnPurchaseNotDelivered`}),` reports it just before`]}),_jsx(_components.td,{children:`Delivered at a later launch once fixed; do not sell it again`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`No answer from Flock, on a phone’s store`}),_jsxs(_components.td,{children:[`Failure with `,_jsx(_components.code,{children:`bOutcomeUnknown`}),` true; `,_jsx(_components.code,{children:`OnPurchaseNotDelivered`}),` may report it too`]}),_jsxs(_components.td,{children:[`Paid: say it will arrive. `,_jsx(_components.code,{children:`OnPurchaseCompleted`}),` reports it at the next launch, or after Restore purchases. Never offer it again on this answer`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`No answer from Flock, on a web checkout`}),_jsxs(_components.td,{children:[`Failure with `,_jsx(_components.code,{children:`bOutcomeUnknown`}),` true`]}),_jsxs(_components.td,{children:[`The payment page may still be paid: read the open checkouts with `,_jsx(_components.code,{children:`Restore`}),` before offering it again`]})]})]})]}),_jsxs(_components.p,{children:[`The store keeps one purchase dialog open at a time, so a second purchase, of any item, is refused\nuntil the first has ended. If the player signs out, or another player signs in, while the store’s\ndialog is open, the call ends `,_jsx(_components.code,{children:`Cancelled`}),`; a payment made after that is delivered when the player who\nopened the dialog signs in again during this run of the game. After a restart the store hands it back\nto whoever is signed in then, or to Restore purchases.`]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`OnPurchaseNotDelivered`}),` reports a delivery Flock refused, and also one whose answer never came\n(`,_jsx(_components.code,{children:`Error.bOutcomeUnknown`}),`), which Flock may have made. Either way the store keeps the purchase and sends\nit again, so treat it as on its way, never as lost or as something to sell again.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`In Blueprint`}),`, buy with `,_jsx(_components.strong,{children:`Flock Purchase`}),` (under `,_jsx(_components.em,{children:`Flock | Shop`}),`). Its success pin can carry a\npurchase the store is still waiting to be paid for: check `,_jsx(_components.strong,{children:`Is Purchase Paid`}),` before handing anything\nover; `,_jsx(_components.strong,{children:`On Store Purchase Completed`}),` follows once it is paid. On its failure pin, compare the\n`,_jsx(_components.em,{children:`Error`}),`’s `,_jsx(_components.em,{children:`Store Failure Reason`}),` with the `,_jsx(_components.strong,{children:`Flock Store Failure Reason`}),` nodes (`,_jsx(_components.em,{children:`Cancelled`}),`, `,_jsx(_components.em,{children:`Payment\nDeclined`}),`, `,_jsx(_components.em,{children:`Already Owned`}),`, `,_jsx(_components.em,{children:`Already Pending`}),`, `,_jsx(_components.em,{children:`Product Unavailable`}),`, `,_jsx(_components.em,{children:`Store Unavailable`}),`, `,_jsx(_components.em,{children:`Not Signed\nIn To The Store`}),`, `,_jsx(_components.em,{children:`Expired`}),`, `,_jsx(_components.em,{children:`Unknown`}),`), and check `,_jsx(_components.em,{children:`Outcome Unknown`}),`. True means no answer came:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`On a phone’s store`}),` the player has paid, and only Flock’s delivery is unknown. Tell them it will\narrive and never offer the item again on this answer; `,_jsx(_components.strong,{children:`On Store Purchase Completed`}),` reports it at\nthe next launch, or after `,_jsx(_components.strong,{children:`Flock Restore Purchases`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`On a web checkout`}),` (`,_jsx(_components.strong,{children:`Is Web Checkout`}),` on `,_jsx(_components.strong,{children:`Flock Get Store`}),`) the payment page may still be\npaid. Run `,_jsx(_components.strong,{children:`Flock Restore Purchases`}),`, which reads the player’s open checkouts, before offering the\nitem again.`]}),`\n`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`restore-purchases`,children:`Restore purchases`}),`\n`,_jsxs(_components.p,{children:[`A player on a new phone, or after a reinstall, gets their one-time items back with `,_jsx(_components.strong,{children:`Restore\npurchases`}),`. Start it from a button once the player is signed in to Flock: without a signed-in player\nit fails. On the App Store it also asks the player to sign in to the store.`]}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Unity`,id:`unity-5`,children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`RestoreAsync`}),` throws `,_jsx(_components.code,{children:`FlockAuthException`}),` without a signed-in player. The code runs inside an\n`,_jsx(_components.code,{children:`async`}),` method.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`csharp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`csharp`,children:_jsxs(_components.code,{language:`csharp`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Flock`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Providers`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`using`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UnityEngine`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockStoreRestore`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` restore`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`RestoreAsync`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`foreach`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`ShopItem`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` item`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` restore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Restored`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Restored \"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`foreach`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FlockUndeliveredPurchase`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` purchase`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` restore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NotDelivered`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Debug`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ProductId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \": \"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Message`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// e.g. bought by another Flock player`})]}),`\n`]})})})]}),_jsxs(Tab,{title:`Unreal`,id:`unreal-5`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`23`,language:`cpp`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`cpp`,children:_jsxs(_components.code,{language:`cpp`,numberOfLines:`23`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`UFlockStore`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Store `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` UFlockSubsystem`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Get`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`this`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`GetStore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // null until the store is connected`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (Store `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`==`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nullptr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Store`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Restore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([](`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`TFlockResult`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`FFlockStoreRestore`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`Restored`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Restored`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bSuccess`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Warning, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Restored`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToDisplayText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // no player signed in, for one`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FFlockShopItem`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Item : `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Restored`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Restored`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Display, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Restored `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Item`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` FFlockUndeliveredPurchase`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u0026`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Purchase : `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Restored`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NotDelivered`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // e.g. bought by another Flock player`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` UE_LOG`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(LogTemp, Display, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`TEXT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#9CDCFE`},children:`%s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ProductId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Purchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`ToDisplayText`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsxs(_components.p,{children:[`One restore runs at a time on a phone’s store: a second is refused until the first completes. In\nBlueprint this is `,_jsx(_components.strong,{children:`Flock Restore Purchases`}),` (`,_jsx(_components.em,{children:`Restored`}),`, `,_jsx(_components.em,{children:`Not Delivered`}),`).`]})]})]}),`\n`,_jsxs(_components.p,{children:[`A purchase delivered before grants nothing again. One-time items belong to the Flock player who bought\nthem, so the player must sign in to that same Flock account (a device sign-in is tied to the device;\nlink the account to keep purchases across devices). See `,_jsx(_components.a,{href:`/guides/account-linking`,children:`Linking Accounts`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`purchases-finished-later`,children:`Purchases finished later`}),`\n`,_jsxs(_components.p,{children:[`Some purchases end after the call: a payment that clears later, or a purchase interrupted by a crash or\na lost connection. The store hands each back when the game connects to it; once a player is signed in,\nFlock delivers it and `,_jsx(_components.code,{children:`PurchaseCompleted`}),` reports it (Unreal: `,_jsx(_components.code,{children:`OnPurchaseCompleted`}),`, or `,_jsx(_components.strong,{children:`On Store\nPurchase Completed`}),` in Blueprint). One Flock could not be reached for is sent again at\nthe next launch, or at once when the player taps `,_jsx(_components.strong,{children:`Restore purchases`}),`. Subscribe to it\nbefore anything else needs it, and use it to refresh the shop and the wallet.`]}),`\n`,_jsx(Heading,{level:`2`,id:`stop-selling-an-item`,children:`Stop selling an item`}),`\n`,_jsxs(_components.p,{children:[`Set the item, or its shop, to `,_jsx(_components.strong,{children:`Inactive`}),` in the dashboard. Players’ shop reads leave it out at once,\nand the purchase call checks with Flock just before the store’s dialog, so a game still showing the item\nrefuses with `,_jsx(_components.code,{children:`ShopItemNotForSale`}),` and the store never charges. A purchase the player already paid for is\nstill delivered: the game keeps the products it sold, so an unfinished purchase of an inactive item is\ndelivered at the next launch, and restoring still gives back one-time items.`]}),`\n`,_jsx(Heading,{level:`2`,id:`test-before-you-ship`,children:`Test before you ship`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`In the Unity editor`}),`, the build target decides: with Android or iOS selected, Unity IAP’s fake store\nanswers. On another build target, name the store to test with:\n`,_jsx(_components.code,{children:`FlockStore.ConnectAsync(new FlockStoreOptions { PaymentProvider = PaymentProviders.GooglePlay })`}),`. The\nsetup check works there and tests your keys, but Flock refuses the fake store’s purchases, so a\npurchase in the editor ends as not delivered.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`In Unreal`}),`, the store is reached on an Android or iOS device only: in the editor and on Windows,\nmacOS and Linux, `,_jsx(_components.code,{children:`Connect`}),` makes a web checkout. Test store purchases on a device, installed as below.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Google Play`}),`: upload a build to the `,_jsx(_components.strong,{children:`internal testing`}),` track, add your testers under\n`,_jsx(_components.strong,{children:`License testing`}),` in the Play Console, and install the game from the testing link in the Play Store.\nA tester’s purchase is not charged.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`App Store`}),`: use a `,_jsx(_components.strong,{children:`Sandbox`}),` tester from App Store Connect on a device.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`revenue`,children:`Revenue`}),`\n`,_jsx(_components.p,{children:`Flock records revenue on the server, once per store purchase, at the item’s Flock price and currency.\nThe SDK sends no revenue of its own for a store purchase, and a wallet purchase is never counted as\nrevenue.`}),`\n`,_jsx(Heading,{level:`2`,id:`when-something-fails`,children:`When something fails`}),`\n`,_jsxs(_components.p,{children:[`Every failure says what went wrong and how to fix it: in Unity its `,_jsx(_components.code,{children:`Message`}),`, with the fix on a `,_jsx(_components.code,{children:`Fix:`}),`\nline; in Unreal `,_jsx(_components.code,{children:`Error.ToDisplayText()`}),`, with the fix in `,_jsx(_components.code,{children:`Error.Hint`}),`. In Unreal each code below is\n`,_jsx(_components.code,{children:`EFlockErrorCode::`}),` followed by its name. The store purchase’s own codes:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`What happened`}),_jsx(_components.th,{children:`What to do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymentProviderStoreCredentialsRejected`})}),_jsx(_components.td,{children:`The store refused your game’s keys`}),_jsxs(_components.td,{children:[`Check the keys in `,_jsx(_components.strong,{children:`Monetization → Payments`}),`, and the service account’s access in the Play Console. The same purchase goes through once fixed`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymentProviderCredentialsUnreadable`})}),_jsx(_components.td,{children:`The server cannot read the stored keys`}),_jsx(_components.td,{children:`Enter the keys again`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymentProviderProviderNotFound`})}),_jsx(_components.td,{children:`The store is not connected, or it is paused`}),_jsxs(_components.td,{children:[`Connect it, or turn `,_jsx(_components.strong,{children:`Active`}),` back on`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymentProviderReceiptProductMismatch`})}),_jsx(_components.td,{children:`The purchase is for another product than the item’s`}),_jsxs(_components.td,{children:[`Check the item’s `,_jsx(_components.strong,{children:`Store product IDs`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymentProviderReceiptBelongsToAnotherPlayer`})}),_jsx(_components.td,{children:`Another Flock player bought it, or redeemed it`}),_jsx(_components.td,{children:`Sign in as the player who bought it`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymentProviderReceiptPending`})}),_jsx(_components.td,{children:`The store still waits for the payment`}),_jsx(_components.td,{children:`Nothing to do: it is sent again at the next launch`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymentProviderStoreUnavailable`})}),_jsx(_components.td,{children:`Flock could not reach the store`}),_jsx(_components.td,{children:`Nothing to do: it is sent again at the next launch`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PaymentProviderReceiptInvalid`})}),_jsx(_components.td,{children:`The store did not confirm the purchase`}),_jsx(_components.td,{children:`Read the reason: a fake purchase, a refunded one, or a bad moment at the store`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`unity-iap-4`,children:`Unity IAP 4`}),`\n`,_jsxs(_components.p,{children:[`A game on Unity IAP 4.x keeps its own purchase code and hands each purchase to Flock with\n`,_jsx(_components.code,{children:`Shop.RedeemStoreReceiptAsync`}),`, finishing it in the store only once that returns.\n`,_jsx(_components.a,{href:`https://github.com/QwackStack/FlockUnitySDK/blob/main/Docs~/recipes/FlockUnityIap4Store.cs`,children:_jsx(_components.code,{children:`FlockUnityIap4Store.cs`})}),`\nin the SDK’s GitHub repository is a ready-made version to copy into your project (the `,_jsx(_components.code,{children:`.unitypackage`}),`\ndoes not include it).`]}),`\n`,_jsx(Heading,{level:`2`,id:`your-own-store-code-in-unreal`,children:`Your own store code in Unreal`}),`\n`,_jsxs(_components.p,{children:[`A game with billing code of its own (on Android with UE 5.4 to 5.7, for one) hands each purchase to Flock\nwith the shop provider’s `,_jsx(_components.code,{children:`RedeemStoreReceipt`}),` (`,_jsx(_components.strong,{children:`Flock Redeem Store Receipt`}),`, with `,_jsx(_components.strong,{children:`Make Google Play\nReceipt`}),` or `,_jsx(_components.strong,{children:`Make App Store Receipt`}),`), finishing it in the store only once that succeeds. A redemption\nis safe to send again: one store purchase makes one Flock purchase.`]}),`\n`,_jsx(_components.p,{children:`Use one way to buy. The engine’s own in-app purchase Blueprint nodes finish a purchase as it is made,\nbefore Flock has delivered it, so a purchase Flock then refuses is lost. The editor’s Flock setup panel\nwarns when a Blueprint uses them in a game whose shops sell real-money items; keep them only for\nproducts no Flock shop item sells.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"In-App Purchases","description":"Sell shop items for real money through the App Store and Google Play.","href":"/guides/real-money-purchases"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"What you set up","slug":"what-you-set-up","depth":2,"children":[]},{"title":"Show the store’s price","slug":"show-the-stores-price","depth":2,"children":[]},{"title":"Buy","slug":"buy","depth":2,"children":[]},{"title":"Restore purchases","slug":"restore-purchases","depth":2,"children":[]},{"title":"Purchases finished later","slug":"purchases-finished-later","depth":2,"children":[]},{"title":"Stop selling an item","slug":"stop-selling-an-item","depth":2,"children":[]},{"title":"Test before you ship","slug":"test-before-you-ship","depth":2,"children":[]},{"title":"Revenue","slug":"revenue","depth":2,"children":[]},{"title":"When something fails","slug":"when-something-fails","depth":2,"children":[]},{"title":"Unity IAP 4","slug":"unity-iap-4","depth":2,"children":[]},{"title":"Your own store code in Unreal","slug":"your-own-store-code-in-unreal","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/qwacks/05763fd4e1d53e37/lang-toggle.js"],"subdomain":"qwacks","siteName":"Qwacks","title":"In-App Purchases - Qwacks","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/guides/real-money-purchases","matchLevel":0},"ar":{"href":"/ar/guides/real-money-purchases","matchLevel":1}}},"lastModified":"2026-11-11T19:01:52.255Z","originalFileLocation":"guides/real-money-purchases.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Sell shop items for real money through the App Store and Google Play.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Qwacks\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"In-App Purchases - Qwacks\">\u003cmeta data-mint-head property=\"og:description\" content=\"Sell shop items for real money through the App Store and Google Play.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Qwacks\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.qwacks.com/guides/real-money-purchases\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://qwacks.mintlify.site/_mintlify/api/og/v2?division=Economy+and+Payments\u0026amp;title=In-App+Purchases\u0026amp;description=Sell+shop+items+for+real+money+through+the+App+Store+and+Google+Play.\u0026amp;theme=7cf102a658812adb3feebdf0\u0026amp;signature=253c13340e0179ac907d3f2f82193f8090debb1e90f7288ebe34852b015a84f4\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"In-App Purchases - Qwacks\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Sell shop items for real money through the App Store and Google Play.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://qwacks.mintlify.site/_mintlify/api/og/v2?division=Economy+and+Payments\u0026amp;title=In-App+Purchases\u0026amp;description=Sell+shop+items+for+real+money+through+the+App+Store+and+Google+Play.\u0026amp;theme=7cf102a658812adb3feebdf0\u0026amp;signature=253c13340e0179ac907d3f2f82193f8090debb1e90f7288ebe34852b015a84f4\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/qwacks/UqcSWN8cDTjx2Nmd/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Qwacks\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0099FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.qwacks.com/guides/real-money-purchases\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/real-money-purchases.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.qwacks.com/guides/real-money-purchases\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ar\" href=\"https://docs.qwacks.com/ar/guides/real-money-purchases\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.qwacks.com/guides/real-money-purchases\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.qwacks.com/#organization\",\"name\":\"Qwacks\",\"url\":\"https://docs.qwacks.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/qwacks/TGGmq_oWzDacAqHl/icons/qwacks.svg?fit=max\u0026auto=format\u0026n=TGGmq_oWzDacAqHl\u0026q=85\u0026s=2023abb340d6ec576975601525ab2ce9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.qwacks.com#website\",\"name\":\"Qwacks\",\"url\":\"https://docs.qwacks.com\",\"publisher\":{\"@id\":\"https://docs.qwacks.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.qwacks.com/guides/real-money-purchases#webpage\",\"url\":\"https://docs.qwacks.com/guides/real-money-purchases\",\"name\":\"In-App Purchases\",\"description\":\"Sell shop items for real money through the App Store and Google Play.\",\"dateModified\":\"2026-11-11T19:01:52.255Z\",\"isPartOf\":{\"@id\":\"https://docs.qwacks.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.qwacks.com/guides/real-money-purchases#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.qwacks.com/guides/real-money-purchases#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Features\",\"item\":\"https://docs.qwacks.com/guides/players-and-auth\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Economy and Payments\",\"item\":\"https://docs.qwacks.com/guides/currencies-and-wallets\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"In-App Purchases\",\"item\":\"https://docs.qwacks.com/guides/real-money-purchases\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.qwacks.com/guides/real-money-purchases#article\",\"headline\":\"In-App Purchases\",\"name\":\"In-App Purchases\",\"description\":\"Sell shop items for real money through the App Store and Google Play.\",\"url\":\"https://docs.qwacks.com/guides/real-money-purchases\",\"mainEntityOfPage\":{\"@id\":\"https://docs.qwacks.com/guides/real-money-purchases#webpage\"},\"dateModified\":\"2026-11-11T19:01:52.255Z\",\"publisher\":{\"@id\":\"https://docs.qwacks.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.qwacks.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Qwacks\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Qwacks\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/guides/real-money-purchases.md","siteName":"Qwacks","nav":{"global":null,"languages":[{"language":"en","default":true,"tabs":[{"tab":"Qwacks","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/qwacks.svg","pages":[{"title":"Qwacks","href":"/welcome"}]},{"tab":"Flock","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/flock.svg","groups":[{"group":"Getting Started","pages":[{"title":"Flock","href":"/introduction"},{"title":"Quickstart","href":"/quickstart"},{"title":"Authentication","href":"/authentication"},{"title":"Unity SDK","href":"/sdk/unity"},{"title":"Unreal SDK","href":"/sdk/unreal"}]},{"group":"Concepts","pages":[{"title":"Studios \u0026 Games","href":"/concepts/studios-and-games"},{"title":"Versions","href":"/concepts/versions"},{"title":"Players","href":"/concepts/players"}]},{"group":"Features","pages":[{"group":"Players","pages":[{"title":"Sign-in","href":"/guides/players-and-auth"},{"title":"Linking Accounts","href":"/guides/account-linking"},{"title":"Player Data","href":"/guides/player-data"},{"title":"Bans","href":"/guides/bans"}]},{"group":"Progress","pages":[{"title":"Achievements","href":"/guides/achievements"},{"title":"Leaderboards","href":"/guides/leaderboards"}]},{"group":"Economy and Payments","pages":[{"title":"Currencies and Wallets","href":"/guides/currencies-and-wallets"},{"title":"Shops and Inventory","description":"Sell items and track what each player owns.","href":"/guides/shops-and-inventory"},{"title":"In-App Purchases","href":"/guides/real-money-purchases"},{"title":"Web Payments","description":"Sell shop items for real money on Windows, macOS, Linux and WebGL through Stripe, Tap or Moyasar.","href":"/guides/web-checkout"}]},{"group":"Game Content","pages":[{"title":"Remote Config","href":"/guides/remote-config"},{"title":"Game Patches","href":"/guides/game-patches"},{"title":"Game Files","href":"/guides/assets"}]},{"group":"Reaching Players","pages":[{"title":"Player Segments","href":"/guides/segments"},{"title":"Notifications","href":"/guides/notifications"}]},{"group":"Insights","pages":[{"title":"Analytics and Events","href":"/guides/analytics-and-events"},{"title":"Developer Alerts","href":"/guides/developer-alerts"}]},{"group":"Multiplayer","pages":[{"title":"Multiplayer","sidebarTitle":"Overview","href":"/guides/multiplayer"},{"title":"Parties","href":"/guides/parties"},{"title":"Matchmaking","href":"/guides/matchmaking"},{"title":"Sessions","href":"/guides/sessions"},{"title":"Connecting Players","href":"/guides/connecting-players"}]}]},{"group":"Reference","pages":[{"title":"Changelog","href":"/changelog"}]}]},{"tab":"Protokite","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/protokite.svg","pages":[{"title":"Protokite","href":"/protokite/getting-started"}]},{"tab":"Data Duck","icon":"https://mintlify.s3.us-west-1.amazonaws.com/qwacks/icons/data-duck.svg","pages":[{"title":"Data Duck","href":"/data-duck/getting-started"}]}]},{"language":"ar","navbar":{"links":[{"href":"https://www.qwacks.com/pricing","label":"الأسعار"},{"href":"https://github.com/QwackStack/FlockUnitySdk/releases","label":"حزمة Unity"},{"href":"https://github.com/QwackStack/FlockUnrealSdk/releases","label":"حزمة Unreal"}],"primary":{"type":"button","label":"لوحة التحكم","href":"https://flock-saas.qwacks.com"}},"pages":[{"title":"ar","href":"/ar/guides/real-money-purchases"}]}]},"basePath":"","title":"In-App Purchases - Qwacks","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-u3J1-UOn.js","DynamicMarkdown-B-f2cqXQ.js","zoom-image-lightbox-DTFzvaXJ.js","lightbox-handle-r17bVUz3.js"]}