{"lexicon":1,"id":"money.atmosphere.app.requestRecipientApproval","defs":{"publicRecordPaymentPolicy":{"type":"object","properties":{"appRecord":{"type":"string","knownValues":["public","private"],"maxLength":16},"attestation":{"type":"string","knownValues":["public","private"],"maxLength":16},"payerCanChoose":{"type":"boolean"},"coupleInCheckout":{"type":"boolean"}}},"publicRecordsPolicy":{"type":"object","properties":{"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"}}}}},"main":{"type":"procedure","description":"Request creator approval for an app to accept ATM payments for that recipient. Requires a service-auth JWT signed by the app DID.","input":{"encoding":"application/json","schema":{"type":"object","required":["recipientDid","environment","paymentTypes"],"nullable":["publicRecords","requestReason","setupReturnUrl"],"properties":{"recipientDid":{"type":"string","format":"did"},"environment":{"type":"string","knownValues":["test","live"],"maxLength":16},"paymentTypes":{"type":"array","minLength":1,"maxLength":5,"items":{"type":"string","knownValues":["tip","subscribe","shop","commission","ticket"],"maxLength":32}},"feeShareBps":{"type":"integer","minimum":0,"maximum":10000,"description":"App fee cap requested for this recipient, in basis points of the gross payment."},"publicRecords":{"type":"ref","ref":"#publicRecordsPolicy"},"requestReason":{"type":"string","maxGraphemes":300,"maxLength":3000},"setupReturnUrl":{"type":"string","format":"uri"}}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["id","status","dashboardUrl","onboardingUrl","paymentTypes","feeShareBps","materialChangeReasons"],"properties":{"id":{"type":"string","maxLength":128},"status":{"type":"string","knownValues":["pending","approved","blocked","revoked","needs-review"],"maxLength":32},"dashboardUrl":{"type":"string","format":"uri"},"onboardingUrl":{"type":"string","format":"uri"},"paymentTypes":{"type":"array","items":{"type":"string","knownValues":["tip","subscribe","shop","commission","ticket"],"maxLength":32}},"feeShareBps":{"type":"integer","minimum":0,"maximum":10000},"materialChangeReasons":{"type":"array","items":{"type":"string","maxLength":64}}}}},"errors":[{"name":"AppEnvironmentNotFound","description":"This app environment is not configured in ATM."},{"name":"ApprovalRequestFailed","description":"The approval request could not be created."}]}}}