Skip to main content
Replit Agent can implement Cello user referrals end-to-end if you give it the right guide and force it to create a plan before coding. Cello + Replit integration

Prerequisites

Before integrating Cello, ensure the following prerequisites are met:
  • Signup and authentication flow with a database to store user records is functional
  • Stripe subscription flow is functional
  • You have a Cello account and API keys at hand.
You can integrate directly on production - your account stays in pre-launch phase until you launch, so all events are recorded as test data and nothing is paid out. A sandbox is optional if you prefer a separate environment.

Connect the Cello MCP

Connect the Cello MCP server before you start. It gives Replit direct access to Cello’s documentation, your integration status, your incoming events, and best-practice recommendations, so Replit can look up the right docs itself, verify your setup as it goes, and follow best practices automatically instead of relying only on the guide link you paste. Open My account → MCP Server in the Cello Portal, turn the server on, and use the one-click connect for your tool - or the generic option if it doesn’t have its own card yet. There’s no token to generate or paste. See Connect your client for more detail.

Cello user referrals integration (Coding-agent flow)

For a step-by-step technical implementation (source of truth + acceptance criteria), follow the detailed guide:The guide uses React + Node.js as an example, but it can be any other combination - the steps stay the same.
1

Prep your project

  • Signup and authentication flow with a database to store user records is functional
  • Stripe subscription flow is functional
  • Cello API keys are handy
2

Add Cello Webhook Endpoint to Stripe

  • Get your webhook URL from Cello Portal
  • Add a Webhook endpoint in Stripe (Log into your Stripe Dashboard -> Go to Developer Mode -> Add a Webhook endpoint and enter endpoint URL -> Select the events to send -> Click “Add endpoint”)
  • Secure the Webhook with “Signing secret”
Events to send:
  • charge.refunded, charge.succeeded, charge.updated
  • customer.created, customer.deleted, customer.updated
  • customer.subscription.created, customer.subscription.deleted, customer.subscription.updated
  • invoice.paid
See Stripe Webhook Integration for more details.
3

Prompt Replit Agent to add User Referrals to your app

Paste this prompt into Replit Agent:
Replit Agent pulls the relevant guides, checks what’s already set up, and tailors the plan to your project, asking you guiding questions before it writes any code.
Paste the guide URL instead. Replit Agent gets the documentation, but no integration status and no event inspection, so you’ll have to verify the integration yourself.
4

Confirm executing the plan

Review the plan carefully. It should cover:
  • Cello JS SDK initialization and user authentication
  • Referral component placement and configuration
  • Attribution setup for tracking referred signups
  • Stripe webhook integration for conversion tracking
If it looks correct, tell Replit Agent to proceed and start implementing it.
5

Verify each component as you go

Don’t wait until the end. As Replit Agent finishes each part, ask it to check that part before moving on:“Use Cello to check my integration status - is the attribution library connected yet?”The four things the plan covers are the same four the health check reports on, and the same four you’ll test later in the pre-launch testbook:Two things to expect, so a partial result doesn’t look like a failure:
  • All four components are reported every time. The ones you haven’t built yet read Not connected, which is correct at this stage. Only judge the one you just finished.
  • Status lags behind your code. A component turns Connected once a successful event reaches Cello within the health window, which can take up to ~10 minutes. Re-check before concluding anything is broken.
If a component comes back with a warning, ask for the events behind it. The health check tells you which component is failing; the events tell you why:“Show me my recent Cello events and tell me which fields are failing validation.”
6

Work through the pre-launch testbook

The Pre-launch Testbook covers the manual, front-end checks no automated tool can see for you: whether the referral component sits well in your UI, whether the new-user banner reads correctly, and whether the discount math is right on both monthly and yearly plans.Replit Agent can fetch it and walk you through it, because the testbook is part of the documentation the Cello MCP server searches:“Pull the Cello pre-launch testbook and walk me through the signup tracking section.”

Pre-launch Testbook

7

Publish & Test

Run your app and test the end-to-end flow. If everything was implemented correctly, you should see events coming in to the Cello Dashboard, marked as testing until you launch your program.Events reach Developers → Events within a few minutes, but dashboards refresh hourly - see when each surface updates before assuming something is missing.

After you’re live

If you have the Cello MCP connected, it continues to be useful after the initial integration: