- Resource: ExternalTransaction
- ExternalTransactionTestPurchase
- OneTimeExternalTransaction
- RecurringExternalTransaction
- ExternalTransactionProgram
- ExternalSubscription
- SubscriptionType
- OtherRecurringProduct
- TransactionState
- ExternalTransactionAddress
- Methods
Resource: ExternalTransaction
The details of an external transaction.
JSON representation |
---|
{ "packageName": string, "externalTransactionId": string, "originalPreTaxAmount": { object ( |
Fields | |
---|---|
package |
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'). |
external |
Output only. The id of this transaction. All transaction ids under the same package name must be unique. Set when creating the external transaction. |
original |
Required. The original transaction amount before taxes. This represents the pre-tax amount originally notified to Google before any refunds were applied. |
original |
Required. The original tax amount. This represents the tax amount originally notified to Google before any refunds were applied. |
current |
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. |
current |
Output only. The current tax amount. This represents the current tax amount including any refunds that may have been applied to this transaction. |
test |
Output only. If set, this transaction was a test purchase. Google will not charge for a test transaction. |
transaction |
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: |
create |
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: |
transaction |
Output only. The current state of the transaction. |
user |
Required. User address for tax computation. |
transaction |
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. |
Union field transaction_type . The type of transaction that was performed. transaction_type can be only one of the following: |
|
one |
This is a one-time transaction and not part of a subscription. |
recurring |
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 | |
---|---|
external |
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
|
|
initial |
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. |
external |
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. |
migrated |
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: |
|
external |
Details of an external subscription. |
other |
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 | |
---|---|
subscription |
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 | |
---|---|
region |
Required. Two letter region code based on ISO-3166-1 Alpha-2 (UN region codes). |
administrative |
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". |
Methods |
|
---|---|
|
Creates a new external transaction. |
|
Gets an existing external transaction. |
|
Refunds or partially refunds an existing external transaction. |