completed
Finish successfully
Purpose and timing
Report a genuine successful end. Use one terminal outcome per run. Conditional on your game's successful completion path.
Parameters and payload
No parameter is universally required for this name: the published per-game event definition is authoritative. The starter's proposal allows optional score (integer 0–1,000,000) and progress (number 0–100). It accepts no other fields. Your game's required fields or bounds can differ; inspect its current registry.
// Only valid after staff registers this event/schema for your game.
// PIExample is the provided sample helper; it waits for a real acknowledgement.
const acknowledgement = await PIExample.report('completed', {"score":50,"progress":100});
console.log(acknowledgement);{
"name": "completed",
"data": {
"score": 50,
"progress": 100
}
}The JSON above shows the semantic payload; the SDK adds the UUID and V2 sequence. Keep data an object, use actual numbers (not numeric strings), and omit unregistered properties. This event is terminal. Do not send more reports in the same run after acceptance.
Platform behavior
Closes the session, increments the signed-in completion counter, updates personal best/eligible score entries and opens launcher results. Signed-in reward processing is asynchronous.
Validation and errors
Registration, release scope, payload types/bounds, session state, event count and strict sequence checks apply. The current serialized data limit is 8192 characters. A defined minimumIntervalMs throttles accepted occurrences. completed is additionally rejected within three seconds of session creation; the examples wait four seconds after start acknowledgement. Built-in games can validate mode, seed, counters and timing beyond this common contract. Do not use their custom fields for a new game without agreeing a matching schema. See error recovery.
Best practices
Report the real gameplay transition once. Observe acceptance independently from reward receipts. After rejection or timeout, stop reporting, fix the issue and reload; there is no SDK sequence-repair method. Do not calculate platform currency or entitlements from this event locally.