Purchase

This reference document contains the details of Purchase class and its methods.

    public class Purchase extends Object 
        
        java.lang.Object
            gg.now.billingclient.api.Purchase

Details

Purchase is a part of class PurchasesResult and is used for in-app purchases.

Public Constructors

    Purchase

     Purchase (String jsonPurchaseInfo, String signature)

                            throws JSONException

Parameters Description Throws
jsonPurchaseInfo String jSONException
signature String

Public Methods

 

Description Usage
boolean equals(object o) boolean gg.now.billingclient.api.Purchase.equals (Object o)
String getOrderId() – Returns unique identifier for transaction String gg.now.billingclient.api.Purchase.getOrderId()
String getOriginalJson() – Returns a string in JSON, containing details of purchase order String gg.now.billingclient.api.Purchase.getOriginalJson()
String getPackageName() – Returns the application package from which the purchase originated String gg.now.billingclient.api.Purchase.getPackageName()
long getPurchaseTime() – Returns the time of purchase long gg.now.billingclient.api.Purchase.getPurchaseTime()
String getPurchaseToken() – Returns the unique identifier purchase token String gg.now.billingclient.api.Purchase.getPurchaseToken()
String getSignature() – Returns the string containing the purchase signature signed using developer’s private key String gg.now.billingclient.api.Purchase.getSignature()
String getSku() – Returns Product ID String gg.now.billingclient.api.Purchase.getSku()
int hashCode() int gg.now.billingclient.api.Purchase.hashCode()
boolean isAutoRenewing() – Returns if the purchase is auto-renewing. boolean gg.now.billingclient.api.Purchase.isAutoRenewing()
String getSubscriptionPeriod() – Returns the Subscription period, specified in ISO 8601 format. String gg.now.billingclient.api.Purchase.getSubscriptionPeriod()
long getExpiryTimeMillis() – Returns subscription expiry time in milliseconds. long gg.now.billingclient.api.Purchase.getExpiryTimeMillis()
long getSubscriptionPurchaseDateMillis() – Returns subscription purchase date. long gg.now.billingclient.api.Purchase.getSubscriptionPurchaseDateMillis()
String getSubscriptionStatus() – Returns the subscription status – defined here. String gg.now.billingclient.api.Purchase.getSubscriptionStatus()
boolean isAcknowledged() – Returns whether the purchase has been acknowledged. boolean gg.now.billingclient.api.Purchase.isAcknowledged()
String toString() String gg.now.billingclient.api.Purchase.toString()
String getDeveloperPayload() – A developer-specified string that contains supplemental information about an order. String gg.now.billingclient.api.Purchase.getDeveloperPayload()

Inherited Methods

Usage
Object clone()
boolean equals(Object arg0)
void finalize()
final Class<?> getClass()
int hashCode()
final void notify()
final void notifyAll()
String toString()
final void wait(long arg0, int arg1)
final void wait(long arg0)
final void wait()

getSubscriptionStatus Definition

Possible Returns Description
PENDING The order has been created, but the payment is pending.
EXPIRED The subscription renewal has failed.
ACTIVE Payment has been completed, and the subscription is active.
DELETED The developer has deleted the subscription from nowStudio.
CANCELLED The user has cancelled the subscription.

×
Text copied to clipboard
Link copied to clipbord
Questions? Please reach out to us at dev-support@now.gg