Payments
Tutorial
SaaS

Build Your First Paid Product on Forte

Build a test SaaS journey on Forte with sign-in, Postgres, payments, and logs. Check what remains before a live launch.

Forte TeamPublished June 3, 2026Updated November 15, 20267 min read

A paid application needs a complete path from sign-in to purchase to the work the customer bought. Deploying its frontend is a start, but a buyer also needs their saved work to survive a restart, their payment to grant the right access, and their records to stay private from other customers.

This walkthrough follows that path on Forte with a Next.js frontend, a Node.js API, and Postgres. Use a test copy first so failures don't involve real charges or customer records. The work may fit into a short session when the code is already in place, but this is not a measured launch-time claim. Existing code, account approvals, and the checks your application needs determine the schedule.

Start in a Project that cannot take live payments

The Forte Examples repository includes a Next.js and Node example that stores Postgres records for each user. Pin the commit you evaluate and inspect what it implements. A useful starting application still needs to be checked against your own payment and access rules.

Create a Sandbox Project for the test resources. Sandbox payments use Stripe test mode, and a Project's mode cannot be changed later. Plan for a separate live Project rather than expecting to convert this one when testing is finished.

Connect the repository through the Forte GitHub App and push the branch you want deployed. Forte builds from GitHub. If the API and frontend share packages in a monorepo, both builds need access to the files they import.

Establish the deployed connection before adding the domain

Create a Service for the API's repository and branch. Forte can use its Dockerfile or detect the build and health-check settings from the code. Supply an HTTP GET health route that reports whether the API can serve requests, and inspect build output when detection needs help.

After a successful build and health check, open the Service's generated HTTPS address and call a safe route. This separates deployment problems from later frontend or domain configuration. If it fails, the deployment view helps distinguish an image that couldn't build from a process that started but failed its health check.

Pushes to the configured branch normally start subsequent builds and rollouts. Port, runtime, or folder-layout changes may require resetting detected settings. Deploying Services covers the procedure.

Deploy the frontend as a Website using the static or server-rendered flow appropriate to the application. Give it the Service address and inspect a request from the deployed site. That establishes which API the browser is actually calling; a page loading successfully doesn't establish that its backend setting is correct. Follow Deploying Websites for that resource.

Forte project overview listing Services and Websites with their addresses and status.
Check each deployed resource and its generated address before connecting the full journey.

A signed-in user still needs record-level access rules

Configure sign-in in the same Forte Project as the API and build against the documented flow. Forte supports Google OAuth, password login, and email or SMS one-time codes, with optional MFA. Email, phone, and password login require approved compliance registration. Email also requires the documented verified SES domain, and phone requires complete SMS registration. Google OAuth is exempt from that approval gate. These requirements affect which method you can test first; the authentication documentation describes them.

For protected Service paths, Forte checks the session and supplies the user identity to the backend. Your API still decides which records that user may read or change. Save a user or workspace owner on every project, and include that ownership condition in the database query.

Create two synthetic customers, save a project for each, and request one customer's project while signed in as the other. Changing the ID in an API request should not bypass the ownership rule. Test updates and deletes across accounts too when those operations exist.

Websites, including server-rendered Websites, bypass the Service gateway. They don't receive automatic Forte user checks or X-Forte-User-Id. Put protected business operations in the Service and enforce any permissions needed in Website code. Keep FORTE_API_TOKEN out of browser code.

Store something, then prove it survives the process

Create Postgres in the Project and connect it to the API Service. Forte manages the connection credentials and injects the selected settings. Your database driver still has to read the injected variable names and understand the connection-string format.

Forte database connection showing the connected API Service and injected variable names, with secret values hidden.
Match the injected settings to the names and format the API uses.

Apply the schema through one planned migration step. Then create a project through the API, read it back, redeploy the Service, and open the same record again. That last read establishes that this path uses persistent database storage rather than data held only by the application process.

Forte Postgres is in Open Beta. Shared-tier storage runs from 1 to 10 GB, with documented pooling, connection, and query limits. Review pool settings before increasing API instances because each instance can add connection demand. Dedicated Postgres with point-in-time restore is in Closed Alpha and requires approved access.

Shared databases have daily backups and restore through Support. Before storing customer work you cannot replace, decide how much data loss and downtime are acceptable and rehearse a safe restore. The selected tier's path is documented in managed database operations.

For a one-time report pack, use a read-only payment preview while the customer reviews the quantity and total. When they proceed, create the Payment once and save its ID on the application's order. A repeated click should find that same business attempt rather than quietly creating a separate purchase.

The payment guide covers Stripe Elements confirmation and the returned connected-account settings. The interaction below uses simulated data, so it illustrates the request without being a test of your Project.

Explore a payment request

This interaction uses simulated data. Follow the payment guide and Stripe test methods when using a real Sandbox Project.

Charge a customer

Customeruser_abc123
Card•••• 4242
Amount$29.00
Forte Sandbox payment detail showing a completed test payment, its amount, associated user, and Stripe PaymentIntent.
Use the payment record to check the test charge and its link to the buyer.

Connect a payment trigger to the Service that grants the report pack. The browser can close after payment, so the grant needs to complete without relying on the buyer remaining on the success page. Verify the trigger source using the documented rule before saving what the purchase permits. Deliver the notice again and confirm that the purchase still grants one pack.

Use the Subscriptions API for a monthly plan. If the first charge combines a plan with one-time items, use Checkout. The subscription guide and Checkout guide describe those distinct flows. Your application owns what paid customers may do in all of them.

Live payments require approved compliance registration. Review fees, tax behavior, payout setup, and merchant responsibilities before accepting real money. A successful Sandbox charge doesn't complete those live requirements.

Make failures observable before a buyer finds them

In the Sandbox Service, create a test route that emits its request ID and deliberately returns a 500. Call it with made-up input, open the failed request, and follow its ID to the application output. The exercise establishes a usable investigation path without copying private data into the test.

Service request-body capture is on by default in Sandbox and off by default in live Projects. Decide what a captured body could contain before enabling it in live use. Website traffic doesn't produce these same Service request logs or metrics.

Rehearse a failed deployment on a test branch too. Find the health failure and establish how you would deploy a known working release. The older application's ability to read the current schema matters: deploying old code cannot reverse an incompatible data change.

If report work needs a schedule, Actions Open Beta can call a Service, but the Service must finish that work inside the request within 120 seconds. Services receive no CPU between requests. A timer or job left running after the response therefore isn't a reliable completion plan; persistent-worker work needs a separate design. See Forte Actions.

Carry the tested behavior into the live setup

Keep the release IDs and results for sign-in, persistent storage, payment, and use of the paid feature. Repeat a payment notice, try a failed purchase, and verify that a second customer cannot use the first customer's project or order. An unfinished case should remain visible rather than disappear behind a successful deployment.

Before inviting a buyer, review domains, capacity, recovery, approvals, alerts, and support ownership. Configure the live Project separately and establish that each resource points to its live partner. The quickstart supplies deployment steps, and the production readiness checklist helps turn the remaining gaps into concrete checks. The useful launch milestone is a tested customer journey with an operator who can recover it.

Build the first customer journey

Deploy a test app, save a record, and connect a payment to the feature it buys.

Start building on Forte
From Vibe-Coded Prototype to Production with Forte
AI Development
Security
Production

From Vibe-Coded Prototype to Production with Forte

Take an AI-built app beyond a working demo. Test customer access, saved data, payments, background jobs, and how to find failures on Forte.

6 min read
How to Find the Logs for a Failed Request on Forte
Observability
AWS
Debugging

How to Find the Logs for a Failed Request on Forte

Find a failed customer request, follow its request ID into app logs, and check the fix. Learn where CloudWatch and broader tracing tools fit.

5 min read
SaaS Payments on Forte: From Checkout to Customer Access
Payments
Operations

SaaS Payments on Forte: From Checkout to Customer Access

Follow a Forte purchase from price preview to payment and paid access. Learn how to handle retries, refunds, and missed events.

6 min read