Skip to content

Fix onDismiss purchased result sending a StoreProduct description instead of the product id - #6

Merged
ianrumac merged 1 commit into
superwall:mainfrom
bilck:fix/paywall-result-product-identifier
Sep 9, 2026
Merged

ianrumac merged 1 commit into
superwall:mainfrom
bilck:fix/paywall-result-product-identifier

Conversation

@bilck

@bilck bilck commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Problem

PaywallResult.purchased carries a StoreProduct, but the iOS bridge placed the value straight into the
onDismiss payload under productId. JSON serialization received a non-JSON leaf and fell back to the
object's debug description, so Unity was handed:

"productId": "<SWKStoreProduct: 0x14f80a980>"

Any consumer matching that id against a store catalogue (revenue reporting, receipt lookup, entitlement
mapping) finds nothing and silently drops the purchase. The purchase itself succeeds and entitlements
activate, so only downstream reporting is affected, which makes it easy to miss.

Fix

Read product.productIdentifier, the same thing serializeStoreProduct and the other product-serialization
paths in this file already do.

Verification

Sandbox subscription on iOS: onDismiss now carries com.explot.gouda.subs.yearly and the consumer's
catalogue lookup resolves. Android was not affected (its bridge already sent the identifier).

Checked against SuperwallKit 4.16.3.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LTHPGB4qyAwDVYmQHW87ex

…duct id

`PaywallResult.purchased` carries a `StoreProduct`, not a `String`, but the
binding was named `productId` and the value was placed straight into the
`onDismiss` payload. JSON serialization then received a non-JSON leaf and fell
back to the object's debug description, so Unity was handed

    "productId": "<SWKStoreProduct: 0x14f80a980>"

instead of the identifier. Any consumer that matches that id against a store
catalogue - revenue reporting, receipt lookup, entitlement mapping - finds
nothing and silently drops the purchase. It fails quietly: the purchase itself
succeeds and entitlements activate normally, so only downstream reporting is
affected, which makes it easy to miss.

Found on a real sandbox subscription: the id never resolved against the Unity
IAP catalogue, so the client-side revenue fan-out was skipped entirely.

Reads `product.productIdentifier`, matching what `serializeStoreProduct` and the
product-serialization paths in this same file already do.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ianrumac
ianrumac merged commit 4271d28 into superwall:main Sep 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants