Skip to content

Settings & Configuration

Foundation settings control branding, feature toggles, custom terminology, and payment integration. All settings are managed through GET /api/foundation (read) and PUT /api/foundation (update).

SettingTypeDescription
namestringFoundation display name
slugstringURL identifier (used in donation page URLs and subdomain)
emailstring?Foundation contact email (also used as sender for emails)
phonestring?Contact phone number
mission_statementstring?Mission statement (up to 2,000 characters)
org_typestringOrganization type (determines default roles, vocabulary, and modules)
is_registered_nonprofitboolean?Whether the organization is a registered 501(c)(3)

The brand_colors JSON field stores the foundation’s color palette:

{
"primary": "#1a2744",
"secondary": "#c5a55a",
"accent": "#c41e3a"
}

These colors are applied to donation pages, email templates, and the foundation’s public site.

The logo_path field stores the path to the foundation’s logo in Supabase S3 storage.

The enabled_modules JSON field controls which features are available in the admin dashboard:

["contacts", "donations", "campaigns", "scholarships", "sequences"]

Available modules depend on the organization type. The OrgTypeService::resolveModules() method returns the effective module list based on org_type defaults and any overrides.

Miranda supports custom terminology so organizations can use language that matches their mission. The vocabulary_overrides JSON field remaps default terms:

{
"contacts": "Constituents",
"donations": "Gifts",
"campaigns": "Outreach",
"scholarships": "Grants"
}

The OrgTypeService::resolveVocabulary() method merges org-type defaults with foundation-level overrides.

The safety_mode boolean flag enables a protective mode for foundations that are still setting up:

  • Prevents public visibility of donation pages
  • Adds confirmation prompts before sending campaigns
  • Clearly marks the foundation as “in setup” in the admin UI

Toggle via:

PUT /api/foundation
{
"safety_mode": true
}

Stripe Connect configuration is managed through dedicated endpoints (see Stripe Connect Integration):

SettingDescription
stripe_connect_idConnected account ID (set during onboarding)
stripe_connect_statuspending, active, or disconnected

The Settings page in the admin dashboard shows the current Stripe status and provides buttons to:

  • Connect — Start the Express onboarding flow
  • View status — Check charges_enabled and payouts_enabled
  • Disconnect — Remove the Stripe connection
SettingTypeDefaultDescription
directory_listedbooleanfalseWhether the foundation appears in the public directory on miranda.gives
categorystring?nullFoundation category for directory browsing
taglinestring?nullShort tagline shown in directory listings
SettingTypeDescription
trial_ends_atdatetime?End of the 14-day trial period
frozen_atdatetime?Set when the account is frozen (billing failure)

The isFrozen() method returns true when frozen_at is not null. The isTrialing() method checks whether the trial is still active.

When updating the settings JSON field, the API merges the new values with existing settings rather than replacing them. This preserves keys like plan that are managed by the billing system:

// FoundationController::update()
if (isset($validated['settings'])) {
$validated['settings'] = array_merge(
$foundation->settings ?? [],
$validated['settings']
);
}

The CharityEnrichmentService and EnrichCharityDataJob can populate foundation data from external sources:

FieldSource
founded_yearCharity data API
city, stateAddress lookup
ntee_codeNTEE classification
total_revenue, total_assetsIRS 990 data
revenue_yearYear of financial data
enriched_atTimestamp of last enrichment