We've discovered a very strange case in our app.
Here's what we do:
- Our mobile app makes a purchase and sends a base64-encoded receipt file to our server.
- We send it to the
/v1/receipt
endpoint. - We check the entitlements that are returned in the response, and we also respond to events from RevenueCat to manage access to our service.
For some users, the following has occurred (user #1, user #2):
/v1/receipt
returned empty entitlements.- No events from RevenueCat for this user have come in.
- However, Apple sends the correct event
SUBSCRIBED.INITIAL_BUY
:
{
"notificationType": "SUBSCRIBED",
"subtype": "INITIAL_BUY",
...,
"data": {
...,
"signedTransactionInfo": {
"originalTransactionId": "$txId",
...
},
"signedRenewalInfo": {
"originalTransactionId": "$txId",
...
},
"status": 1
},
"version": "2.0",
"signedDate": 1698842056024
}
After investigating the situation, we found that the problem was with the receipts files we got. Here are the differences we found:
- If we use the deprecated verifyReceipt, the responseBody contains no information about the purchase:
latest_receipt_info
,latest_receipt
are missing,receipt.in
_app
is empty.
{
"receipt": {
"receipt_type": "Production",
...,
"in_app": ]
},
"environment": "Production",
"status": 0
}
- If we use the App Store Server API, then all the purchase information is visible.
What can we do about this? Even if we handle such cases on our side, how can we add such users to RevenueCat? Currently, events from Apple for such users are not being processed in RevenueCat.