> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cello.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Cello + Replit integration

> How to add user referrals to your app using Cello with Replit

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.

<img className="w-full rounded-xl" src="https://mintcdn.com/cello/BQTZMO-jgvpA9pM3/coding-apps/replit_cello.png?fit=max&auto=format&n=BQTZMO-jgvpA9pM3&q=85&s=afac8c690b472ed300980e533b79ae5a" alt="Cello + Replit integration" width="1957" height="1104" data-path="coding-apps/replit_cello.png" />

## 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.

<Note>
  Make sure to use Cello **Sandbox environment** when developing and testing
</Note>

## Cello user referrals integration (Coding-agent flow)

<Note>
  For a step-by-step technical implementation (source of truth + acceptance criteria), follow the detailed guide:

  * [React + Node.js Integration Guide](/resources/react-nodejs-integration)

  The guide uses React + Node.js as an example, but it can be any other combination - the steps stay the same.
</Note>

<Steps>
  <Step title="Step 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
  </Step>

  <Step title="Step 2">
    **Add Cello Webhook Endpoint to Stripe**

    * Get your webhook URL from [Cello Portal](https://portal.cello.so/integrations/webhooks)
    * 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](/integrations/webhooks/stripe-webhook#steps) for more details.
  </Step>

  <Step title="Step 3">
    **Prompt Replit Agent to add User Referrals to your app**

    Paste this prompt into Replit Agent (includes the detailed guide):

    ```text theme={null}
    I now want to add user referrals. I chose platform Cello for this.

    I added a Cello integration guide according to which you should do the implementation. parsed the documentation more carefully from the start rather than assuming standard patterns would work. create a thorough implementation plan based on guidance, patterns and AC from the provided guide. Don't skip any content, it is all relevant

    Guide: https://docs.cello.so/resources/react-nodejs-integration
    ```

    Replit Agent asks you guiding questions and creates an implementation plan based on your answers.
  </Step>

  <Step title="Step 4">
    **Confirm executing the plan**

    Review the plan carefully. If it looks correct, tell Replit Agent to proceed and start implementing it.
  </Step>

  <Step title="Step 5">
    **Publish & Test**

    Run your app and test the end-to-end flow. If everything was implemented correctly, you should see events coming in to [Cello Dashboard](https://portal.cello.so/dashboard/referrer).
  </Step>
</Steps>
