payment-income

Get payment income analytics. (READ access required)

Changed on

Get payment income analytics for Payment Request transactions, over specified time periods.

post/payment/income

Request

  • Base URL: ./../api/v1/ (relative, and the document was published on a file host, not at the API’s origin)
  • URL: ./../api/v1/payment/income
  • Auth: API key in header token

Request body

agentIdentifierstring nullable required

The unique identifier of the agent to get payment income for, if not provided, will return income for all agents

timeZonestring

The time zone to use for the income calculation. If not provided, will use the UTC time zone. Must be a valid IANA time zone name, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

network'Preprod' | 'Mainnet' required

The Cardano network to query income from

filterPaymentSourceType'Web3CardanoV1' | 'Web3CardanoV2'

Filter by payment source type. When omitted, income totals default to Web3CardanoV1 for backwards compatibility.

paymentRail'cardano' | 'x402'

cardano: escrow paymentRequest income (default). x402: seller-side settled x402 attempts for the agentIdentifier on this payment node.

Example request

{
  "agentIdentifier": "example_agent_identifier_asset_id",
  "startDate": "2024-01-01",
  "endDate": "2024-01-31",
  "network": "Preprod"
}

Response

Agent payment income analytics

statusstring required

Example response

{
  "status": "Success",
  "data": {
    "agentIdentifier": "example_agent_identifier_asset_id",
    "periodStart": "2024-01-01T00:00:00.000Z",
    "periodEnd": "2024-01-31T23:59:59.000Z",
    "totalTransactions": 25,
    "TotalIncome": {
      "Units": [
        {
          "unit": "",
          "amount": 45000000
        }
      ],
      "blockchainFees": 2500000
    },
    "TotalRefunded": {
      "Units": [
        {
          "unit": "",
          "amount": 5000000
        }
      ],
      "blockchainFees": 400000
    },
    "TotalPending": {
      "Units": [
        {
          "unit": "",
          "amount": 2000000
        }
      ],
      "blockchainFees": 100000
    },
    "DailyIncome": [
      {
        "day": 10,
        "month": 1,
        "year": 2024,
        "Units": [
          {
            "unit": "",
            "amount": 2000000
          }
        ],
        "blockchainFees": 100000
      }
    ],
    "DailyRefunded": [
      {
        "day": 12,
        "month": 1,
        "year": 2024,
        "Units": [
          {
            "unit": "",
            "amount": 500000
          }
        ],
        "blockchainFees": 20000
      }
    ],
    "DailyPending": [
      {
        "day": 15,
        "month": 1,
        "year": 2024,
        "Units": [
          {
            "unit": "",
            "amount": 500000
          }
        ],
        "blockchainFees": 0
      }
    ],
    "MonthlyIncome": [
      {
        "month": 1,
        "year": 2024,
        "Units": [
          {
            "unit": "",
            "amount": 45000000
          }
        ],
        "blockchainFees": 2500000
      }
    ],
    "MonthlyRefunded": [
      {
        "month": 1,
        "year": 2024,
        "Units": [
          {
            "unit": "",
            "amount": 5000000
          }
        ],
        "blockchainFees": 400000
      }
    ],
    "MonthlyPending": [
      {
        "month": 1,
        "year": 2024,
        "Units": [
          {
            "unit": "",
            "amount": 2000000
          }
        ],
        "blockchainFees": 100000
      }
    ]
  }
}

Changes