Implementation:Mage ai Mage ai Stripe Payment Intents Schema
| Knowledge Sources | |
|---|---|
| Domains | Data_Integration, Stripe, Schema |
| Last Updated | 2026-02-09 00:00 GMT |
Overview
JSON Schema definition for Stripe payment intent records used by the Singer-based Stripe source connector.
Description
This schema defines the structure and types for payment intent data extracted from the Stripe Payment Intents API. It is loaded by the Stripe source connector during stream discovery to validate and type-check extracted records. At 1101 lines, this is one of the largest Stripe schemas, reflecting the complexity of the PaymentIntent object. The schema follows the JSON Schema specification and includes top-level properties such as id, amount, application, source, status, capture_method, client_secret, latest_charge, currency, customer, description, last_payment_error (a nested error object), metadata, next_action, and payment_method. 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 payment_intents stream.
Code Reference
Source Location
- Repository: mage-ai
- File: mage_integrations/mage_integrations/sources/stripe/schemas/payment_intents.json
- Lines: 1-1101
Signature
{
"type": ["null", "object"],
"properties": {
"id": { "type": ["null", "string"] },
"amount": { "type": ["null", "integer"] },
"application": { "type": ["null", "string"] },
"source": { "type": ["null", "string"] },
"status": { "type": ["null", "string"] },
"capture_method": { "type": ["null", "string"] },
"client_secret": { "type": ["null", "string"] },
"latest_charge": { "type": ["null", "string"] },
"currency": { "type": ["null", "string"] },
"customer": { "type": ["null", "string"] },
"description": { "type": ["null", "string"] },
"last_payment_error": { "type": ["null", "object"], "..." : "..." },
"metadata": { "type": ["null", "object"], "properties": {} },
"next_action": { "type": ["null", "object"], "..." : "..." },
"payment_method": { "type": ["null", "string"] }
}
}
Import
# Loaded automatically by Source.load_schemas_from_folder()
# Path: mage_integrations/mage_integrations/sources/stripe/schemas/payment_intents.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",
"payment_intents.json"
)
with open(schema_path) as f:
schema = json.load(f)
print(list(schema["properties"].keys()))