{"lexicon":1,"id":"money.atmosphere.app.updateConfig","defs":{"publicRecordPaymentPolicy":{"type":"object","properties":{"appRecord":{"type":"string","knownValues":["public","private"],"maxLength":16},"attestation":{"type":"string","knownValues":["public","private"],"maxLength":16}}},"publicRecordsPolicy":{"type":"object","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"}}}}},"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"}}},"main":{"type":"procedure","description":"Update safe app-level ATM configuration for one environment. Requires app service-auth. ATM-owned fee rates and processor state are not mutable through this route.","input":{"encoding":"application/json","schema":{"type":"object","required":["environment"],"nullable":["appUrl","webhookUrl"],"properties":{"environment":{"type":"string","knownValues":["test","live"],"maxLength":8},"appUrl":{"type":"string","format":"uri"},"webhookUrl":{"type":"string","format":"uri"},"webhookPaused":{"type":"boolean"},"feeShareBps":{"type":"integer","minimum":0,"maximum":10000},"atmSupportBps":{"type":"integer","minimum":0,"maximum":10000},"modules":{"type":"object","description":"Writable module toggles. Deliberately a subset of getConfig#modules: modules that are not yet app-enableable (such as machinePayments) are read-only and absent here.","properties":{"payments":{"type":"boolean"},"products":{"type":"boolean"},"subscriptions":{"type":"boolean"},"pledges":{"type":"boolean"},"tickets":{"type":"boolean"}}},"subscriptionPolicy":{"type":"object","properties":{"activeLimit":{"type":"string","knownValues":["multiple","one-per-payer-recipient"],"maxLength":64}}},"ticketing":{"type":"object","properties":{"qrPasses":{"type":"boolean"},"walletPasses":{"type":"boolean"}}},"ticketFee":{"type":"object","properties":{"passToBuyer":{"type":"boolean","description":"Who pays ATM's configured ticket processing fee. The fee rate itself is ATM-owned and ignored here."}}},"payout":{"type":"object","properties":{"holdDays":{"type":"integer","minimum":0,"maximum":90}}},"checkout":{"type":"object","properties":{"theme":{"type":"string","knownValues":["auto","light","dark"],"maxLength":16}}},"paymentMethods":{"type":"object","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"}}},"publicRecords":{"type":"ref","ref":"#publicRecordsPolicy"},"eventDelivery":{"type":"object","properties":{"transport":{"type":"string","knownValues":["webhook","xrpc"],"maxLength":16},"xrpcReceiver":{"type":"object","properties":{"serviceRef":{"type":"string","maxLength":300},"method":{"type":"string","format":"nsid","maxLength":300}}}}},"webhookEvents":{"type":"array","maxLength":128,"items":{"type":"ref","ref":"#webhookEventSetting"}},"feeTiers":{"type":"array","maxLength":20,"items":{"type":"ref","ref":"money.atmosphere.app.getConfig#feeTier"},"description":"Full replacement of the app's variable-app-fee tiers (up to 20). Each feeShareBps must be <= the app's configured feeShareBps (lower-only)."}}}},"output":{"encoding":"application/json","schema":{"type":"ref","ref":"money.atmosphere.app.getConfig#config"}},"errors":[{"name":"AppNotRegistered","description":"This surface is limited to registered ATM apps."},{"name":"AppEnvironmentNotConfigured","description":"This app environment is not configured in ATM."},{"name":"WebhookUrlNotAllowed","description":"Webhook URL must be a public HTTPS endpoint on hardened deployments."},{"name":"AppUrlNotAllowed","description":"App URL must be a safe public URL."},{"name":"InvalidWebhookEvent","description":"The webhook event type is not supported by ATM."},{"name":"FeeShareAboveBase","description":"A fee tier's feeShareBps exceeds the app's configured fee. Tiers only lower fees."}]}}}