Every webhook event we emit for your business, kept for 30 days whether or not an endpoint took it. Use it to reconcile, or to catch up after your endpoint was down: list what happened since the last event you handled and process what you haven't seen. Events are recorded once your business has a webhook endpoint or an API key, and need a key with the events permission (read only). Test events from Send test event never appear here.
| Topic | Detail |
|---|---|
| Endpoints | `GET /api/v1/events`, `GET /api/v1/events/{id}` |
| Key permissions | events:read |
| Samples | curl; Node.js 18+ with the built-in fetch (in an ES module); the Node SDK (preview: not on npm yet); Python with requests. |
| Every request can also answer | 401 UNAUTHORIZED, 401 API_KEY_EXPIRED, 403 NOT_ENROLLED, 403 PERMISSION_DENIED, 403 IP_NOT_ALLOWED, 429 RATE_LIMITED, 500 INTERNAL_ERROR. See Error codes. |
The event object
The same envelope a webhook delivery carries, plus object and pendingWebhooks: how many of your endpoints are still retrying it.
{
"object": "event",
"id": "evt_3f9a1c2b7d4e6f8a0b1c2d3e4f5a6b7c",
"type": "payment.succeeded",
"created": "2026-10-14T16:02:16.000Z",
"livemode": true,
"data": {
"object": "payment",
"livemode": true,
"id": "pay_7Hq2LmX9cR4tVb",
"status": "paid",
"amountCents": 12500,
"amountRefundedCents": 0,
"netCents": 12088,
"currency": "usd",
"description": "Consulting — October",
"source": {
"type": "payment_link",
"id": "pl_4kTz8QwN2xYb6RcD1mPa"
},
"paymentLinkId": "pl_4kTz8QwN2xYb6RcD1mPa",
"customer": {
"name": "Jordan Lee",
"email": "jordan@example.com",
"country": "US"
},
"card": {
"brand": "visa",
"last4": "4242"
},
"paymentMethod": {
"type": "card",
"label": "Visa •••• 4242"
},
"clientReference": "order_1042",
"metadata": {
"campaign": "fall-launch"
},
"amountDetails": {
"subtotalCents": 12500,
"discountCents": 0,
"shippingCents": 0,
"taxCents": 0,
"customerFeeCents": 0
},
"dispute": null,
"failureMessage": null,
"createdAt": "2026-10-14T16:02:11.000Z",
"paidAt": "2026-10-14T16:02:15.000Z"
},
"pendingWebhooks": 0
}| Field | Type | Description |
|---|---|---|
object | string | The type of object. Always event. |
id | string | evt_…: the same id as the delivery's Anytime-Event-Id header. |
type | string | One of payment.succeeded, payment.failed, payment.refunded, refund.created, refund.succeeded, refund.failed, dispute.opened, dispute.updated, dispute.closed, invoice.created, invoice.sent, invoice.paid, invoice.overdue, invoice.voided, subscription.created, subscription.updated, subscription.paused, subscription.resumed, subscription.past_due, subscription.canceled, payment.review_required, customer.created, customer.updated, payout.paid, payout.failed. |
created | string (date-time) | When it happened. |
livemode | boolean | False for test-mode data (an ak_test_ key); true for live data. |
data | object | The API object the event is about, as it was then. |
pendingWebhooks | integer | Endpoints still retrying it. |
Endpoints
List events
/api/v1/eventsevents:readEvery event emitted for the business in the last 30 days, newest first, whether or not a webhook endpoint took it: for reconciliation and catching up on missed deliveries. Each is the envelope a webhook delivery carries, plus pendingWebhooks. To catch up after downtime, list from your last handled event's created and skip ids you've already handled.
Query
typestring- An event type (payment.succeeded), a family (payment.*), or up to 10 of either, comma-separated.
createdFromstring- Created at or after: 2026-10-01 or an ISO 8601 date-time.
createdTostring- Created before (exclusive), same format.
objectIdstring- Only events about this object:
pay_…,re_…,inv_…,sub_…,cus_…. limitinteger- How many objects per page, 1–100. Default 25. See Pagination.
cursorstring- The previous page's
nextCursor, for the page after it.
curl "https://anytime-capital.com/api/v1/events?type=payment.*&createdFrom=2026-10-14" \
-H "Authorization: Bearer $ANYTIME_API_KEY"const res = await fetch("https://anytime-capital.com/api/v1/events?type=payment.*&createdFrom=2026-10-14", {
headers: { Authorization: `Bearer ${process.env.ANYTIME_API_KEY}` },
});
const page = await res.json();
if (!res.ok) throw new Error(`${page.error.code}: ${page.error.message}`);import os
import requests
res = requests.get(
"https://anytime-capital.com/api/v1/events",
headers={"Authorization": f"Bearer {os.environ['ANYTIME_API_KEY']}"},
params={"type": "payment.*", "createdFrom": "2026-10-14"},
timeout=30,
)
page = res.json()
if not res.ok:
raise RuntimeError(f"{page['error']['code']}: {page['error']['message']}"){
"object": "list",
"data": [
{
"object": "event",
"id": "evt_3f9a1c2b7d4e6f8a0b1c2d3e4f5a6b7c",
"type": "payment.succeeded",
"created": "2026-10-14T16:02:16.000Z",
"livemode": true,
"data": {
"object": "payment",
"livemode": true,
"id": "pay_7Hq2LmX9cR4tVb",
"status": "paid",
"amountCents": 12500,
"amountRefundedCents": 0,
"netCents": 12088,
"currency": "usd",
"description": "Consulting — October",
"source": {
"type": "payment_link",
"id": "pl_4kTz8QwN2xYb6RcD1mPa"
},
"paymentLinkId": "pl_4kTz8QwN2xYb6RcD1mPa",
"customer": {
"name": "Jordan Lee",
"email": "jordan@example.com",
"country": "US"
},
"card": {
"brand": "visa",
"last4": "4242"
},
"paymentMethod": {
"type": "card",
"label": "Visa •••• 4242"
},
"clientReference": "order_1042",
"metadata": {
"campaign": "fall-launch"
},
"amountDetails": {
"subtotalCents": 12500,
"discountCents": 0,
"shippingCents": 0,
"taxCents": 0,
"customerFeeCents": 0
},
"dispute": null,
"failureMessage": null,
"createdAt": "2026-10-14T16:02:11.000Z",
"paidAt": "2026-10-14T16:02:15.000Z"
},
"pendingWebhooks": 0
}
],
"hasMore": false,
"nextCursor": null
}Errors
- 400
INVALID_INPUT - A field, filter,
limitorcursoris missing or invalid. The message starts with the field's name, as inamountCents: …, or readsInvalid cursor.Fix the named field. Don't retry the same request unchanged.
Get an event
/api/v1/events/{id}events:readOne event from the last 30 days, by the id a webhook delivery carries (Anytime-Event-Id).
Path
idstringrequiredevt_…
curl https://anytime-capital.com/api/v1/events/evt_3f9a1c2b7d4e6f8a0b1c2d3e4f5a6b7c \
-H "Authorization: Bearer $ANYTIME_API_KEY"const res = await fetch("https://anytime-capital.com/api/v1/events/evt_3f9a1c2b7d4e6f8a0b1c2d3e4f5a6b7c", {
headers: { Authorization: `Bearer ${process.env.ANYTIME_API_KEY}` },
});
const event = await res.json();
if (!res.ok) throw new Error(`${event.error.code}: ${event.error.message}`);import os
import requests
res = requests.get(
"https://anytime-capital.com/api/v1/events/evt_3f9a1c2b7d4e6f8a0b1c2d3e4f5a6b7c",
headers={"Authorization": f"Bearer {os.environ['ANYTIME_API_KEY']}"},
timeout=30,
)
event = res.json()
if not res.ok:
raise RuntimeError(f"{event['error']['code']}: {event['error']['message']}"){
"object": "event",
"id": "evt_3f9a1c2b7d4e6f8a0b1c2d3e4f5a6b7c",
"type": "payment.succeeded",
"created": "2026-10-14T16:02:16.000Z",
"livemode": true,
"data": {
"object": "payment",
"livemode": true,
"id": "pay_7Hq2LmX9cR4tVb",
"status": "paid",
"amountCents": 12500,
"amountRefundedCents": 0,
"netCents": 12088,
"currency": "usd",
"description": "Consulting — October",
"source": {
"type": "payment_link",
"id": "pl_4kTz8QwN2xYb6RcD1mPa"
},
"paymentLinkId": "pl_4kTz8QwN2xYb6RcD1mPa",
"customer": {
"name": "Jordan Lee",
"email": "jordan@example.com",
"country": "US"
},
"card": {
"brand": "visa",
"last4": "4242"
},
"paymentMethod": {
"type": "card",
"label": "Visa •••• 4242"
},
"clientReference": "order_1042",
"metadata": {
"campaign": "fall-launch"
},
"amountDetails": {
"subtotalCents": 12500,
"discountCents": 0,
"shippingCents": 0,
"taxCents": 0,
"customerFeeCents": 0
},
"dispute": null,
"failureMessage": null,
"createdAt": "2026-10-14T16:02:11.000Z",
"paidAt": "2026-10-14T16:02:15.000Z"
},
"pendingWebhooks": 0
}Errors
- 404
NOT_FOUND - No such object on your business (an id from another business reads the same), or no such endpoint under
/api/v1, which still answers in JSON. Check the id and the path. Ids are case-sensitive.