LOOMAL
SDK / API ReferencePayments

Activity

Bank-statement-style merged feed of payments sent and received

Scope: none — the authenticated Identity can always see its own payment history.

Returns a single chronological feed (latest first) merging payments received (direction: "in") and sent (direction: "out") by this Identity. Useful for a unified spend/income view without two separate calls.

For seller-only history, use GET /v0/payments — same data filtered to inbound and shaped as PaymentSummary.

Request

import { Loomal } from "@loomal/sdk";

const loomal = new Loomal({ apiKey: process.env.LOOMAL_API_KEY! });
const { activity, count } = await loomal.payments.activity({ limit: 50 });

for (const row of activity) {
  if (row.direction === "out") {
    console.log(`paid ${row.amountUsdcRaw} to ${row.counterparty}`);
  } else {
    console.log(`received ${row.amountUsdcRaw} from ${row.counterparty}`);
  }
}
import os
from loomal import Loomal

loomal = Loomal(api_key=os.environ["LOOMAL_API_KEY"])
result = loomal.payments.activity(limit=50)

for row in result["activity"]:
    if row["direction"] == "out":
        print(f"paid {row['amountUsdcRaw']} to {row['counterparty']}")
    else:
        print(f"received {row['amountUsdcRaw']} from {row['counterparty']}")
curl https://api.loomal.ai/v0/payments/activity?limit=50 \
  -H "Authorization: Bearer loid-your-api-key"

Query Parameters

ParamTypeDefaultDescription
limitnumber50Max rows to return, capped at 200. Applied after the in + out merge, so you always get the latest limit events overall.

Response — 200 OK

{
  "activity": [
    {
      "id": "po_abc123",
      "direction": "out",
      "network": "base",
      "amountUsdcRaw": "50000",
      "counterparty": "0x<seller-wallet>",
      "resource": "https://seller.example.com/search",
      "txHash": "0x<onchain-settle-tx-hash>",
      "status": "settled",
      "failureReason": null,
      "createdAt": "2026-05-12T10:00:00.000Z",
      "mandateId": "m_abc123"
    },
    {
      "id": "pi_def456",
      "direction": "in",
      "network": "base",
      "amountUsdcRaw": "25000",
      "counterparty": "0x<buyer-wallet>",
      "resource": "https://your-api.com/search",
      "txHash": "0x<onchain-settle-tx-hash>",
      "status": "settled",
      "failureReason": null,
      "createdAt": "2026-05-11T09:00:00.000Z",
      "endpointId": "se_abc",
      "endpoint": { "id": "se_abc", "urlPattern": "https://your-api.com/search" }
    }
  ],
  "count": 2
}

Row fields

Every row shares a common shape; direction discriminates the two variants.

FieldDescription
idUnique payment id. Prefixed po_ for outbound, pi_ for inbound.
direction"out" (you paid) or "in" (you received).
amountUsdcRawAmount in raw USDC units (6 decimals). Divide by 1,000,000 for the decimal value.
counterpartySeller wallet on out rows; payer wallet on in rows.
resourceURL the payment was for. null only for orphaned inbound rows.
txHashOn-chain settle hash on Base. null for failed or unsettled rows.
status"settled", "verified", "failed", or "unpaid_delivered".
failureReasonHuman-readable cause when status === "failed".
endpointId / endpoint(Inbound only) The seller endpoint that received the payment, when registered.
mandateId(Outbound only) The mandate that authorized this spend.

Errors

StatuserrorCause
401unauthorizedMissing or invalid Authorization header

Next

On this page