Skip to content
This repository was archived by the owner on Aug 4, 2026. It is now read-only.

Commit f60c34f

Browse files
hyochanclaude
andcommitted
docs: add appAccountToken UUID format requirement
- Update request-purchase.md with UUID format requirement and examples - Update types.md with UUID format note - Update purchases.md guide with UUID requirement Refs hyochan/expo-iap#128 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 8997f70 commit f60c34f

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

docs/docs/api/methods/request-purchase.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class RequestPurchase {
6262
class RequestPurchaseIOS {
6363
final String sku; // Product ID
6464
final int? quantity; // Quantity (for consumables)
65-
final String? appAccountToken; // User identifier
65+
final String? appAccountToken; // User identifier (must be UUID format)
6666
final Map<String, dynamic>? withOffer; // Promotional offer
6767
final String? advancedCommerceData; // Attribution data (iOS 15+)
6868
}
@@ -102,7 +102,7 @@ await FlutterInappPurchase.instance.requestPurchase(
102102
RequestPurchaseProps.inApp((
103103
apple: RequestPurchaseIosProps(
104104
sku: 'com.example.premium',
105-
appAccountToken: userId, // Your user ID
105+
appAccountToken: userId, // Must be UUID format (e.g., '550e8400-e29b-41d4-a716-446655440000')
106106
),
107107
google: RequestPurchaseAndroidProps(
108108
skus: ['com.example.premium'],
@@ -180,7 +180,7 @@ class PurchaseService {
180180
RequestPurchaseProps.subs((
181181
apple: RequestPurchaseIosProps(
182182
sku: productId,
183-
appAccountToken: userId,
183+
appAccountToken: userId, // Must be UUID format
184184
),
185185
google: RequestPurchaseAndroidProps(
186186
skus: [productId],
@@ -193,7 +193,7 @@ class PurchaseService {
193193
RequestPurchaseProps.inApp((
194194
apple: RequestPurchaseIosProps(
195195
sku: productId,
196-
appAccountToken: userId,
196+
appAccountToken: userId, // Must be UUID format
197197
),
198198
google: RequestPurchaseAndroidProps(
199199
skus: [productId],

docs/docs/api/types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ iOS-specific purchase parameters.
3737
class RequestPurchaseIOS {
3838
final String sku; // Product SKU
3939
final bool? andDangerouslyFinishTransactionAutomaticallyIOS; // Auto-finish transaction
40-
final String? appAccountToken; // App account token
40+
final String? appAccountToken; // App account token (must be UUID format)
4141
final int? quantity; // Purchase quantity
4242
final PaymentDiscount? withOffer; // Promotional offer
4343

docs/docs/guides/purchases.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,22 +78,24 @@ Using the builder pattern (recommended):
7878
await iap.requestPurchaseWithBuilder(
7979
build: (builder) {
8080
builder.ios.sku = 'product_id';
81-
builder.ios.appAccountToken = userId;
81+
builder.ios.appAccountToken = userId; // Must be UUID format
8282
builder.android.skus = ['product_id'];
8383
builder.android.obfuscatedAccountIdAndroid = userId;
8484
builder.type = ProductQueryType.InApp;
8585
},
8686
);
8787
```
8888

89+
> **⚠️ Important:** The `appAccountToken` must be a valid UUID format (e.g., `550e8400-e29b-41d4-a716-446655440000`). If a non-UUID value is provided, Apple will silently return `null` for this field in the purchase response. See [OpenIAP Request Types](https://openiap.dev/docs/types/request) for details.
90+
8991
Or using props directly:
9092

9193
```dart
9294
await iap.requestPurchase(
9395
RequestPurchaseProps.inApp((
9496
apple: RequestPurchaseIosProps(
9597
sku: 'product_id',
96-
appAccountToken: userId,
98+
appAccountToken: userId, // Must be UUID format
9799
),
98100
google: RequestPurchaseAndroidProps(
99101
skus: ['product_id'],

0 commit comments

Comments
 (0)