Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelistoverlay
POST/androidpublisher/v3/applications/{applicationsId}/externalTransactionsRecord an external transaction · Createexternaltransaction externaltransactions#
Ask an LLM
“How do I record a purchase made outside the Google Play billing flow?”
“Can I set a tax amount and original price when creating an external transaction?”
Tell an agent
Create external transaction {externalTransactionId} for app {applicationsId} at {transactionTime}.
Record external transaction {externalTransactionId} for {applicationsId} with pre-tax amount {currentPreTaxAmount}.
POST/androidpublisher/v3/applications/{applicationsId}/externalTransactions/{externalTransactionsId}:refundRefund an external transaction · Refundexternaltransaction externaltransactions#
Ask an LLM
“How do I refund a purchase made outside the Play billing flow?”
“Can I issue a partial refund of an external transaction?”
Tell an agentdestructive · confirm first
Refund external transaction {externalTransactionsId} on app {applicationsId} at {refundTime}.
Issue a partial refund of {partialRefund} on external transaction {externalTransactionsId} for {applicationsId}.
GET/androidpublisher/v3/applications/{applicationsId}/externalTransactions/{externalTransactionsId}Get an external transaction · Getexternaltransaction externaltransactions#
Ask an LLM
“What are the details of an external transaction I recorded?”
“Can I look up one external transaction by its ID?”
Tell an agent
Get external transaction {externalTransactionsId} for app {applicationsId}.
Show the details of external transaction {externalTransactionsId} on {applicationsId}.
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Google Play Android Developer Externaltransactions API
version: v3
description: Generated from Google's published Discovery document for Google Play Android Developer API (androidpublisher v3, revision 20261111). 3 operation(s).
contact:
name: Google
url: https://developers.google.com/
termsOfService: https://developers.google.com/terms
servers:
- url: https://androidpublisher.googleapis.com
tags:
- name: Externaltransactions
paths:
/androidpublisher/v3/applications/{applicationsId}/externalTransactions:
post:
operationId: androidpublisher.externaltransactions.createexternaltransaction
summary: Createexternaltransaction externaltransactions
description: Creates a new external transaction.
parameters:
- name: applicationsId
in: path
required: true
description: Resource name segment (applicationsId).
schema:
type: string
- name: externalTransactionId
in: query
required: false
description: Required. The id to use for the external transaction. Must be unique across all other transactions for the app. This value should be 1-63 characters and valid characters are /a-zA-Z0-9_-/. Do not use this field to store any Personally Identifiable Information (PII) such as emails. Attempting to store PII in this field may result in requests being blocked.
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalTransaction'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalTransaction'
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:
- Externaltransactions
/androidpublisher/v3/applications/{applicationsId}/externalTransactions/{externalTransactionsId}:refund:
post:
operationId: androidpublisher.externaltransactions.refundexternaltransaction
summary: Refundexternaltransaction externaltransactions
description: Refunds or partially refunds an existing external transaction.
parameters:
- name: applicationsId
in: path
required: true
description: Resource name segment (applicationsId).
schema:
type: string
- name: externalTransactionsId
in: path
required: true
description: Resource name segment (externalTransactionsId).
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RefundExternalTransactionRequest'
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalTransaction'
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:
- Externaltransactions
/androidpublisher/v3/applications/{applicationsId}/externalTransactions/{externalTransactionsId}:
get:
operationId: androidpublisher.externaltransactions.getexternaltransaction
summary: Getexternaltransaction externaltransactions
description: Gets an existing external transaction.
parameters:
- name: applicationsId
in: path
required: true
description: Resource name segment (applicationsId).
schema:
type: string
- name: externalTransactionsId
in: path
required: true
description: Resource name segment (externalTransactionsId).
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/ExternalTransaction'
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:
- Externaltransactions
components:
schemas:
RecurringExternalTransaction:
type: object
properties:
externalTransactionToken:
type: string
description: Input only. Provided during the call to Create. Retrieved from the client when the alternative billing flow is launched. Required only for the initial purchase.
migratedTransactionProgram:
description: Input only. Provided during the call to Create. Must only be used when migrating a subscription from manual monthly reporting to automated reporting.
type: string
enum:
- EXTERNAL_TRANSACTION_PROGRAM_UNSPECIFIED
- USER_CHOICE_BILLING
- ALTERNATIVE_BILLING_ONLY
externalSubscription:
$ref: '#/components/schemas/ExternalSubscription'
description: Details of an external subscription.
initialExternalTransactionId:
description: The external transaction id of the first transaction of this recurring series of transactions. For example, for a subscription this would be the transaction id of the first payment. Required when creating recurring external transactions.
type: string
otherRecurringProduct:
$ref: '#/components/schemas/OtherRecurringProduct'
description: Details of a recurring external transaction product which doesn't belong to any other specific category.
description: Represents a transaction that is part of a recurring series of payments. This can be a subscription or a one-time product with multiple payments (such as preorder).
PartialRefund:
description: A partial refund of a transaction.
properties:
refundId:
type: string
description: Required. A unique id distinguishing this partial refund. If the refund is successful, subsequent refunds with the same id will fail. Must be unique across refunds for one individual transaction.
refundPreTaxAmount:
$ref: '#/components/schemas/Price'
description: Required. The pre-tax amount of the partial refund. Should be less than the remaining pre-tax amount of the transaction.
type: object
ExternalTransaction:
description: The details of an external transaction.
properties:
currentPreTaxAmount:
$ref: '#/components/schemas/Price'
description: Output only. The current transaction amount before tax. This represents the current pre-tax amount including any refunds that may have been applied to this transaction.
transactionState:
description: Output only. The current state of the transaction.
type: string
enum:
- TRANSACTION_STATE_UNSPECIFIED
- TRANSACTION_REPORTED
- TRANSACTION_CANCELED
readOnly: true
originalTaxAmount:
$ref: '#/components/schemas/Price'
description: Required. The original tax amount. This represents the tax amount originally notified to Google before any refunds were applied.
packageName:
readOnly: true
type: string
description: Output only. The resource name of the external transaction. The package name of the application the inapp products were sold (for example, 'com.some.app').
oneTimeTransaction:
$ref: '#/components/schemas/OneTimeExternalTransaction'
description: This is a one-time transaction and not part of a subscription.
externalTransactionId:
description: Output only. The id of this transaction. All transaction ids under the same package name must be unique. Set when creating the external transaction.
type: string
readOnly: true
createTime:
format: google-datetime
type: string
description: Output only. The time when this transaction was created. This is the time when Google was notified of the transaction.
readOnly: true
externalContentLinkDetails:
$ref: '#/components/schemas/ExternalContentLinkDetails'
description: Optional. Details necessary to accurately report external content link transactions.
currentTaxAmount:
$ref: '#/components/schemas/Price'
description: Output only. The current tax amount. This represents the current tax amount including any refunds that may have been applied to this transaction.
testPurchase:
$ref: '#/components/schemas/ExternalTransactionTestPurchase'
description: Output only. If set, this transaction was a test purchase. Google will not charge for a test transaction.
externalOfferDetails:
$ref: '#/components/schemas/ExternalOfferDetails'
description: Optional. Details necessary to accurately report external offers transactions.
recurringTransaction:
$ref: '#/components/schemas/RecurringExternalTransaction'
description: This transaction is part of a recurring series of transactions.
transactionProgramCode:
type: integer
format: int32
description: 'Optional. The transaction program code, used to help determine service fee for eligible apps participating in partner programs. Developers participating in the Play Media Experience Program (https://play.google.com/console/about/programs/mediaprogram/) must provide the program code when reporting alternative billing transactions. If you are an eligible developer, please contact your BDM for more information on how to set this field. Note: this field can not be used for external offers transactions.'
transactionTime:
description: Required. The time when the transaction was completed.
format: google-datetime
type: string
originalPreTaxAmount:
$ref: '#/components/schemas/Price'
description: Required. The original transaction amount before taxes. This represents the pre-tax amount originally notified to Google before any refunds were applied.
userTaxAddress:
$ref: '#/components/schemas/ExternalTransactionAddress'
description: Required. User address for tax computation.
type: object
OtherRecurringProduct:
properties: {}
type: object
description: Details of a recurring external transaction product which doesn't belong to any other more specific category.
ExternalOfferDetails:
type: object
properties:
installedAppPackage:
description: Optional. The package name of the app downloaded through this transaction. Required when link_type is LINK_TO_APP_DOWNLOAD.
type: string
installedAppCategory:
description: Optional. The category of the downloaded app though this transaction. This must match the category provided in Play Console during the external app verification process. Only required for app downloads.
type: string
enum:
- EXTERNAL_OFFER_APP_CATEGORY_UNSPECIFIED
- APP
- GAME
appDownloadEventExternalTransactionId:
description: Optional. The external transaction id associated with the app download event through an external link. Required when reporting transactions made in externally installed apps.
type: string
linkType:
description: Optional. The type of content being reported by this transaction. Required when reporting app downloads or purchased digital content offers made in app installed through Google Play.
type: string
enum:
- EXTERNAL_OFFER_LINK_TYPE_UNSPECIFIED
- LINK_TO_DIGITAL_CONTENT_OFFER
- LINK_TO_APP_DOWNLOAD
description: Reporting details unique to the external offers program.
FullRefund:
description: A full refund of the remaining amount of a transaction.
type: object
properties: {}
ExternalTransactionTestPurchase:
properties: {}
description: Represents a transaction performed using a test account. These transactions will not be charged by Google.
type: object
OneTimeExternalTransaction:
properties:
externalTransactionToken:
description: Input only. Provided during the call to Create. Retrieved from the client when the alternative billing flow is launched.
type: string
description: Represents a one-time transaction.
type: object
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
RefundExternalTransactionRequest:
description: A request to refund an existing external transaction.
type: object
properties:
fullRefund:
$ref: '#/components/schemas/FullRefund'
description: A full-amount refund.
refundTime:
description: Required. The time that the transaction was refunded.
type: string
format: google-datetime
partialRefund:
$ref: '#/components/schemas/PartialRefund'
description: A partial refund.
ExternalContentLinkDetails:
type: object
description: Reporting details unique to the external content link program.
properties:
installedAppPackage:
description: Optional. The package name of the app downloaded through this transaction. Only required for app installs.
type: string
externalAppCategory:
description: Optional. The category of the downlaoded app. This must match the category provided in Play Console during the external app verification process. Only required for app installs.
type: string
enum:
- EXTERNAL_CONTENT_APP_CATEGORY_UNSPECIFIED
- APP
- GAME
linkType:
description: Required. The type content being reported by this transaction.
type: string
enum:
- EXTERNAL_CONTENT_LINK_TYPE_UNSPECIFIED
- LINK_TO_DIGITAL_CONTENT_OFFER
- LINK_TO_APP_DOWNLOAD
ExternalTransactionAddress:
type: object
properties:
administrativeArea:
description: Optional. Top-level administrative subdivision of the country/region. Only required for transactions in India. Valid values are "ANDAMAN AND NICOBAR ISLANDS", "ANDHRA PRADESH", "ARUNACHAL PRADESH", "ASSAM", "BIHAR", "CHANDIGARH", "CHHATTISGARH", "DADRA AND NAGAR HAVELI", "DADRA AND NAGAR HAVELI AND DAMAN AND DIU", "DAMAN AND DIU", "DELHI", "GOA", "GUJARAT", "HARYANA", "HIMACHAL PRADESH", "JAMMU AND KASHMIR", "JHARKHAND", "KARNATAKA", "KERALA", "LADAKH", "LAKSHADWEEP", "MADHYA PRADESH", "MAHARASHTRA", "MANIPUR", "MEGHALAYA", "MIZORAM", "NAGALAND", "ODISHA", "PUDUCHERRY", "PUNJAB", "RAJASTHAN", "SIKKIM", "TAMIL NADU", "TELANGANA", "TRIPURA", "UTTAR PRADESH", "UTTARAKHAND", and "WEST BENGAL".
type: string
regionCode:
type: string
description: Required. Two letter region code based on ISO-3166-1 Alpha-2 (UN region codes).
description: User's address for the external transaction.
Price:
properties:
currency:
description: 3 letter Currency code, as defined by ISO 4217. See java/com/google/common/money/CurrencyCode.java
type: string
priceMicros:
type: string
description: Price in 1/million of the currency base unit, represented as a string.
description: Definition of a price, i.e. currency and units.
type: object
ExternalSubscription:
description: Details of an external subscription.
properties:
subscriptionType:
type: string
enum:
- SUBSCRIPTION_TYPE_UNSPECIFIED
- RECURRING
- PREPAID
description: Required. The type of the external subscription.
type: object
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)