@deiondz/better-auth-razorpay 2.0.11 → 2.0.12
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.
- package/README.md +53 -8
- package/dist/client/hooks.d.ts +80 -5
- package/dist/client/hooks.js +52 -0
- package/dist/client/hooks.js.map +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/index.js +44 -23
- package/dist/index.js.map +1 -1
- package/dist/{types-C2IdKTof.d.ts → types-BGWv0IJy.d.ts} +5 -2
- package/package.json +1 -1
|
@@ -25,11 +25,12 @@ interface ListSubscriptionsResponse {
|
|
|
25
25
|
success: true;
|
|
26
26
|
data: SubscriptionRecord[];
|
|
27
27
|
}
|
|
28
|
-
/** Response shape for create-or-update (success). */
|
|
28
|
+
/** Response shape for create-or-update (success). When `embed: true`, checkoutUrl is omitted; use openRazorpaySubscriptionCheckout with razorpaySubscriptionId for in-page modal. */
|
|
29
29
|
interface CreateOrUpdateSubscriptionResponse {
|
|
30
30
|
success: true;
|
|
31
31
|
data: {
|
|
32
|
-
|
|
32
|
+
/** Present when not using embed; omit when embed is true (use in-page modal instead). */
|
|
33
|
+
checkoutUrl?: string | null;
|
|
33
34
|
subscriptionId: string;
|
|
34
35
|
razorpaySubscriptionId: string;
|
|
35
36
|
};
|
|
@@ -114,6 +115,8 @@ interface CreateOrUpdateSubscriptionInput {
|
|
|
114
115
|
subscriptionId?: string;
|
|
115
116
|
successUrl?: string;
|
|
116
117
|
disableRedirect?: boolean;
|
|
118
|
+
/** When true, checkout runs in-page via Razorpay modal; no redirect to checkoutUrl. */
|
|
119
|
+
embed?: boolean;
|
|
117
120
|
}
|
|
118
121
|
/** Input for cancel subscription. */
|
|
119
122
|
interface CancelSubscriptionInput {
|