Creates a new external transaction.
Scopes
You will need authorization for the https://www.googleapis.com/auth/androidpublisher scope to make a valid call.
If unset, the scope for this method defaults to https://www.googleapis.com/auth/androidpublisher.
You can set the scope for this method like this: androidpublisher3 --scope <scope> externaltransactions createexternaltransaction ...
Required Scalar Argument
- <parent> (string)
- Required. The parent resource where this external transaction will be created. Format: applications/{package_name}
Required Request Value
The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.
For example, a structure like this:
ExternalTransaction:
create-time: string
current-pre-tax-amount:
currency: string
price-micros: string
current-tax-amount:
currency: string
price-micros: string
external-transaction-id: string
one-time-transaction:
external-transaction-token: string
original-pre-tax-amount:
currency: string
price-micros: string
original-tax-amount:
currency: string
price-micros: string
package-name: string
recurring-transaction:
external-subscription:
subscription-type: string
external-transaction-token: string
initial-external-transaction-id: string
migrated-transaction-program: string
transaction-state: string
transaction-time: string
user-tax-address:
administrative-area: string
region-code: string
can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.
-r . create-time=et
- Output only. The time when this transaction was created. This is the time when Google was notified of the transaction.
current-pre-tax-amount currency=sadipscing
- 3 letter Currency code, as defined by ISO 4217. See java/com/google/common/money/CurrencyCode.java
-
price-micros=stet
- Price in 1/million of the currency base unit, represented as a string.
-
..current-tax-amount currency=dolor
- 3 letter Currency code, as defined by ISO 4217. See java/com/google/common/money/CurrencyCode.java
-
price-micros=duo
- Price in 1/million of the currency base unit, represented as a string.
-
.. external-transaction-id=vero
- Output only. The id of this transaction. All transaction ids under the same package name must be unique. Set when creating the external transaction.
-
one-time-transaction external-transaction-token=vero
- Input only. Provided during the call to Create. Retrieved from the client when the alternative billing flow is launched.
-
..original-pre-tax-amount currency=invidunt
- 3 letter Currency code, as defined by ISO 4217. See java/com/google/common/money/CurrencyCode.java
-
price-micros=stet
- Price in 1/million of the currency base unit, represented as a string.
-
..original-tax-amount currency=vero
- 3 letter Currency code, as defined by ISO 4217. See java/com/google/common/money/CurrencyCode.java
-
price-micros=elitr
- Price in 1/million of the currency base unit, represented as a string.
-
.. package-name=lorem
- 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').
-
recurring-transaction.external-subscription subscription-type=diam
- Required. The type of the external subscription.
-
.. external-transaction-token=no
- 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.
initial-external-transaction-id=ipsum
- 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.
-
migrated-transaction-program=accusam
- Input only. Provided during the call to Create. Must only be used when migrating a subscription from manual monthly reporting to automated reporting.
-
.. transaction-state=takimata
- Output only. The current state of the transaction.
transaction-time=consetetur
- Required. The time when the transaction was completed.
user-tax-address administrative-area=voluptua.
- 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".
region-code=et
- Required. Two letter region code based on ISO-3166-1 Alpha-2 (UN region codes).
About Cursors
The cursor position is key to comfortably set complex nested structures. The following rules apply:
- The cursor position is always set relative to the current one, unless the field name starts with the
.
character. Fields can be nested such as in-r f.s.o
. - The cursor position is set relative to the top-level structure if it starts with
.
, e.g.-r .s.s
- You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify
-r struct.sub_struct=bar
. - You can move the cursor one level up by using
..
. Each additional.
moves it up one additional level. E.g....
would go three levels up.
Optional Output Flags
The method's return value a JSON encoded structure, which will be written to standard output by default.
- -o out
- out specifies the destination to which to write the server's result to.
It will be a JSON-encoded structure.
The destination may be
-
to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.
- out specifies the destination to which to write the server's result to.
It will be a JSON-encoded structure.
The destination may be
Optional Method Properties
You may set the following properties to further configure the call. Please note that -p
is followed by one
or more key-value-pairs, and is called like this -p k1=v1 k2=v2
even though the listing below repeats the
-p
for completeness.
- -p external-transaction-id=string
- 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-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.
Optional General Properties
The following properties can configure any call, and are not specific to this method.
-
-p $-xgafv=string
- V1 error format.
-
-p access-token=string
- OAuth access token.
-
-p alt=string
- Data format for response.
-
-p callback=string
- JSONP
-
-p fields=string
- Selector specifying which fields to include in a partial response.
-
-p key=string
- API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
-
-p oauth-token=string
- OAuth 2.0 token for the current user.
-
-p pretty-print=boolean
- Returns response with indentations and line breaks.
-
-p quota-user=string
- Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
-
-p upload-type=string
- Legacy upload protocol for media (e.g. "media", "multipart").
-
-p upload-protocol=string
- Upload protocol for media (e.g. "raw", "multipart").