X
DocsNext.js

Next.js

Install and configure PayKit for Next.js.

Install with shadcn

Add a PayKit block for Next.js:


Manual Setup

Create a provider entry that exports a PayKit instance and generated endpoints



Next.js catch-all route. This forwards calls to the generated handlers.


Webhook route. This validates and dispatches events.


Client configuration

Provide baseUrl and headers to the provider entry: