I have a strange behavior with SubscriptionNotification, when we purchase a subscription and cancel it we get in total 4 notifications :
- the first one for the purchase (received at 08:11:40)
{
"startTimeMillis": "1680768693830", // 2023-04-06 08:11:33
"expiryTimeMillis": "1680768987284", // 2023-04-06 08:16:27
"autoRenewing": true,
"priceCurrencyCode": "EUR",
"priceAmountMicros": "12990000",
"countryCode": "FR",
"developerPayload": "",
"paymentState": 1,
"orderId": "GPA.3318-6319-2574-83983",
"purchaseType": 0,
"acknowledgementState": 0,
"kind": "androidpublisher#subscriptionPurchase",
"obfuscatedExternalAccountId": "44643664-6333-4338-a666-353162316530",
"obfuscatedExternalProfileId": "78708a15-b7ab-480d-90bf-84e75c4962eb"
}
- the second one for the cancellation (received at 08:14:32)
{
"startTimeMillis": "1680768693830", // 2023-04-06 08:11:33
"expiryTimeMillis": "1680768987284", // 2023-04-06 08:16:27
"autoRenewing": false,
"priceCurrencyCode": "EUR",
"priceAmountMicros": "12990000",
"countryCode": "FR",
"developerPayload": "",
"paymentState": 1,
"cancelReason": 0,
"userCancellationTimeMillis": "1680768867438", // 2023-04-06 08:14:27
"orderId": "GPA.3318-6319-2574-83983",
"purchaseType": 0,
"acknowledgementState": 1,
"kind": "androidpublisher#subscriptionPurchase",
"obfuscatedExternalAccountId": "44643664-6333-4338-a666-353162316530",
"obfuscatedExternalProfileId": "78708a15-b7ab-480d-90bf-84e75c4962eb"
}
- the third one for the expiration (received at 08:16:33)
{
"startTimeMillis": "1680768693830", // 2023-04-06 08:11:33
"expiryTimeMillis": "1680768988438", // 2023-04-06 08:16:28
"autoRenewing": false,
"priceCurrencyCode": "EUR",
"priceAmountMicros": "12990000",
"countryCode": "FR",
"developerPayload": "",
"cancelReason": 0,
"userCancellationTimeMillis": "1680768867438", // 2023-04-06 08:14:27
"orderId": "GPA.3318-6319-2574-83983",
"purchaseType": 0,
"acknowledgementState": 1,
"kind": "androidpublisher#subscriptionPurchase",
"obfuscatedExternalAccountId": "44643664-6333-4338-a666-353162316530",
"obfuscatedExternalProfileId": "78708a15-b7ab-480d-90bf-84e75c4962eb"
}
- and a fourth one again for the expiration (received at 08:34:33)
{
"startTimeMillis": "1680768693830", // 2023-04-06 08:11:33
"expiryTimeMillis": "1680768988438", // 2023-04-06 08:16:28
"autoRenewing": false,
"priceCurrencyCode": "EUR",
"priceAmountMicros": "12990000",
"countryCode": "FR",
"developerPayload": "",
"cancelReason": 0,
"userCancellationTimeMillis": "1680768867438", // 2023-04-06 08:14:27
"orderId": "GPA.3318-6319-2574-83983",
"purchaseType": 0,
"acknowledgementState": 1,
"kind": "androidpublisher#subscriptionPurchase",
"obfuscatedExternalAccountId": "44643664-6333-4338-a666-353162316530",
"obfuscatedExternalProfileId": "78708a15-b7ab-480d-90bf-84e75c4962eb"
}
(I am in test mode so the duration of the subscription is 5 minutes)
I don't understand where this fourth one come from, the problematic thing is it's sent after we make a purchase again.
Here is the notification for the second purchase (received at 08:34:23) :
{
"startTimeMillis": "1680770058278", // 2023-04-06 08:34:18
"expiryTimeMillis": "1680770354886", // 2023-04-06 08:39:14
"autoRenewing": true,
"priceCurrencyCode": "EUR",
"priceAmountMicros": "12990000",
"countryCode": "FR",
"developerPayload": "",
"paymentState": 1,
"orderId": "GPA.3314-6552-0681-64757",
"purchaseType": 0,
"acknowledgementState": 0,
"kind": "androidpublisher#subscriptionPurchase",
"obfuscatedExternalAccountId": "44643664-6333-4338-a666-353162316530",
"obfuscatedExternalProfileId": "78708a15-b7ab-480d-90bf-84e75c4962eb"
}
You can see the orderId is different this time as it's a second purchase. Where do this fourth notification from the first purchase comes from ?