tru-mcp 0.8.2 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -167,11 +167,25 @@ Your backend is ready. Choose how to expose tru to your users:
|
|
|
167
167
|
|
|
168
168
|
tru provides a client SDK (\`tru.js\`) that handles popup management, polling, and error handling.
|
|
169
169
|
|
|
170
|
-
**
|
|
170
|
+
**Before adding pay buttons, check if the app has Stripe products synced:**
|
|
171
|
+
|
|
172
|
+
Run \`discover_products(service_name)\` to see the app's product catalog. If products exist, use the \`product\` attribute to link pay buttons to specific products. This ensures charges are tied to the correct Stripe product for provisioning and reporting.
|
|
173
|
+
|
|
174
|
+
**With product IDs (preferred — links to Stripe products):**
|
|
171
175
|
|
|
172
176
|
\`\`\`html
|
|
173
177
|
<script src="${BASE_URL}/tru.js" data-app="my-app"></script>
|
|
174
178
|
<tru-login-button>Log in</tru-login-button>
|
|
179
|
+
|
|
180
|
+
<!-- Product-linked subscription -->
|
|
181
|
+
<tru-pay-button amount="499" description="Pro plan" type="recurring" interval="month" product="product-uuid-here">
|
|
182
|
+
Subscribe ($4.99/mo)
|
|
183
|
+
</tru-pay-button>
|
|
184
|
+
\`\`\`
|
|
185
|
+
|
|
186
|
+
**Without products (amount on the button, no server code needed):**
|
|
187
|
+
|
|
188
|
+
\`\`\`html
|
|
175
189
|
<tru-pay-button amount="100" description="5 credits">Buy 5 credits ($1)</tru-pay-button>
|
|
176
190
|
|
|
177
191
|
<!-- Subscription -->
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_started.js","sourceRoot":"","sources":["../../src/tools/get_started.ts"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,gBAAgB,CAAC;AAE7D,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,WAAW;IACjB,WAAW,EACT,gIAAgI;QAChI,6DAA6D;QAC7D,uIAAuI;QACvI,2HAA2H;IAC7H,WAAW,EAAE,EAAE;IACf,OAAO,EAAE,KAAK,EAAE,KAA4B,EAAE,EAAE;QAC9C,MAAM,KAAK,GAAG
|
|
1
|
+
{"version":3,"file":"get_started.js","sourceRoot":"","sources":["../../src/tools/get_started.ts"],"names":[],"mappings":"AAEA,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,gBAAgB,CAAC;AAE7D,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,WAAW;IACjB,WAAW,EACT,gIAAgI;QAChI,6DAA6D;QAC7D,uIAAuI;QACvI,2HAA2H;IAC7H,WAAW,EAAE,EAAE;IACf,OAAO,EAAE,KAAK,EAAE,KAA4B,EAAE,EAAE;QAC9C,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAuKH,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkHtB,CAAC;QAEE,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;SAClD,CAAC;IACJ,CAAC;CACF,CAAC"}
|