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]| Flag | Description |
|---|---|
--confirm | authorize the refund (required — this moves money and is irreversible) |
--dry-run | preview the target without any HTTP call (reports the --confirm requirement) |
--output string | output format: table, json, or markdown (default: auto — table on TTY, json in pipes/CI) |
--package string | Android package name (overrides .gplay/config.json pin) |
--revoke | also revoke the buyer's entitlement (default: refund money, keep access) |
Global flags
Section titled “Global flags”| Flag | Description |
|---|---|
--account string | name of a stored Account to use (overrides env and active Account) |
--retry int | retry transient failures (transport errors, 5xx, 429) up to N times with exponential backoff (default: 0, no retry) |
--service-account string | path to a service-account JSON, or inline JSON content (overrides --account, env, and active Account) |
--timeout duration | per-request API timeout, e.g. 30s or 2m (default: 60s for control-plane calls, none for uploads) |
-v, --verbose | log flow steps to stderr (info level) |