Skip to content

Tutorials

Learn how to integrate Paylent into your applications with these hands-on tutorials. Each one walks through a complete working example — from configuring your environment in the dashboard to running the app and logging in.

TutorialWhat you’ll buildStack
Hono OIDCWeb app with OIDC login using middlewareHono + @hono/oidc-auth
Client & APIThird-party client with a protected resource APIHono + PKCE + JWKS
CLI AuthCLI tool that authenticates via the browserNode.js + PKCE
React + Better AuthReact SPA with session managementReact + Better Auth + Hono

All tutorials assume you have:

  • Paylent running locally (mix phx.server)
  • Node.js 18+ and npm (or Bun)
  • The example seed data loaded (see below)

The examples share a seed script that creates an account, environment, test user, and pre-configured OAuth clients:

Terminal window
# From the Paylent project root
mix run priv/repo/seeds_examples.exs

This creates:

  • Environment: examples-dev (accessible at http://examples-dev.localhost:4000)
  • Test user: [email protected] / password
  • OAuth clients: One per tutorial, with fixed credentials already in each example’s .env file

After seeding, every example is ready to run without any manual configuration.