{"lexicon":1,"id":"money.atmosphere.app.getConfig","defs":{"modules":{"type":"object","required":["payments","products","subscriptions","tickets"],"properties":{"payments":{"type":"boolean"},"products":{"type":"boolean"},"subscriptions":{"type":"boolean"},"pledges":{"type":"boolean"},"tickets":{"type":"boolean"},"machinePayments":{"type":"boolean","description":"Planned machine-payments (MPP/x402) module. Always false until launched; optional so the planned surface is not frozen into the required contract."}}},"subscriptionPolicy":{"type":"object","required":["activeLimit"],"properties":{"activeLimit":{"type":"string","knownValues":["multiple","one-per-payer-recipient"],"maxLength":64}}},"ticketing":{"type":"object","required":["qrPasses","walletPasses"],"properties":{"qrPasses":{"type":"boolean"},"walletPasses":{"type":"boolean"}}},"ticketFee":{"type":"object","required":["bps","flatAmount","passToBuyer"],"properties":{"bps":{"type":"integer","minimum":0,"maximum":1000,"description":"ATM-owned ticket processing fee percentage in basis points. Read-only for apps."},"flatAmount":{"type":"integer","minimum":0,"maximum":1000,"description":"ATM-owned flat ticket processing fee in cents per paid ticket. Read-only for apps."},"passToBuyer":{"type":"boolean","description":"Whether the ATM ticket processing fee is added to buyer checkout price instead of absorbed by the organizer."}}},"payout":{"type":"object","required":["holdDays"],"properties":{"holdDays":{"type":"integer","minimum":0,"maximum":90,"description":"App-fee payout hold in days. Applies to app-fee distributions, not creator direct-charge proceeds."}}},"feeTier":{"type":"object","required":["subscriptionGroupKey","feeShareBps"],"properties":{"subscriptionGroupKey":{"type":"string","maxLength":128,"description":"The app-owned plan that grants this tier, matched against a settling subscription's subscriptionGroupKey. A creator holding this plan is auto-charged feeShareBps on their own creator revenue."},"feeShareBps":{"type":"integer","minimum":0,"maximum":10000,"description":"Lowered app fee (basis points) for that subscriber's creator revenue. Must be <= the app's configured feeShareBps; clamped as min() at charge time."},"label":{"type":"string","maxLength":64,"description":"Optional label; stored as the resulting override's reason. Private."}}},"checkout":{"type":"object","required":["theme"],"properties":{"theme":{"type":"string","knownValues":["auto","light","dark"],"maxLength":16}}},"paymentMethods":{"type":"object","required":["enabled","disabled","dynamicPaymentMethods"],"properties":{"enabled":{"type":"array","maxLength":12,"items":{"type":"string","knownValues":["card","link","apple_pay","google_pay","us_bank_account","klarna"],"maxLength":32}},"disabled":{"type":"array","maxLength":12,"items":{"type":"string","knownValues":["card","link","apple_pay","google_pay","us_bank_account","klarna"],"maxLength":32}},"dynamicPaymentMethods":{"type":"boolean"}}},"publicRecordPaymentPolicy":{"type":"object","properties":{"appRecord":{"type":"string","knownValues":["public","private"],"maxLength":16},"attestation":{"type":"string","knownValues":["public","private"],"maxLength":16}}},"publicRecordsPolicy":{"type":"object","required":["enabled","defaults","byPaymentType"],"properties":{"enabled":{"type":"boolean","description":"Master switch: when false ATM writes no public attested record for this app regardless of per-payment-type visibility."},"defaults":{"type":"ref","ref":"#publicRecordPaymentPolicy"},"byPaymentType":{"type":"object","properties":{"tip":{"type":"ref","ref":"#publicRecordPaymentPolicy"},"subscribe":{"type":"ref","ref":"#publicRecordPaymentPolicy"},"shop":{"type":"ref","ref":"#publicRecordPaymentPolicy"},"commission":{"type":"ref","ref":"#publicRecordPaymentPolicy"},"ticket":{"type":"ref","ref":"#publicRecordPaymentPolicy"}}}}},"xrpcReceiver":{"type":"object","required":["serviceRef","method"],"properties":{"serviceRef":{"type":"string","maxLength":300},"method":{"type":"string","format":"nsid","maxLength":300,"description":"XRPC receiver method NSID. Defaults to money.atmosphere.event.receive."}}},"eventDelivery":{"type":"object","required":["transport","xrpcReceiver"],"properties":{"transport":{"type":"string","knownValues":["webhook","xrpc"],"maxLength":16},"xrpcReceiver":{"type":"ref","ref":"#xrpcReceiver"}}},"webhookEventSetting":{"type":"object","required":["type","enabled"],"properties":{"type":{"type":"string","knownValues":["app.webhook.test","payment.completed","payment.failed","payment.refunded","payment.refund-updated","payment.disputed","payment.dispute-closed","subscription.invoice-paid","subscription.updated","subscription.canceled","subscription.payment-failed","subscription.recovered","pledge.created","pledge.canceled","pledge.converted","pledge.conversion-failed","payer.record.requested","payer.claimed","creator.proof.requested","attestation.updated","product.updated","product.archived","product.deleted","ticket.hold.created","ticket.hold.expired","tickets.issued","ticket.voided","ticket.refunded","ticket.checked-in","ticket.form-submitted","ticket.waitlist.joined","ticket.waitlist.offered","ticket.collaboration.invited","ticket.collaboration.accepted","ticket.collaboration.revoked","customer.segment.message-requested","recipient.authorization.updated"],"maxLength":128,"description":"ATM webhook event type, such as payment.completed."},"enabled":{"type":"boolean"}}},"webhook":{"type":"object","required":["configured","url","paused","secretRotatedAt","previousSecretExpiresAt"],"nullable":["url","secretRotatedAt","previousSecretExpiresAt"],"properties":{"configured":{"type":"boolean"},"url":{"type":"string","format":"uri"},"paused":{"type":"boolean"},"secretRotatedAt":{"type":"string","format":"datetime"},"previousSecretExpiresAt":{"type":"string","format":"datetime"}}},"config":{"type":"object","required":["appDid","environment","status","appUrl","feeShareBps","webhook","appConfig"],"nullable":["appUrl"],"properties":{"appDid":{"type":"string","format":"did"},"environment":{"type":"string","knownValues":["test","live"],"maxLength":8},"status":{"type":"string","knownValues":["active","sandbox"],"maxLength":32,"description":"App-environment status. Test environments report 'sandbox'; live environments are normally 'active'. Open set: ATM operators may introduce additional statuses."},"appUrl":{"type":"string","format":"uri"},"feeShareBps":{"type":"integer","minimum":0,"maximum":10000},"webhook":{"type":"ref","ref":"#webhook"},"appConfig":{"type":"object","required":["modules","subscriptionPolicy","ticketing","ticketFee","payout","checkout","paymentMethods","publicRecords","eventDelivery","webhookEvents","atmSupportBps","feeTiers"],"properties":{"modules":{"type":"ref","ref":"#modules"},"subscriptionPolicy":{"type":"ref","ref":"#subscriptionPolicy"},"ticketing":{"type":"ref","ref":"#ticketing"},"ticketFee":{"type":"ref","ref":"#ticketFee"},"payout":{"type":"ref","ref":"#payout"},"checkout":{"type":"ref","ref":"#checkout"},"paymentMethods":{"type":"ref","ref":"#paymentMethods"},"publicRecords":{"type":"ref","ref":"#publicRecordsPolicy"},"eventDelivery":{"type":"ref","ref":"#eventDelivery"},"webhookEvents":{"type":"array","maxLength":128,"items":{"type":"ref","ref":"#webhookEventSetting"}},"atmSupportBps":{"type":"integer","minimum":0,"maximum":10000},"feeTiers":{"type":"array","maxLength":20,"items":{"type":"ref","ref":"#feeTier"},"description":"Declarative variable-app-fee tiers (up to 20): each maps one of the app's own subscription plans to a lower app fee auto-applied to that subscriber's creator revenue."}}}}},"main":{"type":"query","description":"Read the calling app's ATM app configuration for one environment. Requires app service-auth.","parameters":{"type":"params","required":["environment"],"properties":{"environment":{"type":"string","knownValues":["test","live"],"maxLength":8}}},"output":{"encoding":"application/json","schema":{"type":"ref","ref":"#config"}},"errors":[{"name":"AppNotRegistered","description":"This surface is limited to registered ATM apps."},{"name":"AppEnvironmentNotConfigured","description":"This app environment is not configured in ATM."}]}}}