feat: Build Stripe-to-Substream Migration Data Importer #140#184
Merged
elizabetheonoja-art merged 3 commits intoApr 22, 2026
Merged
Conversation
…ol#139) - Add /auth/challenge endpoint for SEP-10 challenge generation - Add /auth/verify endpoint for challenge verification and JWT issuance - Implement unified authentication middleware supporting both Stellar and Ethereum - Update all protected routes to use unified authentication - Add comprehensive test suite for SEP-10 compliance and integration - Create complete implementation documentation - Ensure full SEP-10 specification compliance - Maintain backward compatibility with existing Ethereum authentication Resolves SubStream-Protocol#139
…enerator (SubStream-Protocol#140) - Add POST /api/v1/merchants/import/stripe endpoint for CSV upload - Implement flexible CSV parsing service for Stripe exports - Create secure migration link generation with HMAC signatures - Add plan mapping system for Stripe to SubStream plan conversion - Implement wallet connection and email-to-pubkey linking - Add comprehensive error handling for malformed CSV data - Create database schema for migration tracking (jobs, records, mappings) - Add migration job status tracking and management endpoints - Implement migration link verification and completion flow - Add subscription creation from migration records - Create comprehensive test suite with mocked Stripe CSV data - Add complete documentation and integration guide - Support large file processing (up to 50MB) with streaming parser - Handle various Stripe CSV export formats gracefully - Include sample Stripe export for testing Acceptance Criteria: - Web2 SaaS merchants can programmatically map existing user base - CSV parsing handles large files, malformed rows, and missing data - Migration links provide frictionless bridge for end-users Resolves SubStream-Protocol#140
|
@KarenZita01 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR introduces the POST /api/v1/merchants/import/stripe endpoint, enabling Web2 SaaS merchants to migrate their existing customer bases to the Substream protocol with minimal friction.
Key Features
Streamed CSV Parsing: Efficiently processes large Stripe dashboard exports without memory spikes.
Plan Mapping Logic: Automatically maps legacy Stripe plan names to on-chain Soroban plan_ids.
Migration Link Engine: Generates unique, secure UUID-based tokens for every customer.
Identity Bridging: Ready-to-use backend logic to link Web2 email addresses to Web3 public keys upon wallet connection.
Acceptance Criteria Verification
[x] Enterprise Readiness: Handled mock CSV with 10,000+ rows successfully.
[x] Error Handling: Implemented grace periods and row-skipping for missing renewal dates or malformed emails.
[x] Frictionless UX: Created the bridging table to ensure users don't have to manually re-select plans after clicking their migration link.
Testing
Included tests/migration.test.ts using a mocked Stripe export.
Verified that the migration status transitions from PENDING to COMPLETED upon public key assignment.
Fixes #140