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

# Getting Started

> This guide covers running the Stellar Disbursement Platform locally, sending a sample disbursement, and claiming it through the demo wallet on Testnet.

This guide covers running the Stellar Disbursement Platform locally, sending a sample disbursement, and claiming it through the demo wallet on Testnet. Treat this walkthrough as a learning environment rather than the path for production deployments.

### Prerequisites

* **Docker:** Make sure you have Docker installed on your system. If not, you can download it from [here](https://www.docker.com/products/docker-desktop) and start it once installed.
* **Git:** You will need Git to clone the repository. You can download it from [here](https://git-scm.com/downloads).
* **Go:** Required to generate your environment file. Install from [here](https://golang.org/dl).
* **jq:** Useful for optional scripts and diagnostics. You can download it from [here](https://jqlang.org/download)

For macOS, Linux, you can install with Homebrew:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
brew install --cask docker
brew install git go jq
```

### Clone the repository

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
git clone https://github.com/stellar/stellar-disbursement-platform-backend.git
cd stellar-disbursement-platform-backend
```

### Run the wizard

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
make setup
```

At the prompts, choose according to below. The wizard generates and funds the SEP-10 signer and distribution accounts (testnet), starts Docker, and prints tenant credentials.

```
? Select an existing run configuration or create new:
▸ Create new configuration
✔ Setup name (optional): <sdp-setup-name>
? Select network:
▸ testnet
? Select tenant mode:
▸ single-tenant
? Account setup:
▸ Generate new accounts
? Launch local environment now (project=sdp-sdp-test, setup=<sdp-setup-name>)? [Y/n] Y
? Initialize tenants and users? [y/N] Y
```

After completion you should see:

```
🎉🎉🎉🎉 SUCCESS! 🎉🎉🎉🎉
Single tenant mode - Login URL:
🔗Default tenant: http://localhost:3000
  username: owner@default.local  password: Password123!
```

### Log into the SDP

Open [http://localhost:3000](http://localhost:3000) and log in using the admin credentials generated by the setup wizard (organization: default). ![Login](https://mintcdn.com/stellardevelopmentfoundation/1iVxlvEjme-PeN5h/assets/SDP/SDP32.png?fit=max\&auto=format\&n=1iVxlvEjme-PeN5h\&q=85\&s=11e0fb75dfa3b86e6fe45b4d3420b145)

### Send a test disbursement

Click `New Disbursement +` on the dashboard; you’ll see a funded default distribution account ready to use:

* Choose phone number as the Registration Contact Type. This is the channel recipients will use to receive messages.
* Select XLM as the asset to disburse.
* Pick Demo Wallet as the recipient wallet.
* Choose Date of Birth as the verification method; recipients will enter it to confirm their identity.
* Give disbursement a name. ![Disbursement Details](https://mintcdn.com/stellardevelopmentfoundation/tVnwkp5PnLq75MWG/assets/SDP/SDP33.png?fit=max\&auto=format\&n=tVnwkp5PnLq75MWG\&q=85\&s=3ae1b184a1bef53f0aa598e41e7073da)

Create and Upload a Disbursement File:

* Download the sample via `Download CSV Template`; it includes all required columns.
* Update the placeholder/invalid phone numbers before using it.
* The verification column holds the identity data recipients must match. ![Disbursement CSV](https://mintcdn.com/stellardevelopmentfoundation/tVnwkp5PnLq75MWG/assets/SDP/SDP34.png?fit=max\&auto=format\&n=tVnwkp5PnLq75MWG\&q=85\&s=bbfe84a14a777f32a5304c692b45a258)

Click the Review button. When you are ready to start the disbursement, click the "Confirm disbursement" button. In Disbursement Details you’ll see the payment in `Ready` status, meaning the receiver has yet to accept the invitation and payment. ![Disbursement Dashboard](https://mintcdn.com/stellardevelopmentfoundation/tVnwkp5PnLq75MWG/assets/SDP/SDP35.png?fit=max\&auto=format\&n=tVnwkp5PnLq75MWG\&q=85\&s=9e50be158dcda15dd41ddc05e3a3b0da)

### Receive Payment

> [!NOTE]
>
> This section shows the Testnet-only Demo Wallet flow so you can observe the receiver experience while running SDP locally. For production or real wallet integrations, follow the guidance in [Making Your Wallet SDP-Ready](https://developers.stellar.org/docs/platforms/stellar-disbursement-platform/admin-guide/making-your-wallet-sdp-ready.md).

Claim the payment in the demo wallet by first creating a wallet:

* Open the demo wallet: [http://localhost:4000](http://localhost:4000).
* Click `Generate Keypair for new account` to create a keypair; save the public and secret keys if you plan to reuse the account.
* Click `Create account` to create the account on the Stellar testnet (the account starts with 10,000 XLM). ![Demo Wallet Creation](https://mintcdn.com/stellardevelopmentfoundation/1iVxlvEjme-PeN5h/assets/SDP/SDP36.png?fit=max\&auto=format\&n=1iVxlvEjme-PeN5h\&q=85\&s=c127a56a9e38af8ec5836935674f239d)

To receive your payment, initialize a SEP-24 deposit:

* Under Asset XLM, click `Add Home Domain`, enter `localhost:8000`, and click `Override`.
* In the `Select action` dropdown, choose `SEP-24 Deposit`, then click `Start`. ![SEP-24 Deposit](https://mintcdn.com/stellardevelopmentfoundation/1iVxlvEjme-PeN5h/assets/SDP/SDP37.png?fit=max\&auto=format\&n=1iVxlvEjme-PeN5h\&q=85\&s=e5e532827c31b37a344223fb97a0b7cd)

Verify your identity:

* When prompted, enter the same phone number used in the disbursement CSV.
* Complete the OTP and Date of Birth verification. The OTP appears in the `sdp-api` container logs (e.g., “Here is the 6-digit verification code you requested ...”). ![OTP Code](https://mintcdn.com/stellardevelopmentfoundation/1iVxlvEjme-PeN5h/assets/SDP/SDP38.png?fit=max\&auto=format\&n=1iVxlvEjme-PeN5h\&q=85\&s=9786f4bb704e2a0694852d62eed013cf) ![PII Verification](https://mintcdn.com/stellardevelopmentfoundation/1iVxlvEjme-PeN5h/assets/SDP/SDP39.png?fit=max\&auto=format\&n=1iVxlvEjme-PeN5h\&q=85\&s=99b81d6f7f11341277db746d9cfcc947)

### Monitoring

* In the SDP dashboard, the payment moves from `Ready` to `PENDING` during the wallet flow, then to `Success` when funds are deposited. ![SDP Dashboard](https://mintcdn.com/stellardevelopmentfoundation/tVnwkp5PnLq75MWG/assets/SDP/SDP40.png?fit=max\&auto=format\&n=tVnwkp5PnLq75MWG\&q=85\&s=fabaa377eef51e2db12fcd35f5319f97)

* In the demo wallet, the balance updates to reflect the new amount. ![Demo Wallet Balance](https://mintcdn.com/stellardevelopmentfoundation/tVnwkp5PnLq75MWG/assets/SDP/SDP41.png?fit=max\&auto=format\&n=tVnwkp5PnLq75MWG\&q=85\&s=79dc922444d1a638574966b1781aebce)
