Add the route adapter
Install the adapter and its schema dependency:- npm
- yarn
- pnpm
- bun
Terminal
Route buyers into checkout
ExportCheckout as an App Router GET handler. It creates the session and manages the browser transition.
checkout/route.ts
Inputs accepted by the checkout route
For example,
?products=123&customerExternalId=user_42 selects a product and ties the session to your application identity.
Give customers a portal route
Resolve the signed-in user to a Ruba customer ID, then let the handler create the portal transition.portal/route.ts
Verify webhook delivery
ExposeWebhooks as POST. The adapter verifies the incoming signature before handing your code a typed payload.
api/webhook/ruba/route.ts
Choose callback granularity
UseonPayload as a catch-all or register callbacks around the domain your application owns: