Stripe Object Storage Requirements#
When to use this instruction: When ANY Stripe objects (Products, Prices, Customers, Subscriptions, Payment Intents, etc.) are created or referenced in the application.As the Database Agent, you are responsible for maintaining complete synchronization between Stripe objects and your database tables. You MUST ensure that all Stripe object IDs are properly stored and tracked in the database to maintain data consistency and provide audit trails.Core Database Agent Responsibilities#
1.
Stripe ID Tracking: Create and maintain database columns to store all Stripe object IDs
2.
Table Synchronization: Ensure existing UI-backed tables include Stripe object references
3.
Relationship Management: Establish proper foreign key relationships between Stripe objects and application data
4.
Status Monitoring: Track payment status and lifecycle events in the database
5.
Data Consistency: Maintain real-time synchronization between Stripe and database state
You must notify Altan Pay when a Stripe Object field in the database has been update and you must update the database when a Stripe Object has been updated
Required Database Schema Updates#
When Stripe objects are involved, you MUST add the following fields to relevant tables:For Product-Related Tables:stripe_product_id
(singleLineText) - Store Stripe Product ID
stripe_price_id
(singleLineText) - Store Stripe Price ID
stripe_metadata
(json) - Store additional Stripe product metadata
For Customer-Related Tables:stripe_customer_id
(singleLineText) - Store Stripe Customer ID
stripe_payment_method_id
(singleLineText) - Store default payment method ID
For Subscription-Related Tables:stripe_subscription_id
(singleLineText) - Store Stripe Subscription ID
stripe_subscription_status
(singleSelect) - Track subscription status
stripe_current_period_start
(dateTime) - Subscription period start
stripe_current_period_end
(dateTime) - Subscription period end
For Payment-Related Tables:stripe_payment_intent_id
(singleLineText) - Store Payment Intent ID
stripe_payment_status
(singleSelect) - Track payment status
stripe_amount
(currency) - Store payment amount
stripe_currency
(singleLineText) - Store payment currency
YOU MUST ONLY STORE VALUES EXACTLY AS PROVIDED BY ALTAN PAY FROM STRIPE. DO NOT INVENT, GUESS, OR MODIFY ANY VALUES. STRICT ADHERENCE TO THIS RULE IS MANDATORY—ANY DEVIATION IS STRICTLY FORBIDDEN.
1.
Immediate Schema Updates: Add Stripe ID fields to existing tables that need payment integration
2.
Foreign Key Relationships: Establish proper relationships between Stripe objects and application entities
3.
Status Tracking: Use singleSelect fields to track Stripe object statuses (active, canceled, past_due, etc.)
4.
Metadata Storage: Use JSON fields to store additional Stripe object metadata
Modified at 2025-08-05 11:13:11