Page tree
Skip to end of metadata
Go to start of metadata

You can manage your app subscription products on Myket from the server. There are two APIs for this. " Subscription Validation" and "Cancel Auto-renewal".

Authentication

To use the following services, you must download the X-Access-Token key from the Developer panel setting menu and put it as a header in your services. For example:

X-Access-Token: 650e0714-a4348-v475-a40-3f3ec5fcf001


Check the status

To get information and check the status of a purchase, you need to use its token:

[GET]
[Header: X-Access-Token] 
http://developer.myket.ir/api/applications/{PACKAGE_NAME}/purchases/subscription/{PRODUCT_ID}/tokens/{TOKEN}


Input Help Table:

Input

Description

TOKEN

User purchase Token

PACKAGE_NAME

Your App Package name

PRODUCT_ID

Your Product ID



For example, you will have the following output:

{ 
"startTimeMillis": 1489416862000,
"expiryTimeMillis": 1489417162000, 
"kind": "androidpublisher#productPurchase", 
"autoRenewing": false, 
"developerPayload": ""
} 

Output

Description

startTimeMillis

The start time of the subscription period

expiryTimeMillis

End time period of subscription

autoRenewing

Auto-renewal status

developerPayload

The value of developerPayload that was imported when it was purchased.

 

Cancel Auto-renewal

By using this API, you can disable auto-renewal of a product for a token.

[Method: PUT]
[Header: X-Access-Token] 
http://developer.myket.ir/api/applications/{PACKAGE_NAME}/purchases/subscription/{PRODUCT_ID}/tokens/{TOKEN}/cancel


Input Help Table:

Input

Description

TOKEN

User purchase Token

PACKAGE_NAME

Your App Package name

PRODUCT_ID

Your Product ID



For example, you will have the following output:

{ 
"code": 200, 
"messageCode": "Successful",
"translatedMessage": "عملیات با موفقیت انجام شد."
}



  • No labels