- Resource: ExternalTransaction
- ExternalTransactionTestPurchase
- OneTimeExternalTransaction
- RecurringExternalTransaction
- ExternalSubscription
- SubscriptionType
- TransactionState
- ExternalTransactionAddress
- 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. |
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. |
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. |
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. |
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 } |
Fields | |
---|---|
regionCode |
Required. Two letter region code based on ISO-3166-1 Alpha-2 (UN region codes). |
Methods |
|
---|---|
|
Creates a new external transaction. |
|
Gets an existing external transaction. |
|
Refunds or partially refunds an existing external transaction. |