stripe
Introduction
Replit offers a native integration with Stripe that allows users to implement payments in their applications
Prerequisites
-
These packages must be installed in the workspace root package.json:
stripe- Official Stripe SDK for API operationsstripe-replit-sync- Handles webhook processing and database sync. Documentation: https://www.npmjs.com/package/stripe-replit-sync
Do not install them in any workspace package. If they are not installed, use pnpm to install them via the following command:
$ cd /home/runner/workspace && pnpm add -w <packages> -
The Stripe integration must be connected to the repl. You can do this by proposing the integration. Reference the
integrationsskill if necessary. Once connected, createstripeClient.tsusing the template from the code-templates reference -- this file fetches Stripe credentials from the Replit connection API and provides the authenticated client viagetUncachableStripeClient().Create it in both the API server directory and the scripts directory.