This is the Godot monetization SDK reference for PowerUp 0.2.0: every public method, static helper,
signal and property of the PowerUp autoload, and the public functions of the three classes that ship
with it. The SDK is plain GDScript for Godot 4, with no GDExtension or native module. The addon lives in
addons/powerup/, and enabling it registers the PowerUp autoload. For a first integration, read
getting started before this page.
The autoload has 70 methods, 10 static helpers and 16 signals. The classes add
PowerUpStorefront (1 method, 2 signals), PowerUpOfferButton (1 method, 1 signal) and
PowerUpDisclosure (91 static functions). Functions whose names start with an underscore are private
and left out.
How calls work
Every method that talks to the server is a coroutine that returns a Dictionary with ok, except three
older ones listed under entitlements. On success
the data sits under a named key (storefront, home, claim…). On failure the result carries error
(a message for you, not the player), code (what to branch on) and, when they apply, status,
details, retry_after and idempotency_key. The error reference lists every code.
var res: Dictionary = await PowerUp.claim_quest(quest.key)
if res.ok:
_show_reward(PowerUpDisclosure.reward_text(res.claim.reward))
else:
match res.code:
"not_completed":
pass # the button should not have been enabled
_:
push_warning("%s (%s)" % [res.error, res.code])
Three more rules hold across the whole SDK:
- Calls that spend or grant take an
idempotency_key. Leave it empty and the SDK makes one, then
returns it in the result. Pass the same key to retry the same player action, and the server answers
with its stored reply instead of acting twice.
- Player calls need a token. Without one they fail at once with
player_token_required, before any
request. See players and accounts.
- Time comes from the server. Every answer carries the server's time, and the SDK keeps it against
Godot's monotonic clock. Count down with
seconds_until(), never the device clock.
Setup
| Method | Returns | What it does |
|---|
initialize(key: String, player: String, options: Dictionary = {}) | void | Sets the publishable key, the player's client id and the options below. baseUrl is required: there is no default host. |
is_initialized() | bool | Whether the key, client id and base URL are all set. |
set_transport(transport: Callable) | void | Sends every request to your function instead of over HTTP, for tests and demos. Callable() goes back to HTTP. |
The options for initialize():
| Option | Default | Meaning |
|---|
baseUrl | none | The API base URL, from the console under Integrations → SDK. |
jurisdiction | "" | Sent with storefront requests when set. |
verbose | false | Logs each failure as a warning. |
platform | detected | web, ios, android or desktop. A web export in a phone browser is web. |
client | the SDK's name and version | A label for your build, such as "mygame/1.0.0". |
appVersion | the project's application/config/version | Your build's version. Items with version rules are matched against it; without one, only items every version has are listed. |
playerToken | "" | A saved token, same as set_player_token(). |
draftConfig | false | Serve the unpublished draft instead of the published config. Test keys only. |
Identity and account
| Method | Returns | What it does |
|---|
register_player(client_id: String, display_name: String = "") | Dictionary | Registers this install and gets its player token, handed out once. {ok, status, player, token_issued}. |
set_player_token(token: String) | void | Uses a token saved earlier. An empty string clears it. |
fetch_me() | Dictionary | The player as the server sees them: {ok, me} with the player, wallet, perks and subscription. |
set_birth_year(birth_year: int, idempotency_key: String = "") | Dictionary | Answers the age prompt, once per player. {ok, age}. |
create_transfer_code() | Dictionary | An 8-character code that moves the account, valid 15 minutes, single use. {ok, status, transfer_code}. |
redeem_transfer_code(code: String, merge: bool = true, confirmed: bool = false) | Dictionary | Moves this install onto the code's account, merging its own account in once the player has confirmed the preview. |
redeem_recovery_code(code: String, merge: bool = true, confirmed: bool = false) | Dictionary | The same for a 16-character recovery code, which is spent when it works. |
redeem_code(code: String, merge: bool = true, confirmed: bool = false) | Dictionary | One entry field for both kinds of code, told apart by length. |
create_recovery_code(idempotency_key: String = "") | Dictionary | A long-lived recovery code, shown once. Replaces the previous one. {ok, status, recovery_code, idempotency_key}. |
fetch_recovery_code_status() | Dictionary | Whether a recovery code is active, when it was made and when one was last used. Never the code. |
delete_account(idempotency_key: String = "") | Dictionary | Deletes the account and lists every subscription still billing. {ok, deletion, idempotency_key}. |
The flows behind these are on players and accounts.
Store and collection
| Method | Returns | What it does |
|---|
fetch_storefront() | Dictionary | Every live offer for this player, with its disclosures resolved and any reason it can't be bought. {ok, storefront}. Fires storefront_loaded or storefront_failed. |
fetch_catalog(category: String = "all") | Dictionary | The item collection: what's owned and how, how to get the rest, coin prices and version support. {ok, catalog}. |
buy_item(item_key: String, expected_price: int, idempotency_key: String = "") | Dictionary | Buys an item with coins at the price the player saw. A different price is refused, never charged. {ok, bought}. |
claim_free_offer(offer_key: String, idempotency_key: String = "") | Dictionary | Claims a free offer. Too soon answers cooldown, too often today daily_cap. {ok, claim}. |
How to build a store screen on these is on the storefront.
Lobby and progression
| Method | Returns | What it does |
|---|
fetch_home() | Dictionary | Everything the lobby needs in one call: wallet, perks, pass, events, quests, news, badges, club, vault and recent runs. Fires home_loaded, badges_changed and wallet_changed. |
fetch_progress() | Dictionary | Online progress totals from match reports: XP overall and per item, and best records. Levels are yours to compute. |
badges_seen(surface: String) | Dictionary | Clears a lobby badge. Call it when that screen opens. |
badge_count(surface: String) | int | A surface's badge count as last seen, already capped by the server. |
fetch_passes() | Dictionary | The current pass with every tier (the starter pass until it's finished, then the live season), plus the star bank. |
claim_pass(pass_key: String, tier: int = 0, track: String = "", idempotency_key: String = "") | Dictionary | Claims one tier and track, or everything claimable when both are left empty. |
last_chance_seen(pass_key: String) | Dictionary | Records that the last-chance prompt was shown. It isn't offered again for 24 hours. |
fetch_quests() | Dictionary | Starter, daily, weekly, season and event quests, with what's claimable. |
claim_quest(quest_key: String, period_key: String = "", idempotency_key: String = "") | Dictionary | Claims a completed quest. |
fetch_events() | Dictionary | Live events, and past ones still in their replay window. |
claim_event_level(event_key: String, level: int, idempotency_key: String = "") | Dictionary | Claims a completed event level. |
collect_vault(idempotency_key: String = "") | Dictionary | Moves the Premium coin vault into the wallet. |
News and clubs
| Method | Returns | What it does |
|---|
fetch_news() | Dictionary | The news inbox this player is shown, pinned items first. |
read_news(news_key: String, idempotency_key: String = "") | Dictionary | Marks an item read and grants its gift, once however often it's read. |
list_clubs(query: String = "", limit: int = 20) | Dictionary | Searches clubs by name, and returns the create price and the preset descriptions. |
create_club(club_name: String, badge_icon: int = 0, badge_color: int = 0, description_idx: int = 0, join_policy: String = "open", idempotency_key: String = "") | Dictionary | Creates a club for its coin price and joins it as owner. |
get_club(club_id: String) | Dictionary | One club, its members and this week's standing. |
join_club(club_id: String, idempotency_key: String = "") | Dictionary | Joins a club. |
leave_club(idempotency_key: String = "") | Dictionary | Leaves the player's club. The rejoin cooldown starts. |
remove_club_member(club_id: String, member_id: String, idempotency_key: String = "") | Dictionary | The owner removes a member. |
fetch_club_tournament(limit: int = 50) | Dictionary | This week's club tournament: standings, the player's club and the reward brackets. |
report_club(club_id: String, reason: String = "name", idempotency_key: String = "") | Dictionary | Reports a club for its name or another reason. |
Match tickets and boosts
| Method | Returns | What it does |
|---|
request_match_ticket(request: Dictionary, idempotency_key: String = "") | Dictionary | A signed ticket for the next online match, for your game server. Gives up after 2.5 seconds, so a slow server never holds a player at the Play button. |
authorize_boost(kind: String, source: String, options: Dictionary = {}, idempotency_key: String = "") | Dictionary | A Start Big or Revive token, paid by a free use, a charge, an ad or coins. |
use_cube_offline(count: int = 1, run_id: String = "", idempotency_key: String = "") | Dictionary | Pays for 1 to 10 Boost Cubes in an offline run. |
void_cube_offline(use_id: String, reason: String = "", idempotency_key: String = "") | Dictionary | Refunds an offline cube that couldn't start, within 60 seconds of the use. |
void_cube_offline_by_key(use_idempotency_key: String, reason: String = "", idempotency_key: String = "") | Dictionary | The same, for a use whose answer never arrived, named by the key it was sent with. |
Ads
| Method | Returns | What it does |
|---|
fetch_ads_config() | Dictionary | The ads this player may see now, the privacy flags to give your ad SDK, and the interstitial pacing to enforce. |
create_ad_session(placement_key: String, context: Dictionary = {}, idempotency_key: String = "") | Dictionary | Opens a session before a rewarded ad. Every check runs here, before the ad is shown. |
complete_ad_session(session_id: String, provider: String, reward_earned: bool = true, idempotency_key: String = "") | Dictionary | Reports the ad shown. The session comes back granted with its reward, pending while the network verifies, or rejected. |
poll_ad_session(session_id: String) | Dictionary | A session's state while server-side verification is pending. |
report_impressions(events: Array) | Dictionary | Reports up to 50 interstitial and banner impressions, so the server can audit the pacing. |
Payments
| Method | Returns | What it does |
|---|
start_checkout(sku_key: String, ui_mode: String = "popup", return_origin: String = "", idempotency_key: String = "") | Dictionary | Web and desktop: creates a Stripe Checkout. Call it when the product sheet opens, not on Pay. |
open_checkout(checkout: Dictionary, same_tab: bool = false) | bool | Opens that checkout. Call it synchronously inside the Pay button's handler, or the browser blocks the popup. |
open_url(url: String) | bool | Opens a link outside the game, such as a subscription's manage page, inside a tap. |
checkout_status(checkout_id: String) | Dictionary | A checkout's state. Poll it while the player pays. Fires checkout_completed once. |
create_purchase_intent(sku_key: String, idempotency_key: String = "") | Dictionary | iOS and Android: runs the purchase checks before the store sheet opens and returns the ids to hand the store. |
submit_receipt(provider: String, payload: Dictionary, idempotency_key: String = "") | Dictionary | Settles an App Store or Google Play transaction, and says whether to finish it now. |
restore(provider: String, payload: Variant, idempotency_key: String = "") | Dictionary | Restore Purchases: brings durable items and subscriptions back to this account. Up to 50 at a time. |
fetch_subscription() | Dictionary | The subscription granting perks now, or null, with where to manage it. |
subscription_portal(return_origin: String = "") | Dictionary | Stripe only: a fresh billing-portal link, the web subscriber's way to cancel. |
purchase(sku_key: String, idempotency_key: String = "") | Dictionary | A test purchase. Test keys only: real money goes through the methods above. |
The order these run in, per platform, is on payments.
Entitlements, evidence and guards
| Method | Returns | What it does |
|---|
fetch_entitlements() | Array | Everything the player owns, and refills the local cache. Returns [] on failure. |
fetch_player() | Dictionary | The player record with wallets and recent purchases. Returns {} on failure. |
record_evidence(action: String, subject: String) | void | Logs a disclosure your own UI rendered. Fire and forget: it never blocks play. |
is_entitled(item: String) | bool | A local lookup in the entitlement cache, by item key. |
entitlements() | Dictionary | A copy of the cache, keyed by item key. |
spend_limit_notice() | String | The monthly spend cap line from the last storefront, or empty. |
age_gated() | bool | Whether the last storefront was withheld for the player's age. Render the store read-only then. |
Server clock
| Method | Returns | What it does |
|---|
server_now_unix() | float | Now on the server's clock, in unix seconds. Before the first answer it's the device clock. |
has_server_clock() | bool | Whether a server time has been seen yet. |
seconds_until(iso: Variant) | int | Whole seconds until a server end time. 0 once passed, -1 when there's no time to count to. Draw no countdown for -1. |
Static helpers
These are static and need no instance, so they work in tests and tool scripts too.
| Function | Returns | What it does |
|---|
detect_platform() | String | web, android, ios, or desktop for everything else. |
new_idempotency_key() | String | A random UUID. Make one per player action and reuse it when retrying that action. |
normalize_transfer_code(raw: String) | String | The 8 characters the server reads from a typed transfer code, or "". |
normalize_recovery_code(raw: String) | String | The 16 characters the server reads from a typed recovery code, or "". |
code_kind(raw: String) | String | "transfer", "recovery" or "", by the typed code's length. |
checkout_return_id() | String | Web: the checkout id a same-tab checkout came back with, removed from the address bar. "" elsewhere. |
page_origin() | String | Web: this page's origin. "" elsewhere. |
checkout_poll_delay(attempt: int) | float | Seconds to wait before poll number attempt: 3, 3, 5 and 8, then every 10. |
iso_to_unix(iso: String) | float | An ISO-8601 time to unix seconds, keeping milliseconds and time zone offsets. |
unix_to_iso(unix: float) | String | Unix seconds to an ISO-8601 UTC time. |
Signals
| Signal | Fires when |
|---|
storefront_loaded(storefront: Dictionary) | fetch_storefront() answered. |
storefront_failed(reason: String) | fetch_storefront() failed. |
purchase_completed(result: Dictionary) | A test purchase() succeeded. |
purchase_failed(reason: String) | A test purchase() failed. |
entitlements_loaded(entitlements: Array) | fetch_entitlements() answered. |
player_loaded(player: Dictionary) | fetch_player() answered. |
evidence_recorded(action: String) | record_evidence() sent an entry. |
request_failed(endpoint: String, reason: String) | Any request didn't succeed: network failures and server errors alike. |
player_token_issued(token: String) | A new token arrived, from register_player() or a redeemed code. Save it. |
wallet_changed(wallet: Dictionary) | A call moved the wallet: a coin buy, a claim, a checkout, a reward. |
home_loaded(home: Dictionary) | fetch_home() answered. |
badges_changed(badges: Array) | The lobby badges changed: fetch_home(), badges_seen(), or a switch of account. |
checkout_completed(result: Dictionary) | checkout_status() saw a checkout complete. Once per checkout. |
receipt_verified(result: Dictionary) | submit_receipt() settled a store transaction. |
player_adopted(external_id: String, token: String) | A redeemed code moved this install onto another account. Save both as the new identity. |
account_deleted(result: Dictionary) | delete_account() answered. Forget the saved token. |
Properties and constants
The autoload's public properties: api_key, player_id, jurisdiction, base_url, verbose,
platform, client, app_version, player_token and draft_config (set by initialize() and the
identity calls), and the last answer of each read, kept so a screen can redraw without another request:
last_storefront, last_catalog, last_home, last_progress, last_ads_config, last_news,
last_clubs and badges.
It also has 28 constants. The ones a game reads most:
| Constant | Value |
|---|
SDK_VERSION | "0.2.0" |
REQUEST_TIMEOUT_SECONDS | 15.0, the ceiling on any request |
TICKET_TIMEOUT_SECONDS | 2.5, when request_match_ticket() gives up |
BADGE_SURFACES | quests, pass, events, news, store, collection, clubs |
RUN_MODES | unranked, ranked, party, event |
BOOST_KINDS / BOOST_SOURCES | start_big, revive / premium_free, inventory, ad, coins |
AD_PROVIDERS / AD_FORMATS | none, test, admob, h5 / rewarded, interstitial, banner |
CHECKOUT_UI_MODES | popup, redirect |
STORE_PROVIDERS | apple, google |
MAX_RESTORE | 50 purchases per restore() call |
TRANSFER_CODE_LENGTH / RECOVERY_CODE_LENGTH | 8 / 16 |
CLUB_NAME_MIN / CLUB_NAME_MAX | 3 / 20 characters |
PowerUpStorefront
A ready-made store screen: a VBoxContainer that fetches the storefront, builds a PowerUpOfferButton
per offer in a grid, and shows the monthly spend cap line when it applies.
| Member | Kind | What it does |
|---|
load_offers() | method, void | Fetches and renders the offers. Safe to call again: the grid is rebuilt, not appended to. |
columns | export, int = 3 | Columns in the offer grid. |
show_spend_limit | export, bool = true | Whether to show the spend cap line. |
offer_purchased(result: Dictionary) | signal | A purchase from the grid succeeded. The grid reloads. |
offer_failed(reason: String) | signal | A purchase from the grid was declined. |
Its buy button calls purchase(), which works with test keys only. Use it to prototype a store; for real
money, wire your own buttons to the flow on payments.
A Button that draws one offer through the disclosure guards. It won't show a value badge the server
didn't verify, won't run a countdown for an offer with no end time, and disables itself for an offer with
no price, with missing subscription terms, or past its end, showing the reason on the card.
| Member | Kind | What it does |
|---|
configure(new_offer: Dictionary) | method, void | Sets the offer (one entry of the storefront's offers) and redraws. |
offer | property, Dictionary | The offer it shows. |
offer_pressed(offer: Dictionary) | signal | The player tapped a buyable offer. |
PowerUpDisclosure
Pure static functions that turn server answers into the words a player reads, and refuse to draw what
the rules don't allow. They take Dictionaries exactly as the SDK returns them, so they're easy to unit
test without a scene tree. There are 91 of them, plus 30 constants such as BLOCKING (the text for
each reason an offer can't be bought), TRANSFER_CODE_WARNING and RECOVERY_CODE_NOTICE.
Offers, prices and subscriptions
| Function | Returns | What it does |
|---|
can_render_badge(offer: Dictionary) | bool | Whether a value badge may show: only when the server verified it against a real baseline offer. |
badge_text(offer: Dictionary) | String | The badge, such as "1.15× value", or "" when it may not show. |
badge_text_for(offer: Dictionary, ratio: float = 0.0) | String | badge_text(), hidden when the store's own price ratio is more than 2% off the server's. |
can_render_countdown(offer: Dictionary) | bool | Whether the offer has a real end time to count down to. |
seconds_remaining(offer: Dictionary, now_unix: int = 0) | int | Seconds until the offer ends, or -1. |
display_price(offer: Dictionary, localized: String = "") | String | The price as the player pays it. A store's localized price wins. "" when the card may not show one. |
price_line(offer: Dictionary) | String | Same as display_price(offer). |
coins_granted(offer: Dictionary) | int | The coins a purchase grants. |
coins_line(offer: Dictionary) | String | "1,200 coins", or "". |
usd_line(offer: Dictionary) | String | The coins' real-money value at the disclosed rate, or "". |
currency_line(offer: Dictionary) | String | The coin amount with its real-money value beside it. |
bonus_line(offer: Dictionary) | String | A Premium coin bonus on its own line. It never feeds the value badge. |
period_label(subscription: Dictionary) | String | The billing period as a word, such as "month". |
subscription_complete(offer: Dictionary, localized: String = "") | bool | Whether a subscription carries every term its card must show. |
subscription_lines(offer: Dictionary, localized: String = "") | Array[String] | Price per period, renewal, how to cancel and any trial, or [] when a term is missing. |
perk_lines(offer: Dictionary) | Array[String] | The perks a subscription card lists. |
blocking_text(reason: Variant) | String | What a card says instead of a buy button for the server's reason. |
blocking_short(reason: Variant) | String | The same, short enough for a button. |
blocking_reason(offer: Dictionary, localized: String = "") | String | Why this offer can't be bought now, or "". |
is_purchasable(offer: Dictionary, localized: String = "") | bool | Whether blocking_reason() is empty. |
terms_line(offer: Dictionary) | String | Renewal and cancel terms, for older subscription answers. |
direct_purchase_notice(offer: Dictionary, rail: Variant = "", sandbox: bool = false) | String | A "currency only" line when real-money offers exist but none can be paid on this device. |
age_gated(storefront: Dictionary) | bool | Whether the store was withheld for the player's age. |
spend_limit_notice(storefront: Dictionary) | String | The monthly spend cap line, or "". |
Rewards, items and progression
| Function | Returns | What it does |
|---|
reward_text(reward: Variant) | String | A reward as a chip: "50 coins", "5 ★" or an item name. |
unlock_line(route: Variant, names: Dictionary = {}) | String | How to get an item, as one line, such as "Buy for 900 coins". |
unlock_short(route: Variant) | String | The same, card-sized. |
sub_status_line(sub: Variant) | String | A subscription's state: "Renews Oct 31" or "Ends Oct 31". |
known_metric(metric: Variant) | bool | Whether metric_text() can describe a quest goal. |
metric_text(metric: Variant, target: Variant, filters: Variant = {}, species_names: Dictionary = {}) | String | A quest or event goal as a sentence, such as "Get 7 kills in one game". |
countdown_allowed(ends_at: Variant, server_now: Variant) | bool | Whether a countdown may be drawn: a real end, still ahead on the server clock. |
date_text(iso: Variant) | String | A time as "Oct 23, 2026, 08:21 UTC". |
pass_close_rule(pass_out: Variant) | String | What happens to unclaimed rewards when the pass ends. |
reward_line(reward: Variant, bank_cap: int = -1) | String | A reward, saying so when its stars wait in the star bank. |
star_bank_notice(star_bank_cap: Variant) | String | The star bank line for a player with no current pass. |
premium_locked_notice(entry: Variant) | String | A premium reward reached without premium, shown the moment it's earned. |
premium_locked_lines(entries: Variant) | Array[String] | premium_locked_notice() for each entry. |
last_chance_allowed(pass_out: Variant, localized: String = "") | bool | Whether the end-of-season prompt may be drawn at all. |
last_chance_lines(pass_out: Variant, localized: String = "") | Array[String] | Every line of that prompt, ending with the promise that declining keeps everything earned. |
quest_text(quest: Variant, species_names: Dictionary = {}) | String | A quest as the sentence the player reads. A quest without text is never drawn. |
event_level_text(level: Variant, species_names: Dictionary = {}) | String | An event level as a sentence. |
progress_text(entry: Variant) | String | Progress such as "3 / 5", never past the target. |
auto_granted_line(entry: Variant) | String | A quest reward added automatically at a reset. |
event_gate_text(event: Variant) | String | What a gated event's button says before the tap. |
Boosts and ads
| Function | Returns | What it does |
|---|
boost_name(kind: Variant) | String | "Start Big", "Revive" or "Boost Cube". |
boost_mode_allowed(boost: Variant, mode: String) | bool | Whether a boost's chip may show in this mode. Ranked is off by default. |
boost_price_line(boost: Variant, kind: String) | String | The coin price, shown before the tap. |
boost_source_lines(boost: Variant, balance: int = -1) | Array[String] | Every way to pay for a boost now, in order: free use, charge, ad, coins. |
boost_blocked_text(boost: Variant) | String | Why coins and ads are closed for this boost. |
boost_refusal_text(code: Variant) | String | A refused boost's code in the player's words. |
ticket_start_big_notice(ticket: Variant) | String | A refused Start Big on a match ticket, saying nothing was charged. |
cube_offer_line(cube: Variant, effect: String) | String | A Boost Cube offer with its effect and price, before paying. |
in_play_line(wallet: Variant) | String | Coins held for open matches, such as "30 coins in play". |
ad_reward_text(placement: Variant, run_coins: int = 0) | String | What a rewarded ad gives, named before the ad. |
ad_reward_prompt(placement: Variant, run_coins: int = 0) | String | The Watch button's words, with the reward in them. |
ad_unavailable_text(placement: Variant) | String | Why a rewarded ad isn't offered now. |
interstitial_due(ads: Variant, state: Dictionary) | bool | Whether an interstitial may show now, by the pacing the server sent. |
Subscriptions, receipts and store prices
| Function | Returns | What it does |
|---|
cancel_line(offer_or_rail: Variant) | String | Where to cancel a subscription. |
manage_line(sub: Variant) | String | Where this subscriber manages and cancels: the billing page, the App Store or Google Play. |
manage_button_text(sub: Variant) | String | The Manage button's words, or "". |
manage_url(sub: Variant) | String | The store's subscriptions page, or "". Stripe links come from subscription_portal(). |
manage_elsewhere_line(sub: Variant, platform: String) | String | For a store subscription seen on another platform: where it's managed. |
receipt_line(receipt: Variant) | String | What the player reads after submit_receipt(). |
restore_summary(restore: Variant) | String | "Restored 2 purchases." or "Nothing to restore." |
restore_skipped_lines(restore: Variant) | Array[String] | Why each skipped purchase didn't come back. |
checkout_line(status: Variant) | String | The line a waiting checkout sheet shows. |
store_price(offer: Dictionary, store_prices: Dictionary) | String | The store's localized price for an offer sold in a store sheet. |
store_amount(offer: Dictionary, store_prices: Dictionary) | float | The store's amount, in its currency's units. |
localized_prices(offers: Array, store_prices: Dictionary) | Dictionary | Every store-sold offer's localized price, by offer key. |
store_has_product(offer: Dictionary, store_prices: Dictionary) | bool | Whether the store returned this offer's product. Hide it when not. |
store_ratio(offer: Dictionary, offers: Array, store_prices: Dictionary) | float | The value ratio the store's own prices give. |
store_badge_text(offer: Dictionary, offers: Array, store_prices: Dictionary) | String | badge_text_for() with that ratio. |
News, clubs and accounts
| Function | Returns | What it does |
|---|
news_cta_text(item: Variant) | String | A news item's button words, or "" for none. |
news_gift_line(gift: Variant) | String | What a news read granted. |
club_create_price_line(clubs: Variant, balance: int = -1) | String | The create button with its price, before the tap. |
club_refusal_text(code: Variant, details: Variant = {}) | String | A refused club call in the player's words. |
club_rejoin_line(clubs: Variant) | String | When a player who left may join a club again. |
club_last_week_line(club: Variant) | String | Last week's tournament result, for the lobby. |
bracket_line(bracket: Variant) | String | One tournament reward bracket. |
transfer_code_display(raw: Variant) | String | A typed transfer code in the shape it's shown, for the entry field. |
transfer_code_complete(raw: Variant) | bool | Whether a whole transfer code has been typed. |
account_code_display(raw: Variant) | String | One field for either kind of code, in groups of four. |
account_code_kind(raw: Variant) | String | "transfer", "recovery" or "" for what the field holds. |
recovery_status_line(status: Variant, saved_created_at: Variant = null) | String | The recovery code line for Settings. |
transfer_expiry_line(seconds_left: int) | String | Under a shown transfer code: how long it lasts. |
transfer_refusal_text(code: Variant, details: Variant = {}) | String | A refused redeem in the player's words. |
transfer_preview_lines(details: Variant) | Array[String] | The merge preview to show before the player confirms, with the warning. |
transfer_done_text(merged: Variant) | String | What came along after a transfer. |
delete_billing_lines(deletion: Variant) | Array[String] | After a deletion: one line per subscription still billing, with where to cancel. |
coins_text(n: int) | String | "1 coin" or "1,240 coins". |
thousands(n: int) | String | 1240 as "1,240". |