Create a client.
Connection + credential options; see AbsolutePayConfig.
ReadonlybalancesWorkspace asset balances and FX-valued summary (scope: balances:read).
ReadonlycheckoutsHosted checkout links — payer picks the asset/chain (scopes: invoices:write / invoices:read).
ReadonlyconversionsAsset-to-asset conversions + settled convert history (scopes: convert:write / convert:read).
ReadonlydepositsOwn-balance deposit addresses + settled deposit history (scope: balances:read).
ReadonlyfeesFee previews from the pricing matrix (scope: balances:read).
ReadonlygiftcardsGift-card issuance and templates (scopes: balances:read to read, payments:write to issue).
ReadonlyinvoicesInvoices — up-front fixed-address flow (scopes: invoices:write / invoices:read).
ReadonlyofframpCrypto → fiat off-ramp to a bank account (scopes: payouts:write / payouts:read).
ReadonlypayoutsBatch crypto payouts (scopes: payouts:write / payouts:read).
ReadonlyreconciliationSettled pay-in / withdrawal ledgers for reconciliation (scope: ledger:read).
ReadonlyrefundsRefunds on settled collections (scope: payments:write).
ReadonlysubscriptionsRecurring plans and subscriptions (scopes: subscriptions:write / subscriptions:read).
Low-level request primitive used by every resource. Adds the Bearer auth header, signs the request when a signing secret is set, enforces the configured timeout, and turns non-2xx responses into AbsolutePayError. You rarely call this directly — prefer the typed resource methods — but it is available for endpoints the SDK does not yet wrap.
Expected shape of the parsed JSON response.
HTTP method.
Path INCLUDING query string, e.g. /v1/balances?quote=USDT.
Optionalbody: unknownOptional request body; JSON-serialized and sent with content-type: application/json.
OptionalextraHeaders: Record<string, string>Optional headers merged AFTER signing (e.g. Idempotency-Key), so they are not part of the signed canonical string.
The parsed response body as T (or null when the response has no body).
The AbsolutePay API client — the entry point to the SDK.
Construct it once with your credentials and reuse the instance; every resource (balances, payouts, invoices, …) hangs off it as a property. When a
signingSecretis configured the client HMAC-signs every request automatically. This is a SERVER-SIDE client: your API key and signing secret must never reach a browser.Example