Référence de l'API

Analytics

Account summary, balances and operational logs.

GET
/v1/summary

The settled volume per asset, and every asset valued in USD at NEAR Intents' current reference price (volumeUsd, indicative). Without those prices the USD fields are null and the rest answers as usual.

Requires the payments:read scope.

apiKey
headerAuthorizationBearer <API key>

Your Cosmos Pay secret API key, sent as Authorization: Bearer <apiKey>.

OK

no_authenticated_consumer: The gateway forwarded no API key identity

insufficient_scope: the API key does not hold the scope this route requires. The shared public API key also gets this on every route that is not marked x-cosmos-public-key, with a message saying so; more scopes will not help, the key is the wrong one.

gateway_required: the request did not arrive through APISIX.

Unexpected server error. The detail is logged server-side and never returned: there is nothing in the body to branch on beyond the code.

Example Request
curl -X GET 'https://api.cosmospay.lat/cosmos-api/v1/summary'
Example Response
{  "totals": {    "all": 137,    "succeeded": 120,    "pending": 9,    "submitted": 3,    "failed": 4,    "cancelled": 1,    "expired": 0,    "successRate": 87.6  },  "volume": [    {      "chain": "stellar",      "asset": "XLM",      "amount": "10420.5",      "count": 42,      "amountUsd": "10418.42"    }  ],  "volumeUsd": "12843.17",  "unpriced": 0,  "webhooks": {    "endpoints": 3,    "deliveries": 1204,    "failedDeliveries": 7  },  "customers": 58,  "series": [    {      "date": "2026-06-21",      "count": 12,      "volume": "842.75"    }  ],  "recent": [    {      "id": "clz9xpi00001",      "kind": "PAY",      "status": "SUCCEEDED",      "chain": "stellar",      "amount": "25.5",      "asset": "XLM",      "destination": "GDEST…",      "createdAt": "2026-06-21T12:34:56.000Z"    }  ]}
GET
/v1/summary/series

Payments, swaps, liquidity operations, webhook deliveries and private payments, each grouped into the buckets of period (UTC, weeks from Monday, a quiet bucket a zero), with the totals of the window and of the window before, for growth. Payments carry their settled volume in USD too (volumeUsd), each asset valued at NEAR Intents' current reference price (indicative). Without those prices the USD fields are null and the rest answers as usual.

Requires the payments:read scope.

apiKey
headerAuthorizationBearer <API key>

Your Cosmos Pay secret API key, sent as Authorization: Bearer <apiKey>.

period?string

day: 30 days, week: 12 weeks, month: 12 months, year: 5 years.

Default"day"
Value in"day""week""month""year"

OK

The body, query or path failed validation. message is an array of the individual failures.

Routes that reject a valid request for a reason of their own (an amount, a memo, a state) document the code for it on their own 400.

no_authenticated_consumer: The gateway forwarded no API key identity

insufficient_scope: the API key does not hold the scope this route requires. The shared public API key also gets this on every route that is not marked x-cosmos-public-key, with a message saying so; more scopes will not help, the key is the wrong one.

gateway_required: the request did not arrive through APISIX.

Unexpected server error. The detail is logged server-side and never returned: there is nothing in the body to branch on beyond the code.

Example Request
curl -X GET 'https://api.cosmospay.lat/cosmos-api/v1/summary/series'
Example Response
{  "period": "month",  "buckets": [    {      "start": "2026-10-01",      "count": 31,      "succeeded": 27,      "failed": 3,      "volume": "1842.5",      "volumeUsd": "1790.36"    }  ],  "totals": {    "count": 284,    "succeeded": 251,    "failed": 19,    "volume": "17410.25",    "volumeUsd": "16982.04",    "unpriced": 0,    "payers": 96  },  "previous": {    "count": 284,    "succeeded": 251,    "failed": 19,    "volume": "17410.25",    "volumeUsd": "16982.04",    "unpriced": 0  },  "swaps": {    "buckets": [      {        "count": 42,        "succeeded": 37,        "failed": 3,        "start": "2026-10-01",        "volumeUsd": "1250.40"      }    ],    "totals": {      "count": 42,      "succeeded": 37,      "failed": 3,      "inProgress": 2,      "byKind": {        "dex": 30,        "chain": 8,        "crossChain": 4,        "usdt0": 2      },      "volumeUsd": "1250.40",      "unpriced": 0    },    "previous": {      "count": 42,      "succeeded": 37,      "failed": 3,      "volumeUsd": "1250.40"    }  },  "liquidity": {    "buckets": [      {        "count": 42,        "succeeded": 37,        "failed": 3,        "start": "2026-10-01"      }    ],    "totals": {      "count": 42,      "succeeded": 37,      "failed": 3    },    "previous": {      "count": 42,      "succeeded": 37,      "failed": 3    }  },  "webhooks": {    "buckets": [      {        "start": "2026-10-01",        "deliveries": 26,        "failed": 1      }    ],    "totals": {      "deliveries": 310,      "failed": 4    },    "previous": {      "deliveries": 310,      "failed": 4    }  },  "zkPayments": {    "buckets": [      {        "start": "2026-10-01",        "count": 12,        "succeeded": 9,        "expired": 2,        "volume": "450.5",        "volumeUsd": "112.63"      }    ],    "totals": {      "count": 48,      "succeeded": 41,      "expired": 5,      "volume": "2140.25",      "volumeUsd": "535.06",      "fees": "0.214025",      "feesUsd": "0.05"    },    "previous": {      "count": 48,      "succeeded": 41,      "expired": 5,      "volume": "2140.25",      "volumeUsd": "535.06",      "fees": "0.214025",      "feesUsd": "0.05"    }  }}
GET
/v1/balances

Per chain and asset, what this consumer's payment intents settled (amount, with their count) and what is still PENDING or SUBMITTED (pending), on the API key’s network only (mainnet for a production key, testnet for a test key). Largest settled amount first, as { data, total } with no paging. Reused per consumer and network for a few seconds (10 by default), so a new payment can take that long to show.

Requires the payments:read scope.

apiKey
headerAuthorizationBearer <API key>

Your Cosmos Pay secret API key, sent as Authorization: Bearer <apiKey>.

OK

no_authenticated_consumer: The gateway forwarded no API key identity

insufficient_scope: the API key does not hold the scope this route requires. The shared public API key also gets this on every route that is not marked x-cosmos-public-key, with a message saying so; more scopes will not help, the key is the wrong one.

gateway_required: the request did not arrive through APISIX.

Unexpected server error. The detail is logged server-side and never returned: there is nothing in the body to branch on beyond the code.

Example Request
curl -X GET 'https://api.cosmospay.lat/cosmos-api/v1/balances'
Example Response
{  "data": [    {      "chain": "stellar",      "asset": "XLM",      "amount": "10420.5",      "pending": "120",      "count": 42    }  ],  "total": 3}
GET
/v1/logs

This consumer's requests, newest first, with method, path, status code, duration, client IP and user agent; the dashboard’s own console calls are left out. status is ok below 400, pending for a 4xx and fail for a 5xx. Paged with take (default and maximum 100) and skip; answers { data, total, take, skip }, never cached.

Requires the payments:read scope.

apiKey
headerAuthorizationBearer <API key>

Your Cosmos Pay secret API key, sent as Authorization: Bearer <apiKey>.

take?number

Page size: how many items to return (1 to 100).

Range1 <= value <= 100
Default100
skip?number

How many items to skip before this page (offset).

Range0 <= value
Default0

OK

The body, query or path failed validation. message is an array of the individual failures.

Routes that reject a valid request for a reason of their own (an amount, a memo, a state) document the code for it on their own 400.

no_authenticated_consumer: The gateway forwarded no API key identity

insufficient_scope: the API key does not hold the scope this route requires. The shared public API key also gets this on every route that is not marked x-cosmos-public-key, with a message saying so; more scopes will not help, the key is the wrong one.

gateway_required: the request did not arrive through APISIX.

Unexpected server error. The detail is logged server-side and never returned: there is nothing in the body to branch on beyond the code.

Example Request
curl -X GET 'https://api.cosmospay.lat/cosmos-api/v1/logs'
Example Response
{  "data": [    {      "id": "clz9xlog00001",      "method": "POST",      "path": "/v1/swaps",      "statusCode": 201,      "durationMs": 84,      "ip": "203.0.113.7",      "userAgent": "curl/8.4.0",      "status": "ok",      "at": "2026-06-21T12:34:56.000Z"    }  ],  "total": 41203,  "take": 100,  "skip": 0}
GET
/v1/logs/webhooks

Deliveries to every webhook endpoint of this consumer, newest first: the endpoint and its url, eventType, eventId, attempts, the last responseStatus and error, and status (ok when delivered, fail when failed, pending otherwise). The payload is never included. Paged with take (default and maximum 100) and skip; answers { data, total, take, skip }, never cached.

Requires the webhooks:read scope.

apiKey
headerAuthorizationBearer <API key>

Your Cosmos Pay secret API key, sent as Authorization: Bearer <apiKey>.

take?number

Page size: how many items to return (1 to 100).

Range1 <= value <= 100
Default100
skip?number

How many items to skip before this page (offset).

Range0 <= value
Default0

OK

The body, query or path failed validation. message is an array of the individual failures.

Routes that reject a valid request for a reason of their own (an amount, a memo, a state) document the code for it on their own 400.

no_authenticated_consumer: The gateway forwarded no API key identity

insufficient_scope: the API key does not hold the scope this route requires. The shared public API key also gets this on every route that is not marked x-cosmos-public-key, with a message saying so; more scopes will not help, the key is the wrong one.

gateway_required: the request did not arrive through APISIX.

Unexpected server error. The detail is logged server-side and never returned: there is nothing in the body to branch on beyond the code.

Example Request
curl -X GET 'https://api.cosmospay.lat/cosmos-api/v1/logs/webhooks'
Example Response
{  "data": [    {      "id": "clz9xwd00001",      "endpointId": "we_9z8a1b0000abcd1234efgh",      "url": "https://acme.test/hooks",      "eventType": "PAYMENT_INTENT_SUCCEEDED",      "eventId": "evt_2c3d4e5f-aaaa-bbbb-cccc-1234567890ab",      "attempts": 1,      "responseStatus": 200,      "error": null,      "status": "ok",      "at": "2026-06-21T12:34:57.000Z"    }  ],  "total": 1204,  "take": 100,  "skip": 0}