Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Google Play Android Developer Orders API
version: v3
description: Generated from Google's published Discovery document for Google Play Android Developer API (androidpublisher v3, revision 20261111). 4 operation(s).
contact:
name: Google
url: https://developers.google.com/
termsOfService: https://developers.google.com/terms
servers:
- url: https://androidpublisher.googleapis.com
tags:
- name: Orders
paths:
/androidpublisher/v3/applications/{packageName}/orders:batchGet:
get:
operationId: androidpublisher.orders.batchget
summary: Batchget orders
description: Get order details for a list of orders.
parameters:
- name: packageName
in: path
required: true
description: Required. The package name of the application for which this subscription or in-app item was purchased (for example, 'com.some.thing').
schema:
type: string
- name: orderIds
in: query
required: false
description: Required. The list of order IDs to retrieve order details for. There must be between 1 and 1000 (inclusive) order IDs per request. If any order ID is not found or does not match the provided package, the entire request will fail with an error. The order IDs must be distinct.
schema:
type: array
items:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/BatchGetOrdersResponse'
4XX:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: Error response (google.rpc.Status)
security:
- oauth2:
- https://www.googleapis.com/auth/androidpublisher
- apiKey: []
tags:
- Orders
/androidpublisher/v3/applications/{packageName}/orders/{orderId}:reviewrefund:
post:
operationId: androidpublisher.orders.reviewrefund
summary: Reviewrefund orders
description: Provide refund preference and purchase usage for a chargeback request
parameters:
- name: packageName
in: path
required: true
description: Required. The package name of the application for which this subscription or in-app item was purchased (for example, 'com.some.thing').
schema:
type: string
- name: orderId
in: path
required: true
description: Required. The order ID provided to the user when the subscription or in-app order was purchased.
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/OrdersReviewRefundRequest'
responses:
'200':
description: Successful response
4XX:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: Error response (google.rpc.Status)
security:
- oauth2:
- https://www.googleapis.com/auth/androidpublisher
- apiKey: []
tags:
- Orders
/androidpublisher/v3/applications/{packageName}/orders/{orderId}:
get:
operationId: androidpublisher.orders.get
summary: Get orders
description: Get order details for a single order.
parameters:
- name: packageName
in: path
required: true
description: Required. The package name of the application for which this subscription or in-app item was purchased (for example, 'com.some.thing').
schema:
type: string
- name: orderId
in: path
required: true
description: Required. The order ID provided to the user when the subscription or in-app order was purchased.
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/Order'
4XX:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: Error response (google.rpc.Status)
security:
- oauth2:
- https://www.googleapis.com/auth/androidpublisher
- apiKey: []
tags:
- Orders
/androidpublisher/v3/applications/{packageName}/orders/{orderId}:refund:
post:
operationId: androidpublisher.orders.refund
summary: Refund orders
description: Refunds a user's subscription or in-app purchase order. Orders older than 3 years cannot be refunded.
parameters:
- name: packageName
in: path
required: true
description: The package name of the application for which this subscription or in-app item was purchased (for example, 'com.some.thing').
schema:
type: string
- name: orderId
in: path
required: true
description: The order ID provided to the user when the subscription or in-app order was purchased.
schema:
type: string
- name: revoke
in: query
required: false
description: Whether to revoke the purchased item. If set to true, access to the subscription or in-app item will be terminated immediately. If the item is a recurring subscription, all future payments will also be terminated. Consumed in-app items need to be handled by developer's app. (optional).
schema:
type: boolean
responses:
'200':
description: Successful response
4XX:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: 'Client error (google.rpc.Status: INVALID_ARGUMENT, PERMISSION_DENIED, NOT_FOUND ...)'
default:
content:
application/json:
schema:
$ref: '#/components/schemas/GoogleRpcError'
description: Error response (google.rpc.Status)
security:
- oauth2:
- https://www.googleapis.com/auth/androidpublisher
- apiKey: []
tags:
- Orders
components:
schemas:
RentalDetails:
type: object
description: Details of a rental purchase.
properties: {}
SubscriptionDetails:
properties:
servicePeriodEndTime:
description: The end of the billing period funded by this order. This is a snapshot of the billing/service period end time at the moment the order was processed, and should be used only for accounting. To get the current end time of the subscription service period, use purchases.subscriptionsv2.get.
type: string
format: google-datetime
servicePeriodStartTime:
description: The start of the billing period funded by this order. This is a snapshot of the billing/service period start time at the moment the order was processed, and should be used only for accounting.
type: string
format: google-datetime
offerPhase:
type: string
enum:
- OFFER_PHASE_UNSPECIFIED
- BASE
- INTRODUCTORY
- FREE_TRIAL
description: 'Deprecated: Use offer_phase_details instead. The pricing phase for the billing period funded by this order.'
deprecated: true
offerId:
description: The offer ID for the current subscription offer.
type: string
offerPhaseDetails:
$ref: '#/components/schemas/OfferPhaseDetails'
description: The pricing phase details for the entitlement period funded by this order.
basePlanId:
description: The base plan ID of the subscription.
type: string
type: object
description: Details of a subscription purchase.
ConsumptionUsageEvent:
type: object
description: List of events, each representing an instance where the user consumed or used the purchased item or service.
properties:
location:
$ref: '#/components/schemas/CoarseLocation'
description: Optional. Geographic location where the consumption occurred.
obfuscatedAccountId:
description: Optional. Obfuscated string that is uniquely associated with the purchaser's user account in the app. https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setObfuscatedAccountId(java.lang.String)
type: string
obfuscatedProfileId:
type: string
description: Optional. Obfuscated string that is uniquely associated with the purchaser's user profile in the app. https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.Builder#setObfuscatedProfileId(java.lang.String)
consumptionItemDescription:
description: Optional. Free form text that allows developers to provide more info on the item consumed. Maximum length is 5000 characters.
type: string
consumptionTime:
format: google-datetime
type: string
description: Optional. Time when the user consumed, used, downloaded, opened, or streamed the content.
ipAddress:
type: string
description: Optional. The IP address from which the consumption occurred.
ProrationPeriodDetails:
description: Details of a proration period. A proration period can be a period calculated during a plan change to cover existing entitlements (For more information, see [Allow users to upgrade, downgrade, or change their subscription](https://developer.android.com/google/play/billing/subscriptions#allow-users-change), or a prorated period to align add-on renewal dates with the base (For more information, see [Rules applicable for items in the purchase](https://developer.android.com/google/play/billing/subscription-with-addons#rules-base-addons)).
type: object
properties:
originalOfferPhase:
description: Represent the original offer phase from the purchased the line item if the proration period contains any of them. For example, a proration period from CHARGE_FULL_PRICE plan change may merge the 1st offer phase of the subscription offer of the new product user purchased. In this case, the original offer phase will be set here.
type: string
enum:
- OFFER_PHASE_UNSPECIFIED
- BASE
- INTRODUCTORY
- FREE_TRIAL
RefundEvent:
properties:
refundReason:
type: string
enum:
- REFUND_REASON_UNSPECIFIED
- OTHER
- CHARGEBACK
description: The reason the order was refunded.
eventTime:
format: google-datetime
type: string
description: The time when the order was fully refunded.
refundDetails:
$ref: '#/components/schemas/RefundDetails'
description: Details for the full refund.
type: object
description: Details of when the order was fully refunded.
OrderDetails:
properties:
taxInclusive:
description: Indicates whether the listed price was tax inclusive or not.
type: boolean
description: Detailed information about the order at creation time.
type: object
PointsDetails:
description: Details relating to any Play Points applied to an order.
type: object
properties:
pointsOfferId:
type: string
description: ID unique to the play points offer in use for this order.
pointsSpent:
format: int64
type: string
description: The number of Play Points applied in this order. E.g. for a 100 points for $2 coupon, this is 100. For coupon stacked with base offer, this is the total points spent across both.
pointsDiscountRateMicros:
format: int64
type: string
description: The percentage rate which the Play Points promotion reduces the cost by. E.g. for a 100 points for $2 coupon, this is 500,000. Since $2 has an estimate of 200 points, but the actual Points required, 100, is 50% of this, and 50% in micros is 500,000. Between 0 and 1,000,000.
pointsCouponValue:
$ref: '#/components/schemas/Money'
description: The monetary value of a Play Points coupon. This is the discount the coupon provides, which may not be the total amount. Only set when Play Points coupons have been used. E.g. for a 100 points for $2 coupon, this is $2.
GoogleRpcError:
type: object
description: The error envelope every Google API returns.
properties:
error:
type: object
properties:
code:
type: integer
message:
type: string
status:
type: string
details:
type: array
items:
type: object
PreorderDetails:
description: Details of a pre-order purchase.
properties: {}
type: object
PartialRefundEvent:
description: Details of the partial refund events for this order.
properties:
createTime:
type: string
description: The time when the partial refund was created.
format: google-datetime
processTime:
description: The time when the partial refund was processed.
format: google-datetime
type: string
refundDetails:
$ref: '#/components/schemas/RefundDetails'
description: Details for the partial refund.
state:
description: The state of the partial refund.
type: string
enum:
- STATE_UNSPECIFIED
- PENDING
- PROCESSED_SUCCESSFULLY
type: object
LineItem:
type: object
description: Details of a line item.
properties:
paidAppDetails:
$ref: '#/components/schemas/PaidAppDetails'
description: Details of a paid app purchase.
subscriptionDetails:
$ref: '#/components/schemas/SubscriptionDetails'
description: Details of a subscription purchase.
productTitle:
description: 'Developer-specified name of the product. Displayed in buyer''s locale. Example: coins, monthly subscription, etc.'
type: string
listingPrice:
$ref: '#/components/schemas/Money'
description: Item's listed price on Play Store, this may or may not include tax. Excludes Google-funded discounts only.
productId:
description: The purchased product ID or in-app SKU (for example, 'monthly001' or 'com.some.thing.inapp1').
type: string
oneTimePurchaseDetails:
$ref: '#/components/schemas/OneTimePurchaseDetails'
description: Details of a one-time purchase.
tax:
$ref: '#/components/schemas/Money'
description: The tax paid for this line item.
total:
$ref: '#/components/schemas/Money'
description: The total amount paid by the user for this line item, taking into account discounts and tax.
RefundDetails:
properties:
tax:
$ref: '#/components/schemas/Money'
description: The amount of tax refunded.
total:
$ref: '#/components/schemas/Money'
description: The total amount refunded, including tax.
type: object
description: Details for a partial or full refund.
OneTimePurchaseDetails:
type: object
properties:
quantity:
type: integer
format: int32
description: The number of items purchased (for multi-quantity item purchases).
rentalDetails:
$ref: '#/components/schemas/RentalDetails'
description: The details of a rent purchase. Only set if it is a rent purchase.
offerId:
type: string
description: The offer ID of the one-time purchase offer.
purchaseOptionId:
type: string
description: ID of the purchase option. This field is set for both purchase options and variant offers. For purchase options, this ID identifies the purchase option itself. For variant offers, this ID refers to the associated purchase option, and in conjunction with offer_id it identifies the variant offer.
preorderDetails:
$ref: '#/components/schemas/PreorderDetails'
description: The details of a pre-order purchase. Only set if it is a pre-order purchase. Note that this field will be set even after pre-order is fulfilled.
description: Details of a one-time purchase.
Money:
description: Represents an amount of money with its currency type.
type: object
properties:
nanos:
format: int32
type: integer
description: Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
currencyCode:
description: The three-letter currency code defined in ISO 4217.
type: string
units:
description: The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
format: int64
type: string
CoarseLocation:
type: object
description: Coarse Geographic location details for where the consumption happened.
properties:
sublocality:
type: string
description: Optional. Sublocality of the address. For example, this can be a neighborhood, borough, or district. For most addresses, you can omit this.
locality:
type: string
description: 'Optional. Generally refers to the city or town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave `locality` empty.'
regionCode:
type: string
description: 'Required. [CLDR region code](https://cldr.unicode.org/) of the country/region of the address. This value is never inferred and you must ensure the value is correct. Example: "CH" for Switzerland.'
administrativeArea:
description: Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. For Spain, this is the province and not the autonomous community (for example, "Barcelona" and not "Catalonia"). Many countries don't use an administrative area in postal addresses. For example, in Switzerland, this should be left unpopulated.
type: string
CancellationEvent:
description: Details of when the order was canceled.
properties:
eventTime:
description: The time when the order was canceled.
format: google-datetime
type: string
type: object
BuyerAddress:
properties:
buyerPostcode:
description: Postal code of an address. When Google is the Merchant of Record for the order, this information is not included.
type: string
buyerCountry:
description: Two letter country code based on ISO-3166-1 Alpha-2 (UN country codes).
type: string
buyerState:
type: string
description: Top-level administrative subdivision of the buyer address country. When Google is the Merchant of Record for the order, this information is not included.
type: object
description: Address information for the customer, for use in tax computation.
OrdersReviewRefundRequest:
description: Request for the orders.reviewrefund API.
type: object
properties:
refundPreference:
type: string
enum:
- REFUND_PREFERENCE_UNSPECIFIED
- DECLINE
- APPROVE
- NEUTRAL
description: Required. Indicates your preference, based on your operational logic, as to whether the Play Store should grant the refund.
pendingRefundToken:
description: Required. The pending refund token included in the pending refund review notification.
type: string
consumptionPercentageMilliunits:
format: int32
type: integer
description: 'Optional. Percentage of the In-App purchase the customer consumed, in milliunits. Minimum: 0 Maximum: 100,000. For paid apps, this can be omitted. Example : 45200 represents 45.2%.'
consumptionUsageEvents:
items:
$ref: '#/components/schemas/ConsumptionUsageEvent'
description: Optional. List of events, each representing an instance where the user consumed or used the purchased item or service. Lists with over 1000 items will be rejected.
type: array
sampleContentProvided:
description: Required. Indicates whether you provided a free sample, trial, or information about the functionality prior to the purchase.
type: boolean
OfferPhaseDetails:
type: object
properties:
introductoryPriceDetails:
$ref: '#/components/schemas/IntroductoryPriceDetails'
description: The order funds an introductory pricing period.
freeTrialDetails:
$ref: '#/components/schemas/FreeTrialDetails'
description: The order funds a free trial period.
baseDetails:
$ref: '#/components/schemas/BaseDetails'
description: The order funds a base price period.
prorationPeriodDetails:
$ref: '#/components/schemas/ProrationPeriodDetails'
description: The order funds a proration period.
description: Details of a pricing phase for the entitlement period funded by this order.
BatchGetOrdersResponse:
type: object
properties:
orders:
items:
$ref: '#/components/schemas/Order'
description: Details for the requested order IDs.
type: array
description: Response for the orders.batchGet API.
BaseDetails:
type: object
properties: {}
description: Details of a base price pricing phase.
IntroductoryPriceDetails:
properties: {}
type: object
description: Details of an introductory price pricing phase.
Order:
type: object
properties:
orderHistory:
$ref: '#/components/schemas/OrderHistory'
description: Details about events which modified the order.
lastEventTime:
type: string
format: google-datetime
description: The time of the last event that occurred on the order.
developerRevenueInBuyerCurrency:
$ref: '#/components/schemas/Money'
description: Your revenue for this order in the buyer's currency, including deductions of partial refunds, taxes and fees. Google deducts standard transaction and third party fees from each sale, including VAT in some regions.
lineItems:
items:
$ref: '#/components/schemas/LineItem'
type: array
description: The individual line items making up this order.
orderDetails:
$ref: '#/components/schemas/OrderDetails'
description: Detailed information about the order at creation time.
tax:
$ref: '#/components/schemas/Money'
description: The total tax paid as a part of this order.
total:
$ref: '#/components/schemas/Money'
description: The final amount paid by the customer, taking into account discounts and taxes.
createTime:
type: string
format: google-datetime
description: The time when the order was created.
buyerAddress:
$ref: '#/components/schemas/BuyerAddress'
description: Address information for the customer, for use in tax computation. When Google is the Merchant of Record for the order, only country is shown.
pointsDetails:
$ref: '#/components/schemas/PointsDetails'
description: Play points applied to the order, including offer information, discount rate and point values.
salesChannel:
type: string
enum:
- SALES_CHANNEL_UNSPECIFIED
- IN_APP
- PC_EMULATOR
- NATIVE_PC
- PLAY_STORE
- OUTSIDE_PLAY_STORE
description: The originating sales channel of the order.
orderId:
description: The order ID.
type: string
state:
description: The state of the order.
type: string
enum:
- STATE_UNSPECIFIED
- PENDING
- PROCESSED
- CANCELED
- PENDING_REFUND
- PARTIALLY_REFUNDED
- REFUNDED
purchaseToken:
description: The token provided to the user's device when the subscription or item was purchased.
type: string
description: 'The Order resource encapsulates comprehensive information about a transaction made on Google Play. It includes a variety of attributes that provide details about the order itself, the products purchased, and the history of events related to the order. The Orders APIs provide real-time access to your order data within the Google Play ecosystem. You can retrieve detailed information and metadata for both one-time and recurring orders, including transaction details like charges, taxes, and refunds, as well as metadata such as pricing phases for subscriptions. The Orders APIs let you automate tasks related to order management, reducing the need for manual checks via the Play Developer Console. The following are some of the use cases for this API: + Real-time order data retrieval - Get order details and metadata immediately after a purchase using an order ID. + Order update synchronization - Periodically sync order updates to maintain an up-to-date record of order information. Note: + The Orders API calls count towards your Play Developer API quota, which defaults to 200K daily, and may be insufficient to sync extensive order histories. + A maximum of 1000 orders can be retrieved per call. Using larger page sizes is recommended to minimize quota usage. Check your quota in the Cloud Console and request more if required.'
ProcessedEvent:
description: Details of when the order was processed.
type: object
properties:
eventTime:
description: The time when the order was processed.
format: google-datetime
type: string
FreeTrialDetails:
properties: {}
description: Details of a free trial pricing phase.
type: object
PaidAppDetails:
properties: {}
type: object
description: Details of a paid app purchase.
OrderHistory:
properties:
cancellationEvent:
$ref: '#/components/schemas/CancellationEvent'
description: Details of when the order was canceled.
refundEvent:
$ref: '#/components/schemas/RefundEvent'
description: Details of when the order was fully refunded.
processedEvent:
$ref: '#/components/schemas/ProcessedEvent'
description: Details of when the order was processed.
partialRefundEvents:
description: Details of the partial refund events for this order.
items:
$ref: '#/components/schemas/PartialRefundEvent'
type: array
type: object
description: Details about events which modified the order.
securitySchemes:
apiKey:
type: apiKey
in: query
name: key
description: API key; accepted by methods that do not need user data.
oauth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://accounts.google.com/o/oauth2/auth
tokenUrl: https://oauth2.googleapis.com/token
scopes:
https://www.googleapis.com/auth/androidpublisher: View and manage your Google Play Developer account
externalDocs:
url: https://developers.google.com/android-publisher
x-provenance:
method: harvested
publisher: Google
source: https://androidpublisher.googleapis.com/$discovery/rest?version=v3
note: converted by discovery-to-openapi.py from Google's Discovery document (revision 20261111)