dev.cocore.compute.settlement

An exchange's signed proof of payment for a receipt. Published by the exchange in its own repo. Strong-refs both the receipt being settled and the requester's payment authorization, so the full chain is independently verifiable.

Repository @cocore.dev did:plc:5quuhkmwe2q4k3azfsgg7kdz namespace authority
Details · record, key tid
Kindrecord
Record keytid
Authoritycompute.cocore.dev
Indexed
cid bafyreihbkcra4dw3fz2xgwmlc45rcromr24l7oacxtgdronnjwjbal3anq

Checks

Valid
  • missing-primary-description defs.mainThe record has no description.
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "key": "tid",
      "record": {
        "properties": {
          "amountCharged": {
            "description": "Amount charged to the requester. MUST equal receipt.price for status=settled.",
            "ref": "dev.cocore.compute.defs#money",
            "type": "ref"
          },
          "exchangeAttestation": {
            "description": "Strong-ref to the dev.cocore.compute.exchangeAttestation pinning the software / signing-key combination that produced this settlement.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "exchangeFee": {
            "description": "Exchange's retained fee. amountCharged = providerPayout + exchangeFee.",
            "ref": "dev.cocore.compute.defs#money",
            "type": "ref"
          },
          "policy": {
            "description": "Strong-ref to the dev.cocore.compute.exchangePolicy this settlement was computed under. Lets a verifier re-run the fee math against the same policy that produced the record.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "processorReference": {
            "description": "Opaque processor transaction id (e.g. Stripe PaymentIntent id), encrypted to the involved parties (requester, provider, exchange) so the public record does not leak processor metadata. Verifiers without keys treat this as opaque.",
            "maxLength": 1024,
            "type": "bytes"
          },
          "providerPayout": {
            "description": "Amount paid out to the provider after fees.",
            "ref": "dev.cocore.compute.defs#money",
            "type": "ref"
          },
          "receipt": {
            "description": "Strong-ref to the dev.cocore.compute.receipt being settled.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "refundOf": {
            "description": "When status=refunded, strong-ref to the prior settled settlement record this refund reverses.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "requesterAuthorization": {
            "description": "Strong-ref to the dev.cocore.compute.paymentAuthorization in the requester's repo. Verifiers MUST check it names this exchange's DID and that ceiling >= amountCharged.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "settledAt": {
            "format": "datetime",
            "type": "string"
          },
          "sig": {
            "description": "ES256 signature (base64url, no padding) over the canonical JSON of every other field. Verified against the verificationMethod publicKeyMultibase in the exchange's did document. Optional for v0.3.x exchanges that haven't enabled signing; required for trust-tier=hardware-attested exchanges.",
            "maxLength": 256,
            "type": "string"
          },
          "status": {
            "ref": "dev.cocore.compute.defs#settlementStatus",
            "type": "ref"
          }
        },
        "required": [
          "receipt",
          "requesterAuthorization",
          "amountCharged",
          "providerPayout",
          "exchangeFee",
          "processorReference",
          "status",
          "settledAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "description": "An exchange's signed proof of payment for a receipt. Published by the exchange in its own repo. Strong-refs both the receipt being settled and the requester's payment authorization, so the full chain is independently verifiable.",
  "id": "dev.cocore.compute.settlement",
  "lexicon": 1
}