Purchases & Orders
Use this skill when verifying purchases, checking subscription status, processing refunds, or managing external transactions.
Purchase verification
Verify a purchase
gpc purchases verify --product-id premium_upgrade --token PURCHASE_TOKEN --package com.example.appCheck subscription status
gpc purchases subscription-status --product-id monthly_pro --token PURCHASE_TOKEN --package com.example.appAcknowledge a purchase
gpc purchases acknowledge --product-id premium_upgrade --token PURCHASE_TOKEN --package com.example.appVoided purchases
List voided purchases
gpc purchases voided list --package com.example.appOrders
Get order details
gpc orders get --order-id GPA.1234-5678-9012 --package com.example.appGet multiple orders
gpc orders batch-get --order-ids GPA.1234-5678-9012,GPA.9876-5432-1098 --package com.example.appRefund an order
gpc orders refund --order-id GPA.1234-5678-9012 --confirm --package com.example.appExternal transactions (alternative billing)
Create external transaction
gpc ext-tx create --file transaction.json --package com.example.appGet external transaction
gpc ext-tx get --name transactions/12345 --package com.example.appRefund external transaction
gpc ext-tx refund --name transactions/12345 --confirm --package com.example.appAgent behavior
- Always verify purchase token validity before taking action.
- Require
--confirmfor refunds; never auto-confirm. - Show order details before processing refunds.
- Use
gpc orders getto inspect beforegpc orders refund.
Notes
- Purchase tokens come from the client app's billing library.
- Voided purchases include refunds, chargebacks, and revocations.
- External transactions are for apps using alternative billing (requires enrollment).
ext-txis the short alias forexternal-transactions.