batchget(packageName, orderIds=None, x__xgafv=None)
Get order details for a list of orders.
Close httplib2 connections.
get(packageName, orderId, x__xgafv=None)
Get order details for a single order.
refund(packageName, orderId, revoke=None, x__xgafv=None)
Refunds a user's subscription or in-app purchase order. Orders older than 3 years cannot be refunded.
batchget(packageName, orderIds=None, x__xgafv=None)
Get order details for a list of orders. Args: packageName: string, Required. The package name of the application for which this subscription or in-app item was purchased (for example, 'com.some.thing'). (required) orderIds: string, Required. The list of order IDs to retrieve order details for. There must be between 1 and 1000 (inclusive) order IDs per request. If any order ID is not found or does not match the provided package, the entire request will fail with an error. The order IDs must be distinct. (repeated) x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Response for the orders.batchGet API. "orders": [ # Details for the requested order IDs. { # Details of an order. "buyerAddress": { # Address information for the customer, for use in tax computation. # Address information for the customer, for use in tax computation. When Google is the Merchant of Record for the order, only country is shown. "buyerCountry": "A String", # Two letter country code based on ISO-3166-1 Alpha-2 (UN country codes). "buyerPostcode": "A String", # Postal code of an address. When Google is the Merchant of Record for the order, this information is not included. "buyerState": "A String", # Top-level administrative subdivision of the buyer address country. When Google is the Merchant of Record for the order, this information is not included. }, "createTime": "A String", # The time when the order was created. "developerRevenueInBuyerCurrency": { # Represents an amount of money with its currency type. # Your revenue for this order in the buyer's currency, including deductions of partial refunds, taxes and fees. Google deducts standard transaction and third party fees from each sale, including VAT in some regions. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "lastEventTime": "A String", # The time of the last event that occurred on the order. "lineItems": [ # The individual line items making up this order. { # Details of a line item. "listingPrice": { # Represents an amount of money with its currency type. # Item's listed price on Play Store, this may or may not include tax. Excludes any discounts or promotions. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "oneTimePurchaseDetails": { # Details of a one-time purchase. # Details of a one-time purchase. "offerId": "A String", # The offer ID of the one-time purchase offer. "quantity": 42, # The number of items purchased (for multi-quantity item purchases). }, "paidAppDetails": { # Details of a paid app purchase. # Details of a paid app purchase. }, "productId": "A String", # The purchased product ID or in-app SKU (for example, 'monthly001' or 'com.some.thing.inapp1'). "productTitle": "A String", # Developer-specified name of the product. Displayed in buyer's locale. Example: coins, monthly subscription, etc. "subscriptionDetails": { # Details of a subscription purchase. # Details of a subscription purchase. "basePlanId": "A String", # The base plan ID of the subscription. "offerId": "A String", # The offer ID for the current subscription offer. "offerPhase": "A String", # The pricing phase for the billing period funded by this order. "servicePeriodEndTime": "A String", # The end of the billing period funded by this order. This is a snapshot of the billing/service period end time at the moment the order was processed, and should be used only for accounting. To get the current end time of the subscription service period, use purchases.subscriptionsv2.get. "servicePeriodStartTime": "A String", # The start of the billing period funded by this order. This is a snapshot of the billing/service period start time at the moment the order was processed, and should be used only for accounting. }, "tax": { # Represents an amount of money with its currency type. # The tax paid for this line item. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "total": { # Represents an amount of money with its currency type. # The total amount paid by the user for this line item, taking into account discounts and tax. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, ], "orderDetails": { # Detailed information about the order at creation time. # Detailed information about the order at creation time. "taxInclusive": True or False, # Indicates whether the listed price was tax inclusive or not. }, "orderHistory": { # Details about events which modified the order. # Details about events which modified the order. "cancellationEvent": { # Details of when the order was canceled. # Details of when the order was canceled. "eventTime": "A String", # The time when the order was canceled. }, "partialRefundEvents": [ # Details of the partial refund events for this order. { # Details of the partial refund events for this order. "createTime": "A String", # The time when the partial refund was created. "processTime": "A String", # The time when the partial refund was processed. "refundDetails": { # Details for a partial or full refund. # Details for the partial refund. "tax": { # Represents an amount of money with its currency type. # The amount of tax refunded. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "total": { # Represents an amount of money with its currency type. # The total amount refunded, including tax. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "state": "A String", # The state of the partial refund. }, ], "processedEvent": { # Details of when the order was processed. # Details of when the order was processed. "eventTime": "A String", # The time when the order was processed. }, "refundEvent": { # Details of when the order was fully refunded. # Details of when the order was fully refunded. "eventTime": "A String", # The time when the order was fully refunded. "refundDetails": { # Details for a partial or full refund. # Details for the full refund. "tax": { # Represents an amount of money with its currency type. # The amount of tax refunded. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "total": { # Represents an amount of money with its currency type. # The total amount refunded, including tax. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "refundReason": "A String", # The reason the order was refunded. }, }, "orderId": "A String", # The order ID. "pointsDetails": { # Details relating to any Play Points applied to an order. # Play points applied to the order, including offer information, discount rate and point values. "pointsCouponValue": { # Represents an amount of money with its currency type. # The monetary value of a Play Points coupon. This is the discount the coupon provides, which may not be the total amount. Only set when Play Points coupons have been used. E.g. for a 100 points for $2 coupon, this is $2. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "pointsDiscountRateMicros": "A String", # The percentage rate which the Play Points promotion reduces the cost by. E.g. for a 100 points for $2 coupon, this is 500,000. Since $2 has an estimate of 200 points, but the actual Points required, 100, is 50% of this, and 50% in micros is 500,000. Between 0 and 1,000,000. "pointsOfferId": "A String", # ID unique to the play points offer in use for this order. "pointsSpent": "A String", # The number of Play Points applied in this order. E.g. for a 100 points for $2 coupon, this is 100. For coupon stacked with base offer, this is the total points spent across both. }, "purchaseToken": "A String", # The token provided to the user's device when the subscription or item was purchased. "state": "A String", # The state of the order. "tax": { # Represents an amount of money with its currency type. # The total tax paid as a part of this order. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "total": { # Represents an amount of money with its currency type. # The final amount paid by the customer, taking into account discounts and taxes. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, ], }
close()
Close httplib2 connections.
get(packageName, orderId, x__xgafv=None)
Get order details for a single order. Args: packageName: string, Required. The package name of the application for which this subscription or in-app item was purchased (for example, 'com.some.thing'). (required) orderId: string, Required. The order ID provided to the user when the subscription or in-app order was purchased. (required) x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Details of an order. "buyerAddress": { # Address information for the customer, for use in tax computation. # Address information for the customer, for use in tax computation. When Google is the Merchant of Record for the order, only country is shown. "buyerCountry": "A String", # Two letter country code based on ISO-3166-1 Alpha-2 (UN country codes). "buyerPostcode": "A String", # Postal code of an address. When Google is the Merchant of Record for the order, this information is not included. "buyerState": "A String", # Top-level administrative subdivision of the buyer address country. When Google is the Merchant of Record for the order, this information is not included. }, "createTime": "A String", # The time when the order was created. "developerRevenueInBuyerCurrency": { # Represents an amount of money with its currency type. # Your revenue for this order in the buyer's currency, including deductions of partial refunds, taxes and fees. Google deducts standard transaction and third party fees from each sale, including VAT in some regions. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "lastEventTime": "A String", # The time of the last event that occurred on the order. "lineItems": [ # The individual line items making up this order. { # Details of a line item. "listingPrice": { # Represents an amount of money with its currency type. # Item's listed price on Play Store, this may or may not include tax. Excludes any discounts or promotions. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "oneTimePurchaseDetails": { # Details of a one-time purchase. # Details of a one-time purchase. "offerId": "A String", # The offer ID of the one-time purchase offer. "quantity": 42, # The number of items purchased (for multi-quantity item purchases). }, "paidAppDetails": { # Details of a paid app purchase. # Details of a paid app purchase. }, "productId": "A String", # The purchased product ID or in-app SKU (for example, 'monthly001' or 'com.some.thing.inapp1'). "productTitle": "A String", # Developer-specified name of the product. Displayed in buyer's locale. Example: coins, monthly subscription, etc. "subscriptionDetails": { # Details of a subscription purchase. # Details of a subscription purchase. "basePlanId": "A String", # The base plan ID of the subscription. "offerId": "A String", # The offer ID for the current subscription offer. "offerPhase": "A String", # The pricing phase for the billing period funded by this order. "servicePeriodEndTime": "A String", # The end of the billing period funded by this order. This is a snapshot of the billing/service period end time at the moment the order was processed, and should be used only for accounting. To get the current end time of the subscription service period, use purchases.subscriptionsv2.get. "servicePeriodStartTime": "A String", # The start of the billing period funded by this order. This is a snapshot of the billing/service period start time at the moment the order was processed, and should be used only for accounting. }, "tax": { # Represents an amount of money with its currency type. # The tax paid for this line item. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "total": { # Represents an amount of money with its currency type. # The total amount paid by the user for this line item, taking into account discounts and tax. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, ], "orderDetails": { # Detailed information about the order at creation time. # Detailed information about the order at creation time. "taxInclusive": True or False, # Indicates whether the listed price was tax inclusive or not. }, "orderHistory": { # Details about events which modified the order. # Details about events which modified the order. "cancellationEvent": { # Details of when the order was canceled. # Details of when the order was canceled. "eventTime": "A String", # The time when the order was canceled. }, "partialRefundEvents": [ # Details of the partial refund events for this order. { # Details of the partial refund events for this order. "createTime": "A String", # The time when the partial refund was created. "processTime": "A String", # The time when the partial refund was processed. "refundDetails": { # Details for a partial or full refund. # Details for the partial refund. "tax": { # Represents an amount of money with its currency type. # The amount of tax refunded. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "total": { # Represents an amount of money with its currency type. # The total amount refunded, including tax. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "state": "A String", # The state of the partial refund. }, ], "processedEvent": { # Details of when the order was processed. # Details of when the order was processed. "eventTime": "A String", # The time when the order was processed. }, "refundEvent": { # Details of when the order was fully refunded. # Details of when the order was fully refunded. "eventTime": "A String", # The time when the order was fully refunded. "refundDetails": { # Details for a partial or full refund. # Details for the full refund. "tax": { # Represents an amount of money with its currency type. # The amount of tax refunded. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "total": { # Represents an amount of money with its currency type. # The total amount refunded, including tax. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }, "refundReason": "A String", # The reason the order was refunded. }, }, "orderId": "A String", # The order ID. "pointsDetails": { # Details relating to any Play Points applied to an order. # Play points applied to the order, including offer information, discount rate and point values. "pointsCouponValue": { # Represents an amount of money with its currency type. # The monetary value of a Play Points coupon. This is the discount the coupon provides, which may not be the total amount. Only set when Play Points coupons have been used. E.g. for a 100 points for $2 coupon, this is $2. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "pointsDiscountRateMicros": "A String", # The percentage rate which the Play Points promotion reduces the cost by. E.g. for a 100 points for $2 coupon, this is 500,000. Since $2 has an estimate of 200 points, but the actual Points required, 100, is 50% of this, and 50% in micros is 500,000. Between 0 and 1,000,000. "pointsOfferId": "A String", # ID unique to the play points offer in use for this order. "pointsSpent": "A String", # The number of Play Points applied in this order. E.g. for a 100 points for $2 coupon, this is 100. For coupon stacked with base offer, this is the total points spent across both. }, "purchaseToken": "A String", # The token provided to the user's device when the subscription or item was purchased. "state": "A String", # The state of the order. "tax": { # Represents an amount of money with its currency type. # The total tax paid as a part of this order. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, "total": { # Represents an amount of money with its currency type. # The final amount paid by the customer, taking into account discounts and taxes. "currencyCode": "A String", # The three-letter currency code defined in ISO 4217. "nanos": 42, # Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. "units": "A String", # The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. }, }
refund(packageName, orderId, revoke=None, x__xgafv=None)
Refunds a user's subscription or in-app purchase order. Orders older than 3 years cannot be refunded. Args: packageName: string, The package name of the application for which this subscription or in-app item was purchased (for example, 'com.some.thing'). (required) orderId: string, The order ID provided to the user when the subscription or in-app order was purchased. (required) revoke: boolean, Whether to revoke the purchased item. If set to true, access to the subscription or in-app item will be terminated immediately. If the item is a recurring subscription, all future payments will also be terminated. Consumed in-app items need to be handled by developer's app. (optional). x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format