You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/content/docs/en/tools/revenuecat.mdx
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,8 +119,10 @@ Record a purchase (receipt) for a subscriber via the REST API
119
119
|`productId`| string | Yes | The product identifier for the purchase |
120
120
|`price`| number | No | The price of the product in the currency specified |
121
121
|`currency`| string | No | ISO 4217 currency code \(e.g., USD, EUR\)|
122
-
|`isRestore`| boolean | No | Whether this is a restore of a previous purchase |
123
-
|`platform`| string | No | Platform of the purchase \(ios, android, amazon, macos, stripe\). Required for Stripe and Paddle purchases. |
122
+
|`isRestore`| boolean | No | Whether this is a restore of a previous purchase \(deprecated by RevenueCat\)|
123
+
|`presentedOfferingIdentifier`| string | No | Identifier of the offering that was presented to the user when they made this purchase. Used by RevenueCat for offering-level analytics. |
124
+
|`paymentMode`| string | No | Payment mode for the purchase. One of: pay_as_you_go, pay_up_front, free_trial. Only applies to introductory pricing periods. |
125
+
|`platform`| string | Yes | Platform of the purchase. One of: ios, android, amazon, macos, uikitformac, stripe, roku, paddle. Sent as the X-Platform header \(required by RevenueCat\). |
124
126
125
127
#### Output
126
128
@@ -170,7 +172,8 @@ Grant a promotional entitlement to a subscriber
170
172
|`apiKey`| string | Yes | RevenueCat secret API key \(sk_...\)|
171
173
|`appUserId`| string | Yes | The app user ID of the subscriber |
172
174
|`entitlementIdentifier`| string | Yes | The entitlement identifier to grant |
173
-
|`duration`| string | Yes | Duration of the entitlement \(daily, three_day, weekly, monthly, two_month, three_month, six_month, yearly, lifetime\)|
175
+
|`duration`| string | No | Duration of the entitlement. Provide either duration or endTimeMs. One of: daily, three_day, weekly, two_week, monthly, two_month, three_month, six_month, yearly, lifetime |
176
+
|`endTimeMs`| number | No | Absolute end time in milliseconds since Unix epoch. Use instead of duration to grant the entitlement until a specific timestamp. |
174
177
|`startTimeMs`| number | No | Optional start time in milliseconds since Unix epoch. Set to a past time to achieve custom durations shorter than daily. |
|`apiKey`| string | Yes | RevenueCat secret API key \(sk_...\)|
298
301
|`appUserId`| string | Yes | The app user ID of the subscriber |
299
-
|`attributes`| json | Yes | JSON object of attributes to set. Each key maps to an object with a "value" field. Example: \{"$email": \{"value": "user@example.com"\}, "$displayName": \{"value": "John"\}\}|
302
+
|`attributes`| json | Yes | JSON object of attributes to set. Each key maps to an object with "value" \(string; null or empty deletes the attribute\) and "updated_at_ms" \(Unix epoch ms used for conflict resolution — required\). Example: \{"$email": \{"value": "user@example.com", "updated_at_ms": 1709195668093\}\}|
300
303
301
304
#### Output
302
305
@@ -316,7 +319,8 @@ Defer a Google Play subscription by extending its billing date by a number of da
316
319
|`apiKey`| string | Yes | RevenueCat secret API key \(sk_...\)|
317
320
|`appUserId`| string | Yes | The app user ID of the subscriber |
318
321
|`productId`| string | Yes | The Google Play product identifier of the subscription to defer \(use the part before the colon for products set up after Feb 2023\)|
319
-
|`extendByDays`| number | Yes | Number of days to extend the subscription by \(1-365\)|
322
+
|`extendByDays`| number | No | Number of days to extend the subscription by \(1-365\). Provide either extendByDays or expiryTimeMs. |
323
+
|`expiryTimeMs`| number | No | Absolute new expiry time in milliseconds since Unix epoch. Use instead of extendByDays to set an exact expiry. |
320
324
321
325
#### Output
322
326
@@ -357,15 +361,15 @@ Defer a Google Play subscription by extending its billing date by a number of da
357
361
358
362
### `revenuecat_refund_google_subscription`
359
363
360
-
Refund and optionally revoke a Google Play subscription (Google Play only)
364
+
Refund a specific store transaction by its store transaction identifier and revoke access (subscription or non-subscription, last 365 days)
361
365
362
366
#### Input
363
367
364
368
| Parameter | Type | Required | Description |
365
369
| --------- | ---- | -------- | ----------- |
366
370
|`apiKey`| string | Yes | RevenueCat secret API key \(sk_...\)|
367
371
|`appUserId`| string | Yes | The app user ID of the subscriber |
368
-
|`productId`| string | Yes | The Google Play product identifier of the subscription to refund |
372
+
|`storeTransactionId`| string | Yes | The store transaction identifier of the purchase to refund\(e.g., GPA.3309-9122-6177-45730 for Google Play\)|
Copy file name to clipboardExpand all lines: apps/sim/app/(landing)/integrations/data/integrations.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10748,7 +10748,7 @@
10748
10748
},
10749
10749
{
10750
10750
"name": "Refund Google Subscription",
10751
-
"description": "Refund and optionally revoke a Google Play subscription (Google Play only)"
10751
+
"description": "Refund a specific store transaction by its store transaction identifier and revoke access (subscription or non-subscription, last 365 days)"
description: 'Whether this is a restore of a previous purchase',
56
+
description: 'Whether this is a restore of a previous purchase (deprecated by RevenueCat)',
57
57
},
58
-
platform: {
58
+
presentedOfferingIdentifier: {
59
59
type: 'string',
60
60
required: false,
61
61
visibility: 'user-or-llm',
62
62
description:
63
-
'Platform of the purchase (ios, android, amazon, macos, stripe). Required for Stripe and Paddle purchases.',
63
+
'Identifier of the offering that was presented to the user when they made this purchase. Used by RevenueCat for offering-level analytics.',
64
+
},
65
+
paymentMode: {
66
+
type: 'string',
67
+
required: false,
68
+
visibility: 'user-or-llm',
69
+
description:
70
+
'Payment mode for the purchase. One of: pay_as_you_go, pay_up_front, free_trial. Only applies to introductory pricing periods.',
71
+
},
72
+
platform: {
73
+
type: 'string',
74
+
required: true,
75
+
visibility: 'user-or-llm',
76
+
description:
77
+
'Platform of the purchase. One of: ios, android, amazon, macos, uikitformac, stripe, roku, paddle. Sent as the X-Platform header (required by RevenueCat).',
0 commit comments