Skip to content

Commit 7d436ef

Browse files
Create add-billing-to-url-sdk.mdx
New topic for adding billing to URL and via SDK
1 parent cdca368 commit 7d436ef

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
page_id: db047df7-d6b6-4d02-843f-dce6000bacbd
3+
title: Update code and URLs for billing
4+
sidebar:
5+
order: 3
6+
relatedArticles:
7+
- bd6757e3-81d5-48d6-89c8-dd4c222ac647
8+
- 100f75f1-a0a4-459f-874f-da127f2d0615
9+
---
10+
11+
This topic explains how to customize billing flows with Kinde, including URL parameters, direct auth URLs, and SDK usage in React.
12+
13+
Examples are given in React, but can be adapted for most frameworks.
14+
15+
## Edit the auth URL parameters directly
16+
17+
Here’s a standard Kinde auth URL:
18+
19+
```
20+
21+
https://<your_kinde_subdomain>.kinde.com/oauth2/auth
22+
?response_type=code
23+
&client_id=<your_kinde_client_id>
24+
&redirect_uri=<your_app_redirect_url>
25+
&scope=openid%20profile%20email
26+
&state=abc
27+
28+
```
29+
30+
Add these parameters as needed:
31+
32+
| Parameter | Description |
33+
| --- | --- |
34+
| `plan_interest` | Pre-selects a plan (skips plan selection) |
35+
| `pricing_table_key` | Displays a specific pricing table |
36+
| `is_create_org` | Triggers org sign-up flow |
37+
38+
### Examples
39+
40+
- Pre-select a plan:
41+
42+
```
43+
...&plan_interest=pro_monthly
44+
```
45+
46+
- Show specific pricing:
47+
48+
```
49+
...&pricing_table_key=spring_promo
50+
```
51+
52+
- Org sign-up:
53+
54+
```
55+
...&is_create_org=true
56+
```
57+
58+
## Integrate billing using the React SDK
59+
60+
You can avoid manual URL construction by using our SDK components. Here's how.
61+
62+
**User sign-up (default):**
63+
64+
```jsx
65+
<RegisterLink>Sign up</RegisterLink>
66+
```
67+
68+
**Org sign-up (B2B):**
69+
70+
```jsx
71+
<RegisterLink isCreateOrg>Sign up your organization</RegisterLink>
72+
```
73+
74+
**Pre-select a user plan:**
75+
76+
```jsx
77+
<RegisterLink planInterest="pro_monthly">Sign up with Pro plan</RegisterLink>
78+
```
79+
80+
**Show a specific pricing table:**
81+
82+
```jsx
83+
<RegisterLink pricingTableKey="spring_promo">Spring Promo Sign up</RegisterLink>
84+
```
85+
86+
**Combine for B2B + pricing table:**
87+
88+
```jsx
89+
<RegisterLink isCreateOrg pricingTableKey="enterprise_2024">
90+
Sign up your company
91+
</RegisterLink>
92+
```

0 commit comments

Comments
 (0)