Back to Arky

Platform

Platform data, Arky plans, platform administrators, and the platform inboxes

Reference Data

GET /v1/platform/currencies
SDK: sdk.platform.findCurrencies()
GET /v1/platform/events
SDK: sdk.platform.findWebhookEvents()
GET /v1/platform/countries
SDK: sdk.store.country.find()
GET /v1/stores/plans
SDK: sdk.platform.findStorePlans()
const { items: currencies } = await sdk.platform.findCurrencies();
const { items: events } = await sdk.platform.findWebhookEvents();
const { items: plans } = await sdk.platform.findStorePlans();
  • Currencies are every currency Stripe can charge, as lowercase codes.
  • Webhook events list each event a webhook can pick, with the filters it takes.
  • Store plans are Arky’s own plans, with their tier, interval, price and the limits of each plan.

Platform Administrators

GET /v1/platform/administrators
SDK: sdk.platform.administrator.find()
GET /v1/platform/administrators/me
SDK: sdk.platform.administrator.getMe()
POST /v1/platform/administrators
SDK: sdk.platform.administrator.add()
DELETE /v1/platform/administrators/{id}
SDK: sdk.platform.administrator.remove()
interface PlatformAdministrator {
	id: string;
	account_id: string;
	created_at: EpochMilliseconds;
}

await sdk.platform.administrator.add({ id: crypto.randomUUID(), account_id: accountId });

A platform administrator runs Arky itself: full access to every store without a membership, the owner’s actions in any store except transfer, searching all accounts, putting a store on an Arky plan without Stripe, and handling the billing inbox. Administrators add and remove each other in one write; the last one can’t be removed.

Platform Inboxes

GET /v1/platform/incoming-webhooks/stripe-billing
SDK: sdk.platform.stripeBillingEvent.find()
POST /v1/platform/incoming-webhooks/stripe-billing/{id}/resolve
SDK: sdk.platform.stripeBillingEvent.resolve()
GET /v1/platform/incoming-webhooks/resend
SDK: sdk.platform.resendEvent.find()
POST /v1/platform/incoming-webhooks/resend/{id}/resolve
SDK: sdk.platform.resendEvent.resolve()

Stripe’s billing webhooks for stores’ Arky plans, and the posts of Arky’s own Resend account (reports on Arky’s own mail and received support mail), land as incoming webhooks, unique per provider event. Each is waiting (new, retried, or unmatched until its record appears), processing, then applied, ignored, or review with a reason. An administrator resolves a review or unmatched event with apply (try it again) or ignore, carrying its expected_updated_at.

Note

A store’s own provider posts (Stripe and Monri payments, and its own Resend account’s reports) are in the store’s incoming webhooks.