Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Mage ai Mage ai Stripe Customers Schema

From Leeroopedia


Knowledge Sources
Domains Data_Integration, Stripe, Schema
Last Updated 2026-02-09 00:00 GMT

Overview

JSON Schema definition for Stripe customer records used by the Singer-based Stripe source connector.

Description

This schema defines the structure and types for customer data extracted from the Stripe Customers API. It is loaded by the Stripe source connector during stream discovery to validate and type-check extracted records. The schema follows the JSON Schema specification and includes top-level properties such as metadata (an open object), updated_by_event_type, preferred_locales (an array of strings), invoice_settings (with nested custom_fields and default_payment_method), name, tax_exempt, next_invoice_sequence, balance, phone, address, shipping, sources, tax_ids, delinquent, and description. The root type is ["null", "object"], allowing nullable records.

Usage

This schema is automatically loaded by the Stripe source connector during the discovery phase. It defines the available columns and their types for the customers stream.

Code Reference

Source Location

  • Repository: mage-ai
  • File: mage_integrations/mage_integrations/sources/stripe/schemas/customers.json
  • Lines: 1-501

Signature

{
  "type": ["null", "object"],
  "properties": {
    "metadata": { "type": ["null", "object"], "properties": {} },
    "updated_by_event_type": { "type": ["null", "string"] },
    "preferred_locales": { "type": ["null", "array"], "items": { "type": ["null", "string"] } },
    "invoice_settings": { "type": ["null", "object"], "properties": { "custom_fields": {}, "default_payment_method": {} } },
    "name": { "type": ["null", "string"] },
    "tax_exempt": { "type": ["null", "string"] },
    "next_invoice_sequence": { "type": ["null", "integer"] },
    "balance": { "type": ["null", "integer"] },
    "phone": { "type": ["null", "string"] },
    "address": { "type": ["null", "object"], "..." : "..." },
    "shipping": { "type": ["null", "object"], "..." : "..." },
    "delinquent": { "type": ["null", "boolean"] },
    "description": { "type": ["null", "string"] }
  }
}

Import

# Loaded automatically by Source.load_schemas_from_folder()
# Path: mage_integrations/mage_integrations/sources/stripe/schemas/customers.json

I/O Contract

Inputs

Name Type Required Description
(none) JSON file Yes Loaded from disk by schema loader

Outputs

Name Type Description
schema dict JSON Schema object with properties, types, and format constraints

Usage Examples

import json
import os

schema_path = os.path.join(
    "mage_integrations/mage_integrations/sources/stripe/schemas",
    "customers.json"
)
with open(schema_path) as f:
    schema = json.load(f)

print(list(schema["properties"].keys()))

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment