Uh oh!
There was an error while loading. Please reload this page.
feat(clerk-js,types,localizations): Preliminary Commerce work including PricingTable and Checkout components - #5248
Conversation
🦋 Changeset detectedLatest commit: 6c203b6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
PricingTable and Checkout componentsUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| public async confirm(params?: ConfirmCheckoutParams): Promise<this> { | ||
| const json = ( | ||
| await BaseResource._fetch<CommerceCheckoutJSON>({ | ||
| path: `/me/commerce/checkouts/${this.id}/confirm`, | ||
| method: 'PATCH', | ||
| body: { paymentSourceId: params?.paymentSourceId } as any, | ||
| }) | ||
| )?.response as unknown as CommerceCheckoutJSON; | ||
| return this.fromJSON(json); | ||
| } |
There was a problem hiding this comment.
Since we are returning back the same resource we use the abstracted this._basePath() example here.
Also I'd expect the send a POST request to /confirm instead of PATCH, can you clarify here ?
There was a problem hiding this comment.
PATCH since we're updating an existing checkout record
There was a problem hiding this comment.
If PATCH, should the path be /me/commerce/checkouts/${this.id} ? Same as all other prepare and attempt endpoints that update an existing resource.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Description
Adds the basics for the new Commerce-related work, including two new components
<PricingTable />and<Checkout />(only PricingTable is mountable for now). Also includes the newcommerceandcommerce.billingnamespaces on the Clerk singleton.I've done my best to
__experimental_-ify as much as I thought to, though I'm sure there are places and things I'm not considering.The component work is not finished, but we want to get this behind flags and PR-ed as it is already getting quite large and contains a fair amount of new work. Some of known remaining work before taking live include
In order to actually see the PricingTable in action, you'll need to connect to Stripe in the Dashboard (behind staff mode / app router) (Configure > Commerce > Settings) and create Commerce Plans (Configure > Commerce > Plans).
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change