Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.prudra.dev/llms.txt

Use this file to discover all available pages before exploring further.

Payment audit logs

Every successful payment creates a PaymentLog record in Prudra’s database. Audit logs let you trace which API key was used for each payment, which endpoint was called, how much was paid, and which vault was created.
Dashboard support for viewing payment logs is coming soon. Use the API to query logs programmatically.

Log fields

FieldTypeDescription
idstringUnique log ID
organisationIdstringThe organisation that owns this log
accountIdstringThe account that created the API key used
apiKeyIdstringThe specific API key used — links to the key that received payment
routePathstringThe endpoint that was called (e.g. /analyse)
protocolstringPayment protocol used: 'x402' or 'mpp'
amountstringAmount paid in USD
currencystringAlways 'USD' in Phase 1
txHashstringOn-chain transaction hash. Verify on the relevant chain’s explorer.
paymentIdstringThe internal Payment record ID
vaultIdstringThe vault created for this payment (if any)
createdAtstringISO timestamp of the payment

The apiKeyId field

The apiKeyId field is particularly useful for multi-service deployments. If you issue separate API keys for different services, each payment log includes which key was used. This lets you:
  • Attribute revenue to specific services
  • Detect unexpected usage from an API key
  • Revoke a key if it shows unusual payment patterns
  • Audit which service triggered which vault creation

Query parameters

ParameterDescription
routePathFilter by endpoint path
protocolFilter by 'x402' or 'mpp'
apiKeyIdFilter by specific API key
limitMaximum results (default: 50, max: 500)
cursorPagination cursor from previous response
startDateISO timestamp — payments after this date
endDateISO timestamp — payments before this date