The Google Play Developer API includes additional functionality to report transactions from billing and link programs. This guide describes how to report transactions from these billing programs.
There are a few components that might be necessary to handle external transactions from your backend. To build them, you need to set up your backend integration as indicated in Configure the Google Play Developer API. To build developer backend functionality that is not specific to billing and link programs, see Google Play's billing system.
Glossary of terms
Term conventions followed by this guide:
- Billing and link programs: Programs which facilitate digital content purchases or app downloads outside of Google Play. This includes the alternative billing and external offers programs.
- External transaction APIs: APIs used to report transactions for eligible billing and link programs.
- External transaction: A qualifying transaction that occurs outside of the app as defined by the program requirements. This includes digital content purchases and app downloads.
- External transaction token: A token provided through the Play Billing Library for you to use when the user completes an external transaction. This token is used to notify Google Play of a successful external transaction.
- External transaction ID: A unique identifier generated by you to identify an external transaction.
Report new external transactions to Google Play
Integrate with the externaltransactions API to report
transactions happening outside Google Play's billing system in supported
countries, including $0 transactions resulting from free trial purchases and
app installs. You should only start and report transactions on billing and link
programs for eligible user countries as permitted under the
alternative billing or external offers
guidelines; otherwise, the API call is rejected. This applies to all
transactions, including new purchases, renewals, top-ups, upgrades, downgrades,
and app downloads.
External transaction reporting
You should call the externaltransactions API to report an external transaction
after a payment has been authorized through a billing and link program.
This applies to all transactions, including initial charges, renewals, refunds,
and others. See the guidelines for the respective billing and link program for
reporting requirements.
Each external transaction is reported with an external transaction ID. For recurring purchases (such as auto-renewable subscriptions), you need to send the external transaction ID associated with the first transaction in the recurring purchase as a parameter for any subsequent transactions, including refunds. This records the series of transactions for that purchase. You should send a new external transaction ID for purchases when the product changes (such as an upgrade or a downgrade), or if the recurring transaction is canceled or expired and the same product is bought again later. You must not include any personally identifiable information, proprietary, or confidential information as part of this external transaction ID.
Report an initial transaction
Every time a new purchase or app download is successful in billing and link
programs, you must call the externaltransactions API.
The externalTransactionToken received by the app through the
UserChoiceBillingListener, AlternativeBillingOnlyReportingDetailsListener,
or BillingProgramReportingDetailsListener callbacks is required as part
of the request body for app downloads, one-time purchases, and first-time
transactions in a recurring purchase (such as a subscription). This is called an
initial transaction. After the initial transaction, report subsequent
transactions (such as subscription renewals) by providing a new unique
externalTransactionId. See Report subsequent transactions for a purchase
for more details on how to report subsequent transactions.
Example:
- A developer configures and enables alternative billing in their app.
- User 1 is in South Korea, a supported country, and is attempting to buy
product1, for 12634.10KRW per month, with a one month free trial offer. - The app launches the purchase flow with the
ProductDetailsforproduct1and the offer that the user selected. - User 1 selects the developer's alternative billing system.
- The
UserChoiceBillingListenerreceives the valuemy_tokenas theexternalTransactionToken. - The developer then sends the pertinent information to their backend
(
externalTransactionTokenvalue and products being purchased). Then, they launch the purchase flow forproduct1in the alternative billing system. This transaction is assigned a unique transaction ID on the developer side that is used to report it to Google Play: 123-456-789. The transaction ID is required, even though the user is receiving a free trial. - After the transaction for the purchase occurs in the alternative billing system, the developer reports the transaction to Google Play with the following request. It is reported as a zero-dollar transaction initially because the user gets a free month.
POST /androidpublisher/v3/applications/com.myapp.android/externalTransactions?externalTransactionId=123-456-789
Body
{
"originalPreTaxAmount" : {
"priceMicros": "0",
"currency": "KRW"
},
"originalTaxAmount" : {
"priceMicros": "0",
"currency": "KRW"
},
"transactionTime" : "2022-02-22T12:45:00Z",
"recurringTransaction" : {
"externalTransactionToken": "my_token",
"externalSubscription" {
"subscriptionType": "RECURRING"
}
},
"userTaxAddress" : {
"regionCode": "KR"
}
}
When reporting an initial transaction, be aware of the following:
subscriptionTypecan beRECURRING(for auto-renewing subscriptions) orPREPAID(for prepaid subscriptions).OtherRecurringProductmust be used to represent one-time purchases that require multiple payments or a delayed payment. For example, a pre-order might have an initial $0 transaction followed by a second transaction at a later date for the price of the SKU when the pre-order is fulfilled. See Report subsequent transactions for a purchase for more details on reporting subsequent transactions.- You must provide
ExternalOfferDetailswhen reporting initial external offer transactions. This is not required for subsequent transactions.
If you're transacting with a user in India where the tax depends on their
administrative area (such as a state or province), include that area under
userTaxAddress. Refer to the predefined list of
strings in the API reference guide for applicable administrative areas.
POST /androidpublisher/v3/applications/com.myapp.android/externalTransactions?externalTransactionId=123-456-789
Body
{
"originalPreTaxAmount" : {
"priceMicros": "0",
"currency": "INR"
},
"originalTaxAmount" : {
"priceMicros": "0",
"currency": "INR"
},
"transactionTime" : "2023-11-01T12:45:00Z",
"recurringTransaction" : {
"externalTransactionToken": "my_token",
"externalSubscription" {
"subscriptionType": "RECURRING"
}
},
"userTaxAddress" : {
# Tax varies in India based on state, so include that information in
# administrativeArea
"regionCode": "IN"
"administrativeArea": "KERALA"
}
}
External offers
If the transaction being reported is under the external offers program, you
must set the externalOfferDetails field if the transaction is a one-time
transaction or the first transaction of a recurring series:
- When reporting app download transactions, set
linkTypetoLINK_TO_APP_DOWNLOADand provide the appropriate values forinstalledAppPackageandinstalledAppCategory. See Report an app download for details. - When reporting digital content offer transactions, set
linkTypetoLINK_TO_DIGITAL_CONTENT. - After an external app is installed through the external offers program, you
must report transactions made in the external app. When reporting these
transactions, link these transactions to the original app download event:
- Provide the
externalTransactionTokenfrom the app download event. - In the
externalOfferDetailsfield, setappDownloadEventExternalTransactionIdto theexternalTransactionIdof the app download event. Other fields inexternalOfferDetailsare not required.
- Provide the
Example request for transaction in an external app downloaded through external offers:
POST /androidpublisher/v3/applications/com.myapp.android/externalTransactions?externalTransactionId=ABC-DEF-GHI
Body
{
"originalPreTaxAmount" : {
"priceMicros": "100000",
"currency": "EUR"
},
"originalTaxAmount" : {
"priceMicros": "10000",
"currency": "EUR"
},
"transactionTime" : "2025-11-22T12:45:00Z",
"oneTimeTransaction" : {
"externalTransactionToken": my_external_transaction_token_for_link_to_download_event"
},
"userTaxAddress" : {
"regionCode": "DE"
},
"externalOfferDetails" : {
"appDownloadEventExternalTransactionId": "my_external_transaction_id_for_link_to_download_event"
}
}
The updated Play service fee details for different transaction types can be found in Changes to the external offers program for users in the European Economic Area (EEA).
Report subsequent transactions for a purchase
In some cases, there is more than one user payment associated with the same
external purchase, for example subscription renewals or prepaid plan top-ups.
You can report these subsequent transactions by using the same API in
Externaltransactions. As described in Report a new purchase, the
externalTransactionToken isn't necessary for subsequent transactions. Instead,
a new unique externalTransactionId is sent as the query parameter for each
renewal or top-up transaction, with the ID of the initial transaction included
in the initialExternalTransactionId field.
Following the previous example:
- User 1's first renewal occurs on the alternative billing system. The initial transaction ID was 123-456-789.
- The developer reports the transaction recurrence in the URL query parameter
as the external transaction ID for this new transaction, while referencing the
external transaction ID of the initial transaction in the
initialExternalTransactionIdfield.
Example request:
POST /androidpublisher/v3/applications/com.myapp.android/externalTransactions?externalTransactionId=abc-def-ghi
Body
{
"originalPreTaxAmount" : {
"priceMicros": "12634000000",
"currency": "KRW"
},
"originalTaxAmount" : {
"priceMicros": "1263000000",
"currency": "KRW"
},
"transactionTime" : "2022-02-22T12:45:00Z",
"recurringTransaction" : {
"initialExternalTransactionId": "123-456-789",
"externalSubscription" {
"subscriptionType": "RECURRING"
}
},
"userTaxAddress" : {
"regionCode": "KR"
}
}
Report an upgrade or downgrade
To report an upgrade or a downgrade when the user owns a subscription in the
alternative billing system you use the same endpoint and function in the
Externaltransactions API, sending the externalTransactionToken that was
provided to the app for the upgrade or downgrade transaction. This works
similarly to reporting a new purchase.
Report an app download
To report an app install in the external offers billing system, you must
call Externaltransactions.createexternaltransaction, sending the
externalTransactionToken that was provided to the app. Report this as a
zero-cost, one-time transaction; this process is similar to reporting an
initial transaction. Be sure to include ExternalOfferDetails in
the request body.
Example request:
POST /androidpublisher/v3/applications/com.myapp.android/externalTransactions?externalTransactionId=123-456-789
Body
{
"originalPreTaxAmount" : {
"priceMicros": "0",
"currency": "USD"
},
"originalTaxAmount" : {
"priceMicros": "0",
"currency": "USD"
},
"transactionTime" : "2025-12-22T12:45:00Z",
"oneTimeTransaction" : {
"externalTransactionToken": "my_token",
},
"userTaxAddress" : {
"regionCode": "US"
}
"externalOfferDetails" : {
"linkType" : "LINK_TO_APP_DOWNLOAD",
"installedAppPackage" : "my.external.app",
"installedAppCategory" : "APP"
}
}
Migrate from manual reporting of alternative billing transactions
To migrate active subscriptions that started while you were offering alternative
billing without automated reporting, create a new zero-cost transaction using
the migratedTransactionProgram field instead of specifying an
initialExternalTransactionId or externalTransactionToken. Set the
transactionTime to the time when the user initially signed up for each active
subscription. Afterwards, report each subsequent transaction for these
subscriptions as normal through the APIs, providing the
initialExternalTransactionId used earlier to create the renewal transactions.
Once the subscription is migrated, you will no longer need to manually report
the subsequent transactions for the subscription, provided they are being
reported through the automated methods described in this page.
While migrating subscriptions, be mindful of the quota limits in place to verify the migration does not cause a quota outage. If many subscriptions need to be migrated, spread them out across multiple days or request for an increase in quota.
The migratedTransactionProgram field can only be used when migrating from
manual reporting. It will be deprecated when manual reporting is no longer
supported.
Example request:
# Note that the externalTransactionId specified here will used to report
# subsequent transactions.
POST /androidpublisher/v3/applications/com.myapp.android/externalTransactions?externalTransactionId=abc-def-ghi
Body
{
# Be sure to set the price to 0 for this transaction since it does not reflect
# an actual subscription renewal.
"originalPreTaxAmount" : {
"priceMicros": "0",
"currency": "KRW"
},
"originalTaxAmount" : {
"priceMicros": "0",
"currency": "KRW"
},
# The transaction time should be set to when the user signed up for this
# subscription.
"transactionTime" : "2022-02-22T12:45:00Z",
"recurringTransaction" : {
"migratedTransactionProgram": "USER_CHOICE_BILLING",
"externalSubscription" {
"subscriptionType": "RECURRING"
}
},
"userTaxAddress" : {
"regionCode": "KR"
}
}
Requirements for Play partner programs
Developers participating in partner programs such as the Play Media Experience
Program must provide the
transaction_program_code when reporting external
transactions. If you are an eligible developer, contact your Business
Development Manager for more information on how to set this field.
Report purchase refunds to Google Play
Integrate with the externaltransactions API to report transactions refunded to
users outside Google Play's billing system. For Play to correctly identify which
transaction has been refunded, you should include the corresponding
externalTransactionId for the previously reported transaction as part of the
URL parameters.
When reporting refunds of subscription purchases, reference the
externalTransactionId of the specific recurrence of the subscription that is
being refunded.
Example: Suppose a subscription has the following transactions:
An initial transaction with external transaction ID ABC.1234-5678-9012-34567
The first recurring transaction with external transaction ID ABC.1234-5678-9012-34567..0
The second recurring transaction with external transaction ID ABC.1234-5678-9012-34567..1
To report a refund of all transactions for the subscription, you need to make three separate refund requests: one for the initial transaction and two for the subsequent transactions.
This method accepts both full refunds (where the amount is the same amount that the user paid in the original external transaction) and partial refunds (where the amount is smaller than what the user paid in the original external transaction). For partial refunds, you need to specify the pre-tax amount that was refunded.
API quotas
The Externaltransactions API is subject to API quotas for
all calls, just like any other endpoint in the Google Play Developer API.
Additionally, the Externaltransactions API has a 1,200 Queries Per Minute
(QPM) limit on calls to Externaltransactions.createexternaltransaction or
Externaltransactions.refundexternaltransaction. Calls to
Externaltransactions.getexternaltransaction don't count toward this 1,200 QPM
limit.