Subscription receipt confirmation (V2)
Important
This method works only with subscriptions made through Pay SDK.
This method allows you to confirm that the user has received the subscription content using the purchase identifier.
Confirming the receipt of a subscription is not required for subscriptions to function.
tip
If you are not sure where to start, read the usage scenarios guide.
Interaction parameters
POST
https://public-api.rustore.ru/public/v2/subscription/{packageName}/{subscriptionId}/{purchaseId}:acknowledge
To work with test payments and subscriptions, you will need a new key, specifying the methods for testing when creating it.
| Attribute | Type | Description | Required | Location | Example |
|---|---|---|---|---|---|
Public-Token | string | JWE authorization token for the RuStore Public API. How to obtain an authorization token. | Yes | header | N/A |
packageName | string | Application package name. | Yes | path | com.MashaAndTheBear.HairSalon |
subscriptionId | string | Subscription product code. Specified by the developer when creating the product in the RuStore Console. How to create a subscription. | Yes | path | daily_sub |
purchaseId | string | Purchase identifier in UUID format. Can be obtained from the SDK purchase result, from a server notification, or by requesting purchase information. | Yes | path | 3aa0c7bd-964e-4562-b218-fe365adb4ae3 |
Response parameters
| Attribute | Type | Description | Required | Location | Example |
|---|---|---|---|---|---|
code | string | Response code. | Yes | body | OK / ERROR |
message | string | Response code description. | No | body | Bad request |
body | object | Response body. Not returned for this method. | No | body | null |
timestamp | string | Response timestamp. | Yes | body | 2024-07-29T12:00:00.000Z |
Example of a successful Response
{
"code": "OK",
"message": null,
"body": null,
"timestamp": "2024-07-29T12:00:00.000Z"
}
Example of an error Response
{
"code": "ERROR",
"message": "Bad request",
"body": null,
"timestamp": "2024-07-29T12:00:00.000Z"
}
Error List
| Message | Description |
|---|---|
Purchase not found | The purchase was not found. Make sure you specified the correct purchase identifier. |
Forbidden | Access is denied. Check the validity of the authorization token and the request parameters. |
Something went wrong | An unexpected error occurred. Try again later or contact support. |