Feature Request
Clerk–Paddle User and Organisation Flow
User Creation
- When a user gets created in Clerk, we need to make sure a similar user is created in Paddle with the email and the
paddle_subscription_id should be added as part of the user public metadata in Clerk.
Organisation Creation and Payment Flow
-
When a user creates an organisation, the user should then be moved to the payment screen. Whichever plan the user uses, the user should select the number of seats they require in the organisation.
Subscription and Metadata Updates
2a. The subscription with that number of seats(quantity) should be added in Paddle, and the paddle_subscription_id should be added to the organisation public_metadata in Clerk and also the organisation_created_by field which should be the user id who created the organisation now.
2b. The limited membership in Clerk in the organisation should be updated to the number of seats.
JWT Requirements After Payment
- When the user moves from the payment screen when the org is created the JWT should contain:
-
3a. user.public_metadata.paddle_customer_id
-
3b. organisation.public_metadata.paddle_subscription_id
-
3c. organisation.public_metadata.organisation_created_by
-
3d. user.email
When the user has already created the org, after selecting the org, the JWT should contain\
- 3a.
user.public_metadata.paddle_customer_id
- 3b.
organisation.public_metadata.paddle_subscription_id
- 3c.
organisation.public_metadata.organisation_created_by
- 3d.
user.email
User Flows
Once we have this setup, now whenever a user logs in:
4a. If they don’t have an organisation, they create an organisation and then they go to the payment flow.
4b. If the user already has an organisation and selected that organisation, we should check whether the user has access by checking the Paddle subscription status by quering paddle using the paddle_subscription_id in the JWT token.
Motivation
NA
Your Contribution
NA
Feature Request
Clerk–Paddle User and Organisation Flow
User Creation
paddle_subscription_idshould be added as part of the user public metadata in Clerk.Organisation Creation and Payment Flow
When a user creates an organisation, the user should then be moved to the payment screen. Whichever plan the user uses, the user should select the number of seats they require in the organisation.
Subscription and Metadata Updates
2a. The subscription with that number of seats(quantity) should be added in Paddle, and the
paddle_subscription_idshould be added to the organisationpublic_metadatain Clerk and also theorganisation_created_byfield which should be the user id who created the organisation now.2b. The limited membership in Clerk in the organisation should be updated to the number of seats.
JWT Requirements After Payment
3a.
user.public_metadata.paddle_customer_id3b.
organisation.public_metadata.paddle_subscription_id3c.
organisation.public_metadata.organisation_created_by3d.
user.emailWhen the user has already created the org, after selecting the org, the JWT should contain\
user.public_metadata.paddle_customer_idorganisation.public_metadata.paddle_subscription_idorganisation.public_metadata.organisation_created_byuser.emailUser Flows
Once we have this setup, now whenever a user logs in:
4a. If they don’t have an organisation, they create an organisation and then they go to the payment flow.
4b. If the user already has an organisation and selected that organisation, we should check whether the user has access by checking the Paddle subscription status by quering paddle using the
paddle_subscription_idin the JWT token.If the access is available, the user is let to flows.
If the access is not available:
organisation_created_byuser, it should be taken to the payment screen.organisation_created_byfield.Motivation
NA
Your Contribution
NA