Skip to content

gplay orders refund

Refund a single Google Play order by its order ID via orders.refund — a money-moving, irreversible write. By default the money is returned but the buyer keeps access to what they bought; pass --revoke to additionally terminate the entitlement (for a subscription, all future payments stop too).

This is destructive, so it refuses without --confirm (exit 3, naming the flag); CI=true never auto-confirms. Use --dry-run to preview the target with no HTTP call — under --output json the preview lists the gate in a "requires" array. GPLAY_READONLY refuses it (exit 4). There is no bulk refund — refund one order at a time.

Refunding requires the service account to hold the CAN_MANAGE_ORDERS permission (never part of a Role bundle); a 403 names it. Google does not allow refunding orders older than 3 years — that surfaces as a specific refusal, not a generic error.

[experimental] — the surface may still evolve (ADR-0010).

gplay orders refund <orderId> [flags]
FlagDescription
--confirmauthorize the refund (required — this moves money and is irreversible)
--dry-runpreview the target without any HTTP call (reports the --confirm requirement)
--output stringoutput format: table, json, or markdown (default: auto — table on TTY, json in pipes/CI)
--package stringAndroid package name (overrides .gplay/config.json pin)
--revokealso revoke the buyer's entitlement (default: refund money, keep access)
FlagDescription
--account stringname of a stored Account to use (overrides env and active Account)
--retry intretry transient failures (transport errors, 5xx, 429) up to N times with exponential backoff (default: 0, no retry)
--service-account stringpath to a service-account JSON, or inline JSON content (overrides --account, env, and active Account)
--timeout durationper-request API timeout, e.g. 30s or 2m (default: 60s for control-plane calls, none for uploads)
-v, --verboselog flow steps to stderr (info level)