{"lexicon":1,"id":"money.atmosphere.billing.requestKofiMigrationBatch","defs":{"previewSummary":{"type":"object","required":["source","totalRows","validRows","activeRows","stripeRows","paypalRows","unknownPaymentMethodRows","missingEmailRows","duplicateEmailRows","totalAmountCents","currencies","tierCount"],"properties":{"source":{"type":"string","knownValues":["kofi"],"maxLength":32},"totalRows":{"type":"integer","minimum":0},"validRows":{"type":"integer","minimum":0},"activeRows":{"type":"integer","minimum":0},"stripeRows":{"type":"integer","minimum":0},"paypalRows":{"type":"integer","minimum":0},"unknownPaymentMethodRows":{"type":"integer","minimum":0},"missingEmailRows":{"type":"integer","minimum":0},"duplicateEmailRows":{"type":"integer","minimum":0},"totalAmountCents":{"type":"integer","minimum":0},"currencies":{"type":"array","items":{"type":"string","maxLength":3}},"tierCount":{"type":"integer","minimum":0}}},"tierSummary":{"type":"object","required":["tierName","rowCount","activeCount","stripeCount","paypalCount","unknownPaymentMethodCount","totalAmountCents","currencies"],"properties":{"tierName":{"type":"string","maxGraphemes":120,"maxLength":512},"rowCount":{"type":"integer","minimum":0},"activeCount":{"type":"integer","minimum":0},"stripeCount":{"type":"integer","minimum":0},"paypalCount":{"type":"integer","minimum":0},"unknownPaymentMethodCount":{"type":"integer","minimum":0},"totalAmountCents":{"type":"integer","minimum":0},"currencies":{"type":"array","items":{"type":"string","maxLength":3}}}},"main":{"type":"procedure","description":"Create a private ATM billing migration review batch from a Ko-fi membership export. Requires service-auth signed by the originating app DID; the actual Stripe/PAN migration remains a guided ATM review step.","input":{"encoding":"application/json","schema":{"type":"object","required":["creatorDid","csvText"],"nullable":["requestedCutoverAt"],"properties":{"creatorDid":{"type":"string","format":"did"},"csvText":{"type":"string","maxLength":1000000,"description":"Raw Ko-fi membership CSV. ATM stores only masked and hashed review data, never raw emails in the public response."},"environment":{"type":"string","knownValues":["test","live"],"maxLength":16},"requestedCutoverAt":{"type":"string","format":"datetime"},"metadata":{"type":"unknown","description":"App-private migration context such as app-local creator/list ids."}}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["batch","dashboardUrl","summary","tiers","warnings"],"properties":{"batch":{"type":"object","required":["id","status","environment","importSource","migrationPath","creatorDid"],"nullable":["appDid","requestedCutoverAt"],"properties":{"id":{"type":"string","maxLength":128},"status":{"type":"string","maxLength":64},"environment":{"type":"string","knownValues":["test","live"],"maxLength":16},"importSource":{"type":"string","knownValues":["kofi"],"maxLength":64},"migrationPath":{"type":"string","maxLength":128},"creatorDid":{"type":"string","format":"did"},"appDid":{"type":"string","format":"did"},"requestedCutoverAt":{"type":"string","format":"datetime"}}},"dashboardUrl":{"type":"string","format":"uri"},"summary":{"type":"ref","ref":"#previewSummary"},"tiers":{"type":"array","items":{"type":"ref","ref":"#tierSummary"}},"warnings":{"type":"array","items":{"type":"string","maxGraphemes":300,"maxLength":2000}}}}},"errors":[{"name":"AppEnvironmentNotFound","description":"This app environment is not configured in ATM."},{"name":"MigrationBatchRequestFailed","description":"The migration review batch could not be created."}]}}}