{"id":18417435,"url":"https://github.com/stellar/stellar-disbursement-platform-backend","last_synced_at":"2026-02-27T01:08:41.030Z","repository":{"id":188343329,"uuid":"678483576","full_name":"stellar/stellar-disbursement-platform-backend","owner":"stellar","description":"Stellar Disbursement Platform Backend","archived":false,"fork":false,"pushed_at":"2026-02-24T02:17:17.000Z","size":32336,"stargazers_count":54,"open_issues_count":6,"forks_count":45,"subscribers_count":20,"default_branch":"develop","last_synced_at":"2026-02-24T05:03:48.663Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stellar.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-08-14T16:49:54.000Z","updated_at":"2026-02-24T01:29:15.000Z","dependencies_parsed_at":"2023-11-20T14:30:55.267Z","dependency_job_id":"a994d556-ab8b-4941-9efb-e54b83856177","html_url":"https://github.com/stellar/stellar-disbursement-platform-backend","commit_stats":null,"previous_names":["stellar/stellar-disbursement-platform-backend"],"tags_count":39,"template":false,"template_full_name":null,"purl":"pkg:github/stellar/stellar-disbursement-platform-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fstellar-disbursement-platform-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fstellar-disbursement-platform-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fstellar-disbursement-platform-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fstellar-disbursement-platform-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stellar","download_url":"https://codeload.github.com/stellar/stellar-disbursement-platform-backend/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fstellar-disbursement-platform-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29879968,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"ssl_error","status_checked_at":"2026-02-26T23:50:46.793Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T04:09:26.251Z","updated_at":"2026-02-27T01:08:41.020Z","avatar_url":"https://github.com/stellar.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stellar Disbursement Platform Backend\n\n[![Swagger Documentation](https://img.shields.io/badge/docs-swagger-blue?logo=swagger)](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/stellar/stellar-docs/refs/heads/main/openapi/stellar-disbursement-platform/bundled.yaml)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/stellar/stellar-disbursement-platform-backend)\n[![Stellar Docs](https://img.shields.io/badge/docs-stellar.org-blue?logo=stellar)](https://developers.stellar.org/docs/platforms/stellar-disbursement-platform)\n[![CI](https://img.shields.io/github/check-runs/stellar/stellar-disbursement-platform-backend/develop?logo=github\u0026label=CI)](https://github.com/stellar/stellar-disbursement-platform-backend/actions/workflows/docker_image_public_release.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/stellar/stellar-disbursement-platform-backend)](https://goreportcard.com/report/github.com/stellar/stellar-disbursement-platform-backend)\n[![GitHub](https://img.shields.io/github/license/stellar/stellar-disbursement-platform-backend)](https://github.com/stellar/stellar-disbursement-platform-backend/blob/main/LICENSE)\n[![Docker Pulls](https://img.shields.io/docker/pulls/stellar/stellar-disbursement-platform-backend?logo=docker)](https://hub.docker.com/r/stellar/stellar-disbursement-platform-backend/tags)\n[![Release](https://img.shields.io/github/release/stellar/stellar-disbursement-platform-backend.svg)](https://github.com/stellar/stellar-disbursement-platform-backend/releases/latest)\n\n\u003e Note: you can find a more thorough and user-friendly documentation of this project at [Stellar Docs](https://docs.stellar.org/category/use-the-stellar-disbursement-platform).\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Install](#install)\n- [Quick Start](#quick-start)\n- [Architecture](#architecture)\n  - [Core](#core)\n  - [Transaction Submission Service](#transaction-submission-service)\n  - [Database](#database)\n- [Wallets](#wallets)\n- [Contributors](#contributors)\n  - [State Transitions](#state-transitions)\n\n\u003e [!NOTE]\n\u003e If you are using version 1.x.x, we highly recommend upgrading to version 2.x.x to benefit from the latest features, routine fixes, and security patches.\n\u003e For detailed instructions on how to upgrade, please refer to [the upgrade guide](https://developers.stellar.org/docs/platforms/stellar-disbursement-platform/admin-guide/single-tenant-to-multi-tenant-migration).\n\n## Introduction\n\nThe Stellar Disbursement Platform (SDP) enables organizations to disburse bulk payments to recipients using Stellar.\n\nThroughout this documentation, we'll define \"users\" as members of the organization using the SDP to make payments, while defining \"recipients\" as those receiving payments.\n\n## Install\n\nInstall golang and make sure `$GOPATH/bin` is in your `$PATH`. Then run the following.\n\n``` sh\ngit clone git@github.com:stellar/stellar-disbursement-platform-backend.git\ncd stellar-disbursement-platform-backend\nmake go-install\nstellar-disbursement-platform --help\n```\n\n## Quick Start\n\n### Docker Compose\n\nTo quickly test the SDP using preconfigured values, use the startup wizard.\n\n```sh\nmake setup\n```\n\nFor more information about launching and configuring the SDP, see the [Quick Start Guide](./dev/README.md).\n\n### Helm\n\nTo deploy the SDP using Helm, see the [Helm Chart](./helmchart/sdp/README.md).\n\n## Secure Operation Manual\n\nThis manual outlines the security measures implemented in the Stellar Disbursement Platform (SDP) to protect the integrity of the platform and its users. By adhering to these guidelines, you can ensure that your use of the SDP is as secure as possible.\n\nSecurity is a critical aspect of the SDP. The measures outlined in this document are designed to mitigate risks and enhance the security of the platform. Users are strongly encouraged to follow these guidelines to protect their accounts and operations.\n\n### Implementation of reCAPTCHA\n\nGoogle's reCAPTCHA has been integrated into the SDP to prevent automated attacks and ensure that interactions are performed by humans, not bots.\n\n\nReCAPTCHA can be configured at two levels:\n1. **Environment level (default)**: Set the `DISABLE_RECAPTCHA` environment variable to `true` to disable for all tenants\n2. **Organization level**: Each tenant can override the environment default through the organization settings (via API or UI)\n\nThe SDP supports both reCAPTCHA v2 (\"I'm not a robot\") and reCAPTCHA v3 (invisible, score-based) implementations:\n\n- **reCAPTCHA v2**: Traditional checkbox-based verification\n- **reCAPTCHA v3**: Invisible verification that returns a score (0.0 to 1.0) indicating the likelihood of human interaction\n\n#### Configuration\n\n- **CAPTCHA_TYPE**: Specifies the type of CAPTCHA to use. Options: `GOOGLE_RECAPTCHA_V2` (default) or `GOOGLE_RECAPTCHA_V3`\n- **RECAPTCHA_SITE_KEY**: The Google reCAPTCHA site key\n- **RECAPTCHA_SITE_SECRET_KEY**: The Google reCAPTCHA site secret key\n- **RECAPTCHA_V3_MIN_SCORE**: Minimum score threshold for reCAPTCHA v3 (0.0 to 1.0, default: 0.5). Only used when CAPTCHA_TYPE is `GOOGLE_RECAPTCHA_V3`\n- **DISABLE_RECAPTCHA**: Set to `true` to disable reCAPTCHA entirely\n\nReCAPTCHA is enabled by default and can be disabled in the development environment by setting the `DISABLE_RECAPTCHA` environment variable to `true`.\n\nThe organization-level setting takes precedence over the environment default when explicitly set. If not set at the organization level, the environment default is used.\n\n**Note:** Disabling reCAPTCHA is supported for pubnet environments but this might reduce security!\n\n### Enforcement of Multi-Factor Authentication\n\nMulti-Factor Authentication (MFA) provides an additional layer of security to user accounts. It is enforced by default on the SDP and it relies on OTPs sent to the account's email.\n\nMFA can be configured at two levels:\n1. **Environment level (default)**: Set the `DISABLE_MFA` environment variable to `true` to disable for all tenants\n2. **Organization level**: Each tenant can override the environment default through the organization settings (via API or UI)\n\nThe organization-level setting takes precedence over the environment default when explicitly set. If not set at the organization level, the environment default is used.\n\n**Note:** Disabling MFA is not recommended for production environments due to security risks.\n\n### Best Practices for Wallet Management\n\nThe SDP wallet should be used primarily as a hot wallet with a limited amount of funds to minimize potential losses.\n\n#### Hot and Cold Wallets\n\n- A hot wallet is connected to the internet and allows for quick transactions.\n- A cold wallet is offline and used for storing funds securely.\n- Learn more about these concepts at [Investopedia](https://www.investopedia.com/hot-wallet-vs-cold-wallet-7098461).\n\n### Distribution of Disbursement Responsibilities\n\nTo enhance security, disbursement responsibilities should be distributed among multiple financial controller users.\n\n#### Recommended Configuration\n\n1. **Approval Flow**: Enable the approval flow on the organization page to require two users for the disbursement process. The owner can do that at *Profile \u003e Organization \u003e ... \u003e Edit details \u003e Approval flow \u003e Confirm*.\n2. **Financial Controller Role**: Create two users with the *Financial Controller* role on the organization page to enforce separation of duties. The owner can do hat at *Settings \u003e Team Members*.\n3. **Owner Account Management**: Use the Owner account solely for user management and organization configuration. Avoid using the Owner account for financial controller tasks to minimize the exposure of that account.\n\n## Architecture\n\n![high_level_architecture](./docs/images/multi-tenant-architecture.png)\n\nThe [SDP Dashboard][sdp-dashboard] components are separate projects that must be installed and configured alongside the services included in this project.\n\nIn a future iteration of this project, the Transaction Submission Service (TSS) will also be moved to its own repository to be used as an independent service. At that point, this project will include the services contained in the Core module shown in the diagram above.\n\n### SEP10 and SEP24 Implementation\n\nThe SDP now includes native implementations of Stellar Enhancement Proposals SEP10 and SEP24, providing wallet authentication and interactive deposit flows without requiring external Anchor Platform integration.\n\n#### SEP10 Authentication\n\nSEP10 provides a secure way for wallets to authenticate with the SDP using Stellar transactions. The implementation includes:\n\n- **Challenge Generation**: Creates cryptographically secure challenge transactions\n- **Transaction Validation**: Validates signed challenge transactions from wallets\n- **JWT Token Generation**: Issues JWT tokens for authenticated sessions\n- **Multi-tenant Support**: Handles authentication across different tenant domains\n- **Client Domain Verification**: Validates client domain signatures for enhanced security\n\n**Endpoints:**\n- `GET /auth` - Generate authentication challenge\n- `POST /auth` - Validate challenge and receive JWT token\n\n#### SEP24 Interactive Deposit Flow\n\nSEP24 enables interactive deposit flows for wallet registration and payment processing:\n\n- **Interactive Registration**: Guides users through wallet registration process\n- **OTP Verification**: Handles one-time password verification for recipients\n- **Transaction Status Tracking**: Monitors deposit transaction status\n- **Multi-language Support**: Supports multiple languages for the registration UI\n- **JWT-based Security**: Uses JWT tokens for secure transaction handling\n\n**Endpoints:**\n- `GET /sep24/info` - Get supported assets and capabilities\n- `POST /sep24/transactions/deposit/interactive` - Initiate interactive deposit\n- `GET /sep24/transactions` - Get transaction status\n- `/wallet-registration/start` - Interactive registration UI\n\n#### Configuration\n\nThe SEP10/SEP24 implementation can be configured using the following environment variables:\n\n```bash\n# SEP10 Configuration\nSEP10_SIGNING_PUBLIC_KEY=G...  # Public key for SEP10 signing\nSEP10_SIGNING_PRIVATE_KEY=S... # Private key for SEP10 signing\n\n# SEP24 Configuration\nSEP24_JWT_SECRET=jwt_secret_... # JWT secret for SEP24 tokens\n```\n\nThe SDP serves its own SEP10/SEP24 endpoints and the `stellar.toml` file points to these native endpoints instead of external Anchor Platform URLs.\n\n#### Environment Variables\n\nThe following environment variables are required for SEP10/SEP24 functionality:\n\n**Required Variables:**\n- `SEP10_SIGNING_PUBLIC_KEY` - Public key for SEP10 challenge signing\n- `SEP10_SIGNING_PRIVATE_KEY` - Private key for SEP10 challenge signing\n- `SEP24_JWT_SECRET` - JWT secret for SEP24 token signing\n\n**Optional Variables:**\n- `BASE_URL` - Base URL for generating SEP endpoint URLs in stellar.toml\n\n**Development Setup:**\nThe `make_env.sh` script automatically generates SEP10 signing keys and creates the necessary `.env` file with proper configuration for development environments.\n\n### Core\n\nThe SDP Core service include several components started using a single command.\n\n```sh\nstellar-disbursement-platform serve --help\n```\n\n#### Admin API\n\nThe Admin API is the component responsible for managing tenants of the SDP. It runs by default on port 8003 and is used to provision new tenants and manage existing tenants.\n\n#### Dashboard API\n\nThe Dashboard API is the component responsible for enabling clients to interact with the SDP. The primary client is the [SDP Dashboard][sdp-dashboard], but other clients can use the API as well.\n\n##### Metrics\n\nThe Dashboard API component is also responsible for exporting system and application metrics. We only have support for `Prometheus` at the moment, but we can add new monitors clients in the future.\n\n#### Message Service\n\nThe Message Service sends messages to users and recipients for the following reasons:\n\n- Informing recipients they have an incoming disbursement and need to register\n- Providing one-time passcodes (OTPs) to recipients\n- Sending emails to users during account creation and account recovery flows\n\nNote that the Message Service requires that both SMS and email services are configured. For emails, AWS SES and Twilio Sendgrid are supported. For SMS messages to recipients, Twilio SMS, Twilio WhatsAPP and AWS SNS are supported.\n\nIf you're using the `AWS_EMAIL` or `TWILIO_EMAIL` sender types, you'll need to verify the email address you're using to send emails in order to prevent it from being flagged by email firewalls. You can do that by following the instructions in [this link for AWS SES](https://docs.aws.amazon.com/ses/latest/dg/email-authentication-methods.html) or [this link for Twilio Sendgrid](https://www.twilio.com/docs/sendgrid/glossary/sender-authentication).\n\n##### Configuring Twilio WhatsApp\n\nConfiguring Twilio WhatsApp requires additional steps beyond the standard Twilio SMS setup.\n\n**Prerequisites:**\n1. Set up a Twilio WhatsApp Business Profile and complete the approval process\n2. Create message templates in the Twilio Console for each type of message you plan to send\n3. Wait for template approval before using them in production\n\n**Message Templates Setup:**\n\nYou must create the following message templates in your Twilio Console and obtain their Template SIDs.\n\n1. **Receiver Invitation Template** (`TWILIO_WHATSAPP_RECEIVER_INVITATION_TEMPLATE_SID`)\n   - **Purpose**: Notify recipients about incoming disbursements\n   - **Variables**: `{{1}}` = Organization Name, `{{2}}` = Registration Link\n   - **Example**: \"You have a payment waiting for you from the {{1}}. Click {{2}} to register.\"\n\n2. **Receiver OTP Template** (`TWILIO_WHATSAPP_RECEIVER_OTP_TEMPLATE_SID`)\n   - **Purpose**: Send one-time passwords to recipients during wallet registration\n   - **Variables**: `{{1}}` = OTP Code, `{{2}}` = Organization Name\n   - **Example**: \"{{1}} is your {{2}} verification code.\"\n\n**Configuration:**\n\nSet the following environment variables:\n\n```sh\nSMS_SENDER_TYPE=TWILIO_WHATSAPP\nTWILIO_ACCOUNT_SID=your_twilio_account_sid\nTWILIO_AUTH_TOKEN=your_twilio_auth_token\nTWILIO_WHATSAPP_FROM_NUMBER=whatsapp:+1234567890\nTWILIO_WHATSAPP_RECEIVER_INVITATION_TEMPLATE_SID=HXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nTWILIO_WHATSAPP_RECEIVER_OTP_TEMPLATE_SID=HXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n```\n\n**Important Notes:**\n- The `TWILIO_WHATSAPP_FROM_NUMBER` must include the `whatsapp:` prefix and use your approved Twilio WhatsApp number\n- Template SIDs are obtained from the Twilio Console after template creation and approval\n- WhatsApp requires pre-approved message templates for all business-initiated conversations\n- Template variables are automatically populated by the SDP based on the message type\n- All templates must be approved by WhatsApp before they can be used in production\n- For detailed setup instructions, refer to the [Twilio WhatsApp API documentation](https://www.twilio.com/docs/whatsapp/api)\n\n#### Wallet Registration UI\n\nThe Wallet Registration UI is also hosted by the Core server, and enables recipients to confirm their phone number and other information used to verify their identity. Once recipients have registered through this UI, the Transaction Submission Server (TSS) immediately makes the payment to the recipients registered Stellar account.\n\n#### SEP10/SEP24 Endpoints\n\nThe Core service now includes native implementations of SEP10 and SEP24 protocols:\n\n- **SEP10 Authentication**: Provides secure wallet authentication using Stellar transactions\n- **SEP24 Interactive Deposits**: Handles interactive deposit flows for wallet registration\n- **Stellar.toml Generation**: Dynamically generates stellar.toml files with appropriate SEP endpoints\n- **Multi-tenant Support**: Supports SEP10/SEP24 across different tenant domains\n- **JWT Token Management**: Handles authentication tokens for secure API access\n\n### Transaction Submission Service\n\nRefer to documentation [here](/internal/transactionsubmission/README.md).\n\n#### Core + TSS Integration\n\nCurrently, Core and Transaction Submission Service (TSS) interact at the database layer, sharing the `submitter_transactions` table to read and write state. The interaction is as follows:\n\n1. Core inserts rows into the `submitter_transactions` table, queuing payments\n2. The TSS polls the `submitter_transactions` table, detecting payments\n3. For each payment detected, the TSS creates and submits a transaction to the Stellar network, monitoring its state until it is confirmed to have been included in a ledger or failed with a nonrecoverable error\n4. Core's Dashboard API reads from the `submitter_transactions` table on demand to fetch the state of each payment\n\nIn future iterations of the project, the Transaction Submission Service will provide an API for clients such as the SDP to use for queuing and polling the state of transactions.\n\n### Database\n\nTo manage the migrations of the database, use the `db` subcommand.\n\n####\n\n```sh\nstellar-disbursement-platform db --help\n```\n\n#### Admin Tables\n\n**Migration CMD**\n\n```sh\nstellar-disbursement-platform db admin migrate up\n```\n\nThe tables below are used to manage tenants and their configurations.\n\n![admin schema](./docs/images/admin_db_schema.png)\n\n#### Core Tables\n\n**Migration CMD**\n\nThe following command will migrate the tables used by the Core service for all tenants.\n\n```sh\nstellar-disbursement-platform db auth migrate up --all\nstellar-disbursement-platform db sdp migrate up --all\n```\n\nIt is also possible to migrate the tables for a specific tenant by using the `--tenant-id` flag.\n\n```sh\nstellar-disbursement-platform db auth migrate up --tenant-id=tenant_id\nstellar-disbursement-platform db sdp migrate up --tenant-id=tenant_id\n```\n\nThe tables below are used to facilitate disbursements.\n\n![core schema](./docs/images/core_db_schema.png)\n\nThe tables below are used to manage user roles and organizational information.\n\n![admin schema](./docs/images/auth_db_schema.png)\n\n#### TSS Tables\n\n**Migration CMD**\n\n```sh\nstellar-disbursement-platform db tss migrate up\n```\n\nThe tables below are shared by the transaction submission service and core service.\n\n![tss schema](./docs/images/tss_db_schema.png)\n\nNote that the `submitter_transactions` table is used by the TSS and will be managed by the service when moved to its own project.\n\n### Background jobs\nThe SDP uses Background jobs to handle asynchronous tasks.\n\n**1. Jobs**\n\n\u003e [!NOTE]\n\u003e Certain jobs are not listed here because they cannot be configured and are necessary to the functioning of the SDP.\n\n* `send_receiver_wallets_invitation_job`: This job is used to send disbursement invites to recipients. Its interval is configured through the `SCHEDULER_RECEIVER_INVITATION_JOB_SECONDS` environment variable.\n* `payment_to_submitter_job`: This job is used to submit payments from Core to the TSS. Its interval is configured through the `SCHEDULER_PAYMENT_JOB_SECONDS` environment variable.\n* `payment_from_submitter_job`: This job is used to notify Core that a payment has been completed. Its interval is configured through the `SCHEDULER_PAYMENT_JOB_SECONDS` environment variable.\n* `patch_anchor_platform_transactions_completion`: This job is used to patch transactions in Anchor Platform once payments reach the final state 'SUCCESS' or 'FAILED'. Its interval is configured through the `SCHEDULER_PAYMENT_JOB_SECONDS` environment variable.\n\n**2. Configuration**\n\nThe following environment variables can be used to configure the intervals of the jobs listed above.\n\n```sh\n  SCHEDULER_RECEIVER_INVITATION_JOB_SECONDS: # interval in seconds\n  SCHEDULER_PAYMENT_JOB_SECONDS: # interval in seconds\n```\n\n\u003e[!NOTE]\n\u003ePrior to version 3.7.0, background jobs were configured using ENABLE_SCHEDULER=true and EVENT_BROKER_TYPE=NONE.\n\u003eThis configuration has been deprecated in favor of using EVENT_BROKER_TYPE=SCHEDULER.\n\n### Database connection pool\n\nTune the per-tenant PostgreSQL connection pool with env vars (defaults shown):\n\n```sh\n# Maximum open connections per pool (default: 20)\nDB_MAX_OPEN_CONNS=20\n# Maximum idle connections retained (default: 2)\nDB_MAX_IDLE_CONNS=2\n# Close idle connections after N seconds (default: 10 seconds)\nDB_CONN_MAX_IDLE_TIME_SECONDS=10\n# Recycle connections after N seconds (default: 300 = 5 minutes)\nDB_CONN_MAX_LIFETIME_SECONDS=300\n```\n\nThese settings help prevent idle connection buildup across multi-tenant scheduler cycles, especially on constrained databases.\n\n## Wallets\n\nPlease check the [Making Your Wallet SDP-Ready](https://docs.stellar.org/stellar-disbursement-platform/making-your-wallet-sdp-ready) section of the Stellar Docs for more information on how to integrate your wallet with the SDP.\n\n## Contributors\n\nThis section is a work-in-progress.\n\n### State Transitions\n\nThe state transitions of a disbursement, payment, message, and wallet (i.e. recipient Stellar account) are described below.\n\n#### Disbursements\n\n```mermaid\nstateDiagram-v2\n    [*] --\u003e Draft:Started creating the disbursement\n    Draft --\u003e [*]:User deleted\\nthe draft\n    Draft --\u003e Draft:File Ingestion failed\\n due to wrong data\n    Draft --\u003e Ready:Upload\n    Ready --\u003e Started:User Started Disbursement\\n in the Dashboard\n    Started --\u003e Paused:Paused\n    Paused --\u003e Started:Unpaused\n    Started --\u003e Completed:All payments\\n went through\n```\n\n#### Payments\n\n```mermaid\nstateDiagram-v2\n    [*] --\u003e Draft:Upload a disbursement CSV\n    Draft --\u003e [*]:Disbursement deleted\n    Draft --\u003e Ready:Disbursement started\n    Ready --\u003e Paused:Paused\n    Paused --\u003e Ready:Unpaused\n    Ready --\u003e Pending:Payment gets submitted\\nif user is ready\n    Pending --\u003e Success:Payment succeeds\n    Pending --\u003e Failed:Payment fails\n    Failed --\u003e Pending:Retry\n```\n\n#### Recipient Wallets\n\n```mermaid\nstateDiagram-v2\n    [*] --\u003e Draft:Upload disbursement CSV\n    Draft --\u003e [*]:disbursement deleted\n    Draft --\u003e Ready: Disbursement started\n    Ready --\u003e Registered: receiver signed up\n    Ready --\u003e Flagged: flagged\n    Flagged --\u003e Ready: unflagged\n    Registered --\u003e Flagged: flagged\n    Flagged --\u003e Registered: unflagged\n```\n\n#### Messages\n\n```mermaid\nstateDiagram-v2\n    [*] --\u003e Pending: Message is queued\n    Pending --\u003e Success:Message sender\\nAPI succeeds\n    Pending --\u003e Failed:Message sender\\nAPI fails\n    Failed --\u003e Pending:Retry\n```\n\n[sdp-dashboard]: https://github.com/stellar/stellar-disbursement-platform-frontend\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstellar%2Fstellar-disbursement-platform-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstellar%2Fstellar-disbursement-platform-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstellar%2Fstellar-disbursement-platform-backend/lists"}