{"lexicon":1,"id":"money.atmosphere.payment.registerPayerRecord","defs":{"main":{"type":"procedure","description":"Register a payer record URI written by the originating app on the payer's PDS via OAuth. Requires a service-auth JWT signed by the originator DID with lxm matching this NSID. New callers send the complete proof lifecycle pair so a delayed registration cannot mutate or adopt a newer proof generation; both fields remain optional only for rolling compatibility with callers predating lifecycle fencing.","input":{"encoding":"application/json","schema":{"type":"object","required":["paymentId","payerRecordUri","payerRecordCid"],"properties":{"paymentId":{"type":"string","maxLength":256},"payerRecordUri":{"type":"string","format":"at-uri"},"payerRecordCid":{"type":"string","format":"cid"},"proofLifecycleGeneration":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Exact verified broker-proof lifecycle generation from the delegated request. Present together with proofLifecycleState."},"proofLifecycleState":{"type":"string","knownValues":["verified"],"maxLength":16,"description":"Verified state paired with proofLifecycleGeneration."}}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["paymentId","payerRecordUri","payerRecordCid"],"properties":{"paymentId":{"type":"string","maxLength":256},"payerRecordUri":{"type":"string","format":"at-uri"},"payerRecordCid":{"type":"string","format":"cid"},"alreadyRegistered":{"type":"boolean"}}}},"errors":[{"name":"AlreadyRegistered","description":"A different payer record is already registered for this payment. Exact URI/CID replay succeeds with alreadyRegistered true instead."},{"name":"OriginatorDidMismatch","description":"Caller is not the payment's originating app."},{"name":"NoPayerDid","description":"The payment has no payer DID to register against."},{"name":"PayerRecordUriAuthorityMismatch","description":"Record URI authority does not match the payer DID."},{"name":"PaymentNotFound","description":"Payment not found."},{"name":"PayerRecordRetracted","description":"The buyer retracted this payer record; ATM will not re-publish it."},{"name":"PayerRecordGenerationSuperseded","description":"The submitted record belongs to an older publication generation. ATM queued exact-CID cleanup; write the current recordRkey and register that generation instead."},{"name":"ProofLifecycleGenerationSuperseded","description":"The delegated request's verified proof lifecycle generation is no longer current."},{"name":"PayerRecordPrivate","description":"The payer disabled payer-record publication for this payment at checkout."},{"name":"AttestationInvalidated","description":"The underlying attestation has been invalidated (e.g. refund/dispute); the record cannot be registered."},{"name":"RegistrationFailed","description":"The payer record could not be verified or registered."}]}}}