- Resource: ExternalTransaction
- ExternalTransactionTestPurchase
- OneTimeExternalTransaction
- RecurringExternalTransaction
- ExternalTransactionProgram
- ExternalSubscription
- SubscriptionType
- OtherRecurringProduct
- TransactionState
- ExternalTransactionAddress
- ExternalOfferInitialAcquisitionDetails
- Methods
Resource: ExternalTransaction
The details of an external transaction.
JSON representation |
---|
{ "packageName": string, "externalTransactionId": string, "originalPreTaxAmount": { object ( |
Fields | |
---|---|
packageName |
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'). |
externalTransactionId |
Output only. The id of this transaction. All transaction ids under the same package name must be unique. Set when creating the external transaction. |
originalPreTaxAmount |
Required. The original transaction amount before taxes. This represents the pre-tax amount originally notified to Google before any refunds were applied. |
originalTaxAmount |
Required. The original tax amount. This represents the tax amount originally notified to Google before any refunds were applied. |
currentPreTaxAmount |
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. |
currentTaxAmount |
Output only. The current tax amount. This represents the current tax amount including any refunds that may have been applied to this transaction. |
testPurchase |
Output only. If set, this transaction was a test purchase. Google will not charge for a test transaction. |
transactionTime |
Required. The time when the transaction was completed. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
createTime |
Output only. The time when this transaction was created. This is the time when Google was notified of the transaction. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
transactionState |
Output only. The current state of the transaction. |
userTaxAddress |
Required. User address for tax computation. |
transactionProgramCode |
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. |
externalOfferInitialAcquisitionDetails |
Optional. Details about the first time a user/device completed a transaction using external offers. Not required for transactions made using user choice billing or alternative billing only. |
Union field transaction_type . The type of transaction that was performed. transaction_type can be only one of the following: |
|
oneTimeTransaction |
This is a one-time transaction and not part of a subscription. |
recurringTransaction |
This transaction is part of a recurring series of transactions. |
ExternalTransactionTestPurchase
This type has no fields.
Represents a transaction performed using a test account. These transactions will not be charged by Google.
OneTimeExternalTransaction
Represents a one-time transaction.
JSON representation |
---|
{ "externalTransactionToken": string } |
Fields | |
---|---|
externalTransactionToken |
Input only. Provided during the call to Create. Retrieved from the client when the alternative billing flow is launched. |
RecurringExternalTransaction
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).
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
initialExternalTransactionId |
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. |
externalTransactionToken |
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 |
Input only. Provided during the call to Create. Must only be used when migrating a subscription from manual monthly reporting to automated reporting. |
Union field product_details . Required. Details of the product in the recurring external transaction. product_details can be only one of the following: |
|
externalSubscription |
Details of an external subscription. |
otherRecurringProduct |
Details of a recurring external transaction product which doesn't belong to any other specific category. |
ExternalTransactionProgram
Represents the external transaction program experienced by the user to complete the transaction.
Enums | |
---|---|
EXTERNAL_TRANSACTION_PROGRAM_UNSPECIFIED |
Unspecified transaction program. Not used. |
USER_CHOICE_BILLING |
User choice billing, where a user may choose between Google Play Billing developer-managed billing. |
ALTERNATIVE_BILLING_ONLY |
Alternative billing only, where users may only use developer-manager billing. |
ExternalSubscription
Details of an external subscription.
JSON representation |
---|
{
"subscriptionType": enum ( |
Fields | |
---|---|
subscriptionType |
Required. The type of the external subscription. |
SubscriptionType
The types of an external subscription.
Enums | |
---|---|
SUBSCRIPTION_TYPE_UNSPECIFIED |
Unspecified, do not use. |
RECURRING |
This is a recurring subscription where the user is charged every billing cycle. |
PREPAID |
This is a prepaid subscription where the user pays up front. |
OtherRecurringProduct
This type has no fields.
Details of a recurring external transaction product which doesn't belong to any other more specific category.
TransactionState
The state of a transaction being made.
Enums | |
---|---|
TRANSACTION_STATE_UNSPECIFIED |
Unspecified transaction state. Not used. |
TRANSACTION_REPORTED |
The transaction has been successfully reported to Google. |
TRANSACTION_CANCELED |
The transaction has been fully refunded. |
ExternalTransactionAddress
User's address for the external transaction.
JSON representation |
---|
{ "regionCode": string, "administrativeArea": string } |
Fields | |
---|---|
regionCode |
Required. Two letter region code based on ISO-3166-1 Alpha-2 (UN region codes). |
administrativeArea |
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". |
ExternalOfferInitialAcquisitionDetails
Details about the first time a user/device completed a transaction using external offers.
JSON representation |
---|
{ "externalTransactionId": string } |
Fields | |
---|---|
externalTransactionId |
Required. The external transaction id of the first completed purchase made by the user. |
Methods |
|
---|---|
|
Creates a new external transaction. |
|
Gets an existing external transaction. |
|
Refunds or partially refunds an existing external transaction. |