Skip to main content
This example demonstrates a full integration flow: initializing the client, creating a customer, and starting a subscription.

Prerequisites

  • Node.js v14+
  • No SDK required — this example uses the CrediBill HTTP API via server-side requests (App Router)

Full Script (API-first)

Usage (server-side only): POST JSON to /api/demo/create-customer with body: Usage (server-side only): POST JSON to /api/demo/create-customer with body:
Notes:
  • Prefer calling the CrediBill API from your server (App Router or serverless functions) so secret keys remain confidential.
  • For frontend data fetching patterns, see the React + TanStack Query examples in other guides.