---
title: "Sync StoreKit Transaction"
method: POST
path: "/iap/storekit-transactions"
tags: ["StoreKit"]
---

# Sync StoreKit Transaction

`POST /iap/storekit-transactions`

Forwards a StoreKit 2 JWS (JSON Web Signature) transaction to ZeroSettle for verification and recording. The backend verifies the JWS against Apple's root certificate chain, creates a `Transaction` and `Entitlement`, and returns success. The SDK should call `transaction.finish()` only after receiving a success response.

SDK 1.3+ additionally forwards `will_auto_renew` (pulled from `Product.SubscriptionInfo.RenewalInfo.willAutoRenew`) on every sync. The backend diffs this against the stored entitlement state and emits `CANCELLED` / `REACTIVATED` events when the flag flips, so auto-renew state stays accurate even in deployments without App Store Server Notifications (ASSN) v2 configured.

## Request body

- object
  - `jws_representation` string, required — The StoreKit 2 transaction's JWS representation string.
  - `user_id` string, required — The user's external ID.
  - `will_auto_renew` boolean — Optional (SDK 1.3+). The current `willAutoRenew` value from StoreKit's `Product.SubscriptionInfo.RenewalInfo` for the subscription this JWS belongs to. When provided, the backend compares it against the stored entitlement and emits `CANCELLED` (true→false) or `REACTIVATED` (false→true) events. Omit the field for non-subscription syncs or older SDKs; behaviour is unchanged when missing.
  - `renewal_state` 'subscribed' | 'expired' | 'in_billing_retry_period' | 'in_grace_period' | 'revoked' — Optional (SDK 1.3+, reserved). Mirror of StoreKit's `Product.SubscriptionInfo.RenewalState` for future use. Accepted but not currently acted on. Typical values: `subscribed`, `expired`, `in_billing_retry_period`, `in_grace_period`, `revoked`.

## Response `200`

Transaction synced successfully

- object
  - `status` string

## Other responses

- `400` — Invalid request -- missing or malformed parameters.
- `401` — Invalid or missing API key.

## Changes

- **2026-04-26** `7161b4c4d75d` — 2 info
  - added the new optional request property `renewal_state`
  - added the new optional request property `will_auto_renew`
- **2026-03-22** `8c7fa6fb5be3` — 1 info
  - endpoint added
- **2025-12-11** `919eb7a392aa` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/zerosettle/apis/zerosettle-iap-api/changes/iap/storekit-transactions/post.md)

---

[API](https://skmtc.dev/zerosettle/apis/zerosettle-iap-api.md) · [All operations](https://skmtc.dev/zerosettle/apis/zerosettle-iap-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zerosettle/zerosettle-iap-api/revisions/1a7aa12f3d5e/schema)
