Skip to main content
ArcenClient is the HTTP client that communicates with the ArcenPay backend. It handles authentication, request serialization, and error normalization.

Constructor

Company methods

identify()

Upserts a company and user, returns a session token for ArcenEmbed.

createCompany()

Creates a new company record.

getCompany()

Fetches full company detail including entitlements, add-on grants, users, and overrides.

updateCompany()

Updates a company’s name, traits, plan assignment, or add-on IDs.

listCompanies()

Returns a paginated list of companies.

Company deletion is dashboard-managed

ArcenClient does not expose a deleteCompany() method. Removing a company permanently is a sensitive operation handled from the dashboard’s Customers → Companies screen (requires a catalog:write session role). If you need to remove a customer, use the dashboard UI — do not attempt to script it. Your backend can always anonymize or mark customers inactive through updateCompany().

Subscription methods

activateSubscription()

Executes first-time on-chain subscription activation.

Access check methods

checkFlag()

Simple boolean flag check.

checkEntitlement()

Full entitlement check with usage state.

consumeEntitlement()

Consume metered entitlement with idempotency.

Event tracking

track()

Record an event for analytics or event-based flags.

Additional access checks

checkFlags()

Checks multiple feature flags in one call and returns a record keyed by feature key:

listEntitlements()

Resolves the full entitlement map for a company:
Lists the payment links in your team:
Creates a hosted payment link. Accepts a token symbol or address for acceptedToken, an optional chainId, and isAgentic: true to enable the dual-mode /spec endpoint for autonomous agents:
Fetches a single payment link by ID:
Updates an existing payment link — for example, to deactivate or archive it:
Status values: ACTIVE, INACTIVE, ARCHIVED.

Checkout session methods

createCheckoutSession()

Creates a server-side checkout session, typically for a payment link:

getCheckoutSession()

Fetches a checkout session by ID:

listCheckoutSessions()

Lists your team’s checkout sessions:

getCheckoutSessionStatus()

Resolves a session’s current status — PENDING, PAID, EXPIRED, CANCELLED, or FAILED:

createHostedCheckout()

Creates a checkout session for an existing payment link and returns the hosted checkoutUrl ready to redirect customers:

chargeCustomer()

One-call helper that creates a CUSTOM payment link and checkout session for a one-time charge, with an idempotency key to prevent duplicate charges:

regenerateCheckoutSession()

Creates a fresh checkout session for an existing payment link (useful when a previous session expired) and returns a new hosted checkoutUrl:

Company overrides

setCompanyOverride()

Sets a manual per-company flag override:

Error handling

All client methods throw ArcenApiError on non-2xx responses.

ArcenApiError fields

Last modified on October 4, 2026