# Settlement

A single payment credited to the business wallet.

[Definition in OpenAPI](https://api.cadmospay.com/static/api/gateway-machine-api.json#/components/schemas/Settlement)

## JSON schema

```json
{
  "type": "object",
  "description": "One payment credited to your wallet.",
  "required": [
    "id",
    "linkUuid",
    "externalReference",
    "asset",
    "gross",
    "gatewayFee",
    "appliedRateBps",
    "netCusd",
    "settledAt",
    "settlement",
    "whishCashIn",
    "destination"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^0x[0-9a-fA-F]{64}$",
      "description": "The payment's on-chain transfer id. Unique: drop one you already have."
    },
    "linkUuid": {
      "type": "string",
      "format": "uuid",
      "description": "Ignore a link you do not know: it was made in the app."
    },
    "externalReference": {
      "type": [
        "string",
        "null"
      ],
      "description": "Your reference, `null` for a link made in the app."
    },
    "asset": {
      "type": "string",
      "enum": [
        "USDC",
        "USDT",
        "CUSD"
      ],
      "description": "What arrived: `CUSD` for a cash payment."
    },
    "gross": {
      "$ref": "#/components/schemas/Atomic"
    },
    "gatewayFee": {
      "oneOf": [
        {
          "$ref": "#/components/schemas/Atomic"
        },
        {
          "type": "null"
        }
      ]
    },
    "appliedRateBps": {
      "type": [
        "integer",
        "null"
      ]
    },
    "netCusd": {
      "$ref": "#/components/schemas/Atomic",
      "description": "What your wallet was credited."
    },
    "settledAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "settlement": {
      "type": "object",
      "required": [
        "chain",
        "txHash"
      ],
      "properties": {
        "chain": {
          "type": "string",
          "enum": [
            "arbitrum"
          ]
        },
        "txHash": {
          "type": [
            "string",
            "null"
          ],
          "description": "The transaction that credited your wallet."
        }
      }
    },
    "whishCashIn": {
      "type": [
        "string",
        "null"
      ],
      "description": "The Whish cash-in behind a cash payment; `null` for crypto."
    },
    "destination": {
      "type": "string",
      "enum": [
        "cadmos_wallet"
      ],
      "description": "Always your Cadmos wallet."
    }
  },
  "examples": [
    {
      "id": "0x5f2c0c3d2b1a09f8e7d6c5b4a39281706f5e4d3c2b1a09f8e7d6c5b4a3928170",
      "linkUuid": "0b6f5a8e-1c2d-4e3f-9a8b-7c6d5e4f3a2b",
      "externalReference": "order-42",
      "asset": "USDT",
      "gross": "100000000",
      "gatewayFee": "500000",
      "appliedRateBps": 50,
      "netCusd": "99500000",
      "settledAt": "2026-11-17T10:00:00.000Z",
      "settlement": {
        "chain": "arbitrum",
        "txHash": "0xdfd1a5041e8abc7c9b2f6a0e1d3c5b7a9f8e6d4c2b0a1f3e5d7c9b8a6f4e2d0c"
      },
      "whishCashIn": null,
      "destination": "cadmos_wallet"
    }
  ]
}
```
