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
For the webhooks integration to work and to be able to correlate incoming hooks with the correct subscription, a placeholder needs to be created **before the checkout** and - afterward - a specific value must be passed to the [Checkout API](https://developer.paddle.com/guides/ZG9jOjI1MzU0MDQz-pass-parameters-to-the-checkout) via the `passthrough` parameter. This value will be returned by the `addSubscriptionPlaceholder` method.
48
48
49
-
You can see in the example below, the Subscriptions constructor is called with the name of the target `collection` and the id of the target document. The id could be your `user` or `api_client` id. Remember: the target document must exist before creating the placeholder.
Copy file name to clipboardexpand all lines: README_SUBSCRIPTION_API.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Low level wrapper for Paddle API.
19
19
-[List products](#list-products)
20
20
-[Refund a payment](#refund-a-payment)
21
21
22
-
:information_source: The API component will be loaded asynchronously to preserve backwards compatibility with commonjs. This is achieved by returning a proxy for the entire `paddle-integration-firestore` module. The reactivity a proxy provides allows us to add the API module then at a later point to the module instance. The drawback is, we do not return named exports and, therefore, cannot not enable destructuring in ES modules.
22
+
:information_source: The API component will be loaded asynchronously to preserve backwards compatibility with commonjs. This is achieved by returning a proxy for the entire `paddle-integration-mongodb` module. The reactivity a proxy provides allows us to add the API module then at a later point to the module instance. The drawback is, we do not return named exports and, therefore, cannot not enable destructuring in ES modules.
23
23
24
24
## Creating a new instance
25
25
To create a new instance, four parameters need to be passed to the constructor:
:information_source: The API component of this module will be loaded asynchronously to preserve backwards compatibility with commonjs. This is achieved by returning a proxy for the entire `paddle-integration-firestore` module. The reactivity a proxy provides allows us to add the API module then at a later point to the module instance. The drawback is, we do not return named exports and, therefore, cannot not enable destructuring in ES modules.
10
+
:information_source: The API component of this module will be loaded asynchronously to preserve backwards compatibility with commonjs. This is achieved by returning a proxy for the entire `paddle-integration-mongodb` module. The reactivity a proxy provides allows us to add the API module then at a later point to the module instance. The drawback is, we do not return named exports and, therefore, cannot not enable destructuring in ES modules.
11
11
12
12
## Hydrate subscription created
13
13
Fetches subscription-related information from Paddle API to initialize the local storage. Has various safety measures to ensure users **cannot** hydrate their own subscriptions from already existing ones.
@@ -18,18 +18,21 @@ Uses the `subscription_id` to contact Paddle API and checks whether the given lo
In your front end application, use the `customData` function of this module to create the validation object, that is required during hydration. The `usePaddleCheckout` below will populate the `checkoutOptions` object with necessary values and open the Paddle checkout.
Copy file name to clipboardexpand all lines: README_SUBSCRIPTION_INFO.md
+13-7
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ High level wrapper for Paddle API. Manages locally stored data and interacts wit
9
9
-[Cancel a subscription](#cancel-a-subscription)
10
10
-[Update a subscription plan](#update-a-subscription-plan)
11
11
12
-
:information_source: The API component of this module will be loaded asynchronously to preserve backwards compatibility with commonjs. This is achieved by returning a proxy for the entire `paddle-integration-firestore` module. The reactivity a proxy provides allows us to add the API module then at a later point to the module instance. The drawback is, we do not return named exports and, therefore, cannot not enable destructuring in ES modules.
12
+
:information_source: The API component of this module will be loaded asynchronously to preserve backwards compatibility with commonjs. This is achieved by returning a proxy for the entire `paddle-integration-mongodb` module. The reactivity a proxy provides allows us to add the API module then at a later point to the module instance. The drawback is, we do not return named exports and, therefore, cannot not enable destructuring in ES modules.
13
13
14
14
## Get subscription infos
15
15
Returns all available information about a subscription. Will include the `start` and (optionally) `end` date, the `status_trail`, and the `payments_trail` and a property indicating whether the subscription is currently `active`.
@@ -20,7 +20,8 @@ Returns all available information about a subscription. Will include the `start`
0 commit comments