Apple Subscription Verification
Verify an Apple StoreKit 2 transaction to activate or renew a Pro subscription.
curl -X POST \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
"https://api.unisave.io/v1/subscriptions/apple/verify" \
-d '{
"transactionJWS": "eyJhbGciOiJFUzI1NiIs..."
}'
Request Body
| Field | Type | Required | Description |
|---|
transactionJWS | string | Yes | The signed transaction from StoreKit 2 (Transaction.jsonRepresentation) |
Response 200
{
"verified": true,
"productId": "pro_monthly",
"expiresAt": "2026-05-12T10:30:00Z",
"isPro": true
}
The server validates the JWS signature, extracts the transaction payload, and updates the user’s subscription status in the database.
Error Responses
| Code | Status | Description |
|---|
invalid-body | 400 | Missing or malformed transactionJWS |
unauthenticated | 401 | Missing access token |
internal | 500 | Verification failed server-side |
Google Play Subscription Verification
Verify a Google Play subscription purchase token.
Google Play verification is not yet implemented. The endpoint currently returns 501 not-configured. This will be available in a future release.
curl -X POST \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
"https://api.unisave.io/v1/subscriptions/google/verify" \
-d '{
"purchaseToken": "google-play-purchase-token",
"productId": "pro_monthly"
}'
Current Response 501
{
"code": "not-configured",
"message": "Google Play subscription verification is not yet available."
}
Subscription Status
The user’s Pro status is reflected in:
GET /v1/me — isPro field
- Auth responses —
user.isPro field
- Feature-gated endpoints (
recall, saveWhy) — access or 403 pro-required
Subscription expiry is checked server-side. Expired subscriptions automatically revert isPro to false.