@klappay/types
6.3.0
Minor Changes
- c69348f: Adds
RecipientTransferabilitySchema(withRecipientTransferabilityPairSchemaandTransferRestrictionStatusSchema), the response of the newGET /v1/recipients/{id}/transferabilityendpoint (recipients:read). For each token/network pair enabled in the calling key's environment, it reports what the token issuer's own contract says about the recipient's address.receivesays whether it can be credited andsendwhether it can move funds out; each isallowed,restrictedorunknown. The only source is the token contract's on-chain view function (USDCisBlacklisted, USDTisBlackListed/isBlocked). USDT only restricts senders, so itsreceiveis alwaysallowed.POST /v1/chargescan now answer422 recipient_transfer_restricted(param: acceptedPayments) when the issuer restricts an address the charge pays from receiving on an accepted pair. The message lists only the affected pairs.
6.2.0
Minor Changes
- 233f79f: Adds
EscrowSafeTransactionSchema(andEscrowTypedDataSchema), the response of the newGET /v1/charges/{id}/release/prepareandGET /v1/charges/{id}/refund/prepareendpoints: the exact Safe transaction Klappay will execute for an escrow release or refund — destination, token, amount in base units, chain id, Safe nonce, its EIP-712typedDataandsafeTxHash— so an integrator signstypedDatawith any EIP-712 signer instead of reconstructing the Safe transaction themselves.toSignableEscrowTypedDataturns that JSON into the shape viem's typings expect (bigintnumbers, literal field types fromESCROW_SAFE_TX_TYPES).ReleaseEscrowRequestSchema/RefundEscrowRequestSchemadescriptions now point at the prepare endpoints, andEscrowConfigSchema.releaserAddressdocuments that the releaser must be an externally-owned account, can move escrowed funds directly on-chain, and can't be rotated for an existing charge. Escrow release, refund and prepare can now answer422 escrow_safe_mismatchwhen the escrow's Safe can't be rebuilt at the charge's address.
6.1.0
Minor Changes
- a1f63ca:
CheckChargeResponseSchemagains two required fields,tokenSendersanduserOperationSenders, alongsidetransactionSender. They carry on-chain evidence of who paid when the payer didn't sign the transaction itself: thefromof the paying accepted-token transfers (an EIP-7702 wallet behind a gas-sponsoring relayer), and the ERC-4337 account whose own user operation paid (a bundler-submitted transaction, swaps included). Both are[]whenevertransactionSenderisnull.transactionSender's description no longer claims it is always the payer's wallet.
6.0.1
Patch Changes
795085e: Documents the narrowed
transactionSendersemantics onCheckChargeResponseSchema: it is now only populated when the hintedtxHashactually paid the charge. On a still-open charge, the receipt must contain a Transfer of an accepted token to the charge's address. On an already-confirmed/underpaidcharge, the hash must be a transfer already credited to it on that network — previously such a charge always returnednull, which made a re-check after an SSEconfirmedevent unable to learn the sender. Also updatesconfirmationProgress's description, since a terminal charge with a matching hint now makes one receipt read instead of none.Description-only change; no schema shape changes.
6.0.0
Major Changes
d4f77e4: Arc now settles through official 0xSplits v2.2, the same Push split factory every other EVM network uses, instead of a separate self-hosted split deployment.
NETWORK_FAMILIES.arcis now'evm-official', so an Arc charge's split address is the same one predicted for Base, Arbitrum and the other EVM networks, andacceptedPaymentscan now mixarcwith any other EVM network. Mixing TRON with any EVM network (Arc included) is still rejected.Breaking:
'arc'has been removed from theNetworkFamilyunion (and fromNETWORK_FAMILIES' value type). Code that switches or branches onNetworkFamily === 'arc'must treat Arc as'evm-official'instead.
5.2.0
Minor Changes
200aaeb: Re-enables
USDC/USDTpayments on BNB Chain (live) —isPaymentDeploymentEnabledno longer hardcodesbnb+livetofalse. A charge can now accept BNB the same as any other operational network, andGET /v1/networkslists it accordingly.This lifts the SEG-01 containment introduced 2026-09-14 after a decimals bug (BNB's contracts use 18 decimals; the previous payment-preparation path assumed 6) — that bug was fixed in the same release that added the containment; today's change only removes the policy block kept on top of the already-fixed decimals-handling path. Existing charges held by that containment (
Charge.paymentIntegrityHold) are unaffected by this change — each still needs its own reviewed release throughPOST /internal/payment-integrity/correctionsbefore its hold clears, regardless of this policy flip. Seedocs/security.md#seg-01anddocs/operations.md#seg-01-deployment-and-historical-reviewfor the full history and the release mechanism.Additive, non-breaking for any existing integration: a
bnb+USDC/USDTacceptedPaymentspair that was previously rejected with422 token_not_supportedor503 payment_temporarily_unavailableis now accepted — no previously-valid request changes behavior.
5.1.1
Patch Changes
6bf30ef: Fixes a bundle-size regression in
@klappay/types/constantsintroduced by the Arc/TRON onboarding changesets:tokens.constants.ts's newtrondeployment (TOKEN_DEPLOYMENTS.USDT.tron) calledtronAddress(), which lived inaddresses.ts— the same file as the zod-basedSplitAddressSchema. Importing that one pure function pulled the wholezoddependency into any consumer of the zero-zod/constantssubpath, ballooning it from ~2.4KB to ~120KB once bundled (verified with an isolatedesbuildprobe importing onlyEVM_NETWORKS).Splits
addresses.tsintoaddresses.constants.ts(the pure types/functions:EvmAddress,TronAddress,SplitAddress,isEvmAddress,isTronAddress,isSplitAddress,tronAddress,addressesEqual— nozodimport) andaddresses.ts(justSplitAddressSchema, re-exporting the constants file), mirroring the existingtokens.ts/tokens.constants.tssplit.tokens.constants.tsnow importstronAddressfromaddresses.constantsinstead. No public API change —addresses.ts/the main@klappay/typesexport still re-export everything exactly as before; only the/constantssubpath's actual bundled weight changes.
5.1.0
Minor Changes
7ea60e6: Adds
arctoNetwork/EVM_NETWORKS/OPERATIONAL_NETWORKS/CHAIN_IDS(livechain5042,testchain5042002) and itsUSDCdeployment (TOKEN_DEPLOYMENTS/TOKEN_ADDRESSES, both environments) — Arc's own native gas asset, exposed through an optional ERC-20-compatible interface rather than a separately-deployed contract. AddscirBTC, Circle's own BTC-backed token, as Arc's swap-to-pay trusted alt-token (liveonly, matching every other alt-token entry).Also adds
NETWORK_FAMILIES, grouping everyNetworkinto'evm-official' | 'tron' | 'arc'— a charge predicts one split address up front and reuses it across every accepted network, which is only safe when every accepted network resolves that address through the same split factory. Arc runs its own, self-hosted 0xSplits fork (@klappay/arc-splits) with a different factory than every officially-supported network, soAcceptedPaymentsSchemanow rejects (400validation_error) a request whoseacceptedPaymentsmixes networks across families. Escrow is also supported on Arc — Safe's canonical proxy-factory/singleton deployment was independently verified live against bothrpc.mainnet.arc.ioandrpc.testnet.arc.network.Additive, non-breaking: existing
Networkvalues,TOKEN_ADDRESSESentries, and previously-validacceptedPayments/escrow combinations are unchanged — no prior request could have includedarc, since it didn't exist inNetworkbefore this.
5.0.0
Major Changes
bef5535: Expand the swap-to-pay trusted alt-token set with established, deeply-liquid cryptocurrencies per network:
LINK(Ethereum, Arbitrum, Optimism, Polygon, Base, Avalanche's bridgedLINK.e),ARB(Arbitrum),OP(Optimism),CBETH(Base), andBTC.bfilling Avalanche's previously-emptyBTCslot. BNB Chain is intentionally untouched — its payment methods remain disabled by the SEG-01 containment, so there is no accepted-payment pair to swap into there yet.Breaking:
AltTokenSchema's'MATIC'literal is renamed to'POL', matching Polygon's own 2024 native-currency rename — same asset, same 18 decimals, only the accepted string changed. Any integration reading'MATIC'offswapAlternatives/CreateSwapQuoteSchema.inputToken/SwapQuoteSchema.inputTokenneeds to switch to'POL'.
4.1.0
Minor Changes
7114359: Add per-network/environment token deployment metadata and availability helpers. Preserve
TOKEN_ADDRESSESas a derived compatibility view and the legacyTOKEN_DECIMALSexport; integrations should use each deployment's own decimals instead. Both cataloged BNB Chain tokens have 18 decimals and their payment pairs are currently disabled.Add optional exact decimal-string amounts and fees to charge and swap responses, plus an optional charge payment-availability flag. Existing numeric fields remain available for compatibility.
4.0.0
Major Changes
db02385: Renames the
moralis_webhookTransactionSourcevalue tocontract_watcher, andHealthSchema.lastMoralisEventAgeSecondstolastContractWatcherEventAgeSeconds— Core's payment-detection push path moved from a third-party webhook (Moralis Streams) to a self-hosted on-chain event subscription (contract-watcher.ts), so the value/field names describing that path changed to match. No behavior change for the confirmation-depth/trust model itself: every detected transfer was always independently re-verified on-chain and re-derived against the current block, regardless of which path detected it first.Any integrator branching on
TransactionSource === 'moralis_webhook'or readinglastMoralisEventAgeSecondsfromGET /v1/healthneeds to update to the new names.
3.8.0
Minor Changes
- 924abc3: Adds
ChargeFeePayerSchema(ChargeFeePayer,'merchant' | 'payer') and afeePayerfield onCreateChargeSchema/ChargeSchema— setfeePayer: 'payer'at creation to gross upamountso the payer covers Klappay's fee instead of it being deducted from your payout.ChargeSchemaalso gainsfeePercent(now public, was internal-only),feeAmount, andmerchantAmountso a client can render a price breakdown without reimplementing the fee math itself. - 56385aa: Adds
ConfirmationProgressSchema(ConfirmationProgress) —{ network, blocksSeen, blocksRequired, percent }, reporting how close an already-detected transfer is to its network's required confirmation depth before it's credited.CheckChargeResponseSchemanow carries it asconfirmationProgress(present while a detected transfer isn't deep enough yet,nullotherwise), andGET /v1/charges/{id}/eventsstreams the same shape as a newevent: confirmation_progressSSE event alongside the existingevent: charge.
3.7.0
Minor Changes
- 1cb8f20: Add
RefundEscrowRequestSchema, thecharge.escrow_refundedwebhook event, andescrow.refundedAtonChargeSchema— support forPOST /v1/charges/{id}/refund, which returns an escrow's full balance to the payer instead of the split address.
3.6.0
Minor Changes
- ff085f9:
POST /v1/charges/{id}/check's response now carriestransactionSender— thetxHashtransaction's own signer/sender, which stays the payer's real wallet even when the payment routes through a swap/aggregator, unlike the credited transfer's ownfrom. AddsCheckChargeResponseSchema(ChargeSchemaplustransactionSender), matching whatPOST /internal/charges/{id}/checkalready returned.
3.5.2
Patch Changes
- d9dec69:
CreateChargeSchema.idempotencyKey's description now documents the409 idempotency_key_reusederror a caller gets when reusing a key with a different request body, instead of only describing the successful-replay case.
3.5.1
Patch Changes
- ec700f3: Update the escrow section of
docs/charges.md—escrowis now enabled onPOST /v1/charges(Core's creation guard was lifted after live end-to-end verification). No schema change.
3.5.0
Minor Changes
- 703d59c: Add
charge.escrow_releasedtoChargeWebhookEventTypeSchema, fired once an escrow-configured charge's funds move from its Safe to the split address via the newly-implementedPOST /v1/charges/{id}/release. Also correctsReleaseEscrowRequestSchema's description, which previously (inaccurately) said the release amount was fixed at escrow creation — it's actually the escrow's live on-chain balance at release time, since the destination is fixed but the amount received can vary (underpay/overpay/installments).
3.4.0
Minor Changes
- 16e5271: Add
escrowReleaserAddress,escrowFeePercent, andescrowReleasedAtto thechargesresource's queryable dimension, metric, and date fields in the metrics query schema (ChargesQueryFieldSchema,ChargesMetricFieldSchema,ChargesDateFieldSchema), so escrow-configured charges can be filtered and aggregated throughPOST /v1/metrics/query.
3.3.0
Minor Changes
cec1236: Adds
EscrowConfigSchema(escrowfield onCreateChargeSchema/ChargeSchema) andReleaseEscrowRequestSchema— the request/response shapes for creating an escrow-configured charge, where funds lock in a dedicated non-custodial Safe until a signature fromescrow.releaserAddressreleases them.releaserAddressis optional and defaults to the API key's ownpayoutAddresswhen omitted.Not yet usable end to end:
POST /v1/chargescurrently rejects any request carryingescrowwith503 escrow_unavailable, since the release endpoint these schemas exist for hasn't shipped yet. The schemas are published ahead of that so integrators building against@klappay/typesdon't hit a moving target once it does.
3.2.0
Minor Changes
- bedfcd7: Adds
CheckChargeRequestSchema(CheckChargeRequest) — the optionaltxHash/networkrequest body for the newPOST /v1/charges/{id}/checkon-demand payment check endpoint. Lets a caller that already has a transaction hash (e.g. right after a swap-to-pay or wallet-connect transaction is sent) point the check at that specific transaction directly instead of a broader block-range scan. Both fields are optional and only ever accepted together — omitting them falls back to the existing scan.
3.1.1
Patch Changes
- 25f6b44: Fix
SwapQuoteSchema.permit2rejecting a native-currency (ETH/BNB/MATIC/AVAX) swap quote with aZodError. 0x's own API sendspermit2: nullexplicitly for a native-currency sell, not an omitted key —.optional()only ever acceptedundefined, so a genuinely valid quote crashed the route with a 500 before it ever reached a consumer.permit2is now.nullish(), acceptingnull(the real shape) alongsideundefinedfor backwards compatibility.
3.1.0
Minor Changes
a2ca627: Add
CHAIN_IDS, a canonicalRecord<EvmNetwork, Partial<Record<Environment, number>>>mapping each network/environment pair to its EVM chain ID (e.g.8453for Base mainnet,84532for Base Sepolia) — the same IDs a wallet'swallet_switchEthereumChainor an RPC provider expects.Also adds a second entry point,
@klappay/types/constants, that re-exports every plain-object constant this package already had (TOKEN_ADDRESSES,ALT_TOKEN_ADDRESSES,NETWORK_LABELS,NETWORK_EXPLORERS,EVM_NETWORKS,OPERATIONAL_NETWORKS,TOKEN_DECIMALS,ALT_TOKEN_DECIMALS) plus the newCHAIN_IDS, with zerozodin its bundle — for a browser/wallet-side app that only needs the plain values and doesn't want to pay for the schema-validation code that ships with the main@klappay/typesentry.Both are additive: the root
@klappay/typesentry point is unaffected — every existing import keeps working exactly as before, with identical values.
3.0.2
Patch Changes
5f30729: Fixes
Charge.swapAlternatives, shipped incomplete in the previous release: it was returning a flat list of tokens (e.g.['ETH', 'BTC']), which loses the network a charge accepting payment on more than one chain actually needs the payer to send on — a token likeBTCalso resolves to a materially different contract per network (cbBTCvsWBTC). It now returns{ token, network }pairs (SwapAlternativeSchema) — pass an entry'stoken/networkstraight through asinputToken/inputNetworkonPOST /v1/charges/{id}/quote.listAltTokensForNetworksis renamedlistSwapAlternativesto match, returning the same pairs.Also fixes:
Charge.swapAlternativesis now always empty for atest-environment charge, even when swap-to-pay is configured and the charge's networks have a trusted alt-token — 0x, who powersPOST /v1/charges/{id}/quote(klap-core), has no testnet support at all, confirmed live against the real API (it rejects every testnet chain id outright). That endpoint now also fails fast with422 swap_test_environment_unsupportedfor a test charge, before spending a rate-limit slot or an upstream 0x call on a request that could never succeed.
3.0.1
Patch Changes
- 44a3c7c: Adds swap-to-pay support — a payer can now settle a charge with a non-stablecoin cryptocurrency, swapped into one of the charge's own
acceptedPaymentstokens viaPOST /v1/charges/{id}/quote(klap-core).ChargeSchema.swapAlternativeslists which cryptocurrencies are trusted as swap input for a given charge, derived from itsacceptedPaymentsnetworks. New exports:AltTokenSchema/AltToken(ETH,BNB,MATIC,AVAX,BTC),ALT_TOKEN_ADDRESSES,ALT_TOKEN_DECIMALS,listAltTokensForNetworks(alt-tokens.ts), andCreateSwapQuoteSchema/SwapQuoteSchema(swap.ts).BTCis backed byWBTC(Ethereum, Arbitrum, Optimism, Polygon) orcbBTC(Base) —SwapQuoteSchema.permit2is present only for this kind of ERC-20 input, since it needs a Permit2 allowance signature that a network's own native currency (ETH/BNB/MATIC/AVAX) never does.SwapQuoteSchema.feesbreaks out both Klappay's own swap fee and 0x's separate protocol fee (when it applies), so a client can show the payer exactly who's charging what — neither ever reducesoutputAmount, the merchant's full amount owed. Seedocs/payments.md(klap-core)'s "Swap-to-pay" section for the full flow.
3.0.0
Major Changes
0cb9c1d:
splitRecipientsnow references a pre-registeredRecipientby id instead of a raw address — closes the same redirect risk the 2.0.0payoutAddress-in-the-JWT change closed for the primary payout destination, reopened through this field. Seedocs/security.md's finding #50 (klap-core).Breaking:
CreateChargeSchema.splitRecipientsentries are now{ recipientId, percent, label? }—addressis no longer accepted.SplitRecipientInputSchemareplaces the old input shape ofSplitRecipientSchema;SplitRecipientSchemaitself is now the response-only shape echoed onChargeSchema.splitRecipients(still{ address, percent, label? }, since a merchant reading their own charge back needs the resolved address, not the id they submitted).POST /v1/chargesrequires the newcharges:split_writescope in addition tocharges:writewheneversplitRecipientsis present — a key with onlycharges:writecan no longer create a charge with a split at all, even one referencing an already-registered recipient.
Added:
POST /v1/recipients,GET /v1/recipients,PATCH /v1/recipients/{id},DELETE /v1/recipients/{id}— register, list, and revoke trusted split-recipient addresses.CreateRecipientSchema,RecipientSchema,SetRecipientPayoutSchema.- Four new
ApiKeyScopevalues:charges:split_write,recipients:read,recipients:write,recipients:manage_payout. The last is deliberately stricter thanrecipients:write— it's the only way a recipient becomes eligible to be used as an API key's ownpayoutAddress, meant to be held only by a key that's already gone through its own out-of-band approval (e.g. Dashboard's internal key), never a merchant-facing or third-party integration key. CONFLICTING_SCOPE_PAIRS/findConflictingScopes—charges:split_writecan never be granted to the same key asrecipients:write/recipients:manage_payout; Core rejects such a key outright (403 conflicting_api_key_scopes) on every request, not just at mint time.
See
packages/types/docs/api-keys.mdanddocs/payments.md(klap-core) for the full detail, including whyrecipients:writealone can never disable another key even though revoking apayout: truerecipient does.Also declares
engines.node: ">=24", matching the rest of the monorepo (CI already builds/tests/publishes this package on Node 24).
2.0.4
Patch Changes
- d7319e6: Fixes
CheckoutProductSchema/KlappayCheckoutMetadataSchema/MetadataWithKlappaySchema(checkout-metadata.ts) not being exported from the package's entry point — they existed and were correctly wired intoCharge.metadata's shape, but couldn't be imported by name.
2.0.3
Patch Changes
- e13fd8e: Adds
KlappayCheckoutMetadataSchema(checkout-metadata.ts) — validates theklappaykey insideCharge.metadata, today carrying an optionalproductslist (name,quantity,imageUrl) shown on Klappay's hosted checkout page. Every other key inmetadatastays exactly as free-form and unvalidated as before. Seepackages/types/docs/charges.md.
2.0.2
Patch Changes
- b6086dd: Adds
splitRecipientstoCreateChargeSchema— optional, up to 5 extra addresses (e.g. a supplier, or whoever closed the sale) to route a slice of a charge's split to. Eachpercentis of the merchant's own net share (100 - feePercent), never the grossamount. Echoed back onChargeSchema.splitRecipients. Seepackages/types/docs/charges.md.
2.0.1
Patch Changes
- e95240d: Adds
redirectUrltoCreateChargeSchema— optional, where to send the payer once a charge resolves if you use Klappay's hosted checkout page. Echoed back onChargeSchema.redirectUrl, alongside a newChargeSchema.checkoutUrl(nullable —nullif the deployment has no hosted checkout configured). Seepackages/types/docs/charges.md.
2.0.0
Major Changes
cc2697e: Major surface reduction: Core now covers only charges, webhooks, distributions, networks, and metrics. Account signup/login, organization/member management, API key issuance, and platform administration all moved to a separate Dashboard service. Charge cancellation and continuous/dormant charge modes are gone — every charge now resolves automatically on a short, fixed timeline. The public/redacted charge-lookup surface is gone — that integration is being built separately, outside this repo. In exchange, API keys gained granular scopes.
Removed:
auth.ts,users.ts,organization.ts,invitations.ts,api-keys.ts— everySignup/Login/AuthResponse,User/UserRole,Organization,ApiKey/CreateApiKeyInput, invitation schema.public-charges.ts—PublicChargeSchema/PublicCharge.GET /v1/public/charges/{id}and its SSE/QR-code siblings no longer exist.- Charge cancellation —
POST /v1/charges/{id}/cancelis gone.'canceled'is removed fromChargeStatusSchema;Charge.canceledAtis removed.'charge.canceled'/'charge.paid_after_cancel'are removed fromChargeWebhookEventTypeSchemaandTimelineEventTypeSchema;ChargePaidAfterCancelDatais removed. - Continuous/dormant charge mode —
ChargeModeSchema/ChargeModeand themodefield onCreateChargeSchema/ChargeSchemaare gone.ChargeSchema.pausedAtis gone.'charge.contribution_received'/'charge.contribution_settled'/'charge.paused'/'charge.reactivated'are removed fromChargeWebhookEventTypeSchema.ChargesQueryFieldSchema(metrics query) dropsmode. SandboxEventTriggerSchema/SandboxEventTriggerInput/NonChargeTriggerableEventSchema— the generic non-charge sandbox trigger endpoint is gone.SandboxTriggerSchema(charge-event triggers) is unchanged.MetricsQueryScopeSchema/MetricsQueryScope—MetricsQueryResultSchema.metano longer has ascopefield; there's no member-vs-org access split left to report.WebhookEventTypeSchema'saccount/securitycategories —AccountWebhookEventTypeSchema/SecurityWebhookEventTypeSchemaand everyauth.*/member.*/payout_address.changed/api_key.*/webhook.created/webhook.deleted/webhook.secret_rotated/fee_tier.updatedevent (plus their*Datatypes inwebhook-event-data.ts) are gone. Onlypaymentsandwebhookscategories remain — 11 events total, down from 36.WebhookCategorySchemais now'payments' | 'webhooks'.
Changed:
CreateChargeSchema.amount/.expiresInare no longer optional — every charge now has a real target amount and a real deadline.CHARGE_EXPIRES_IN_MAX_SECONDSdrops from 365 days to3600(60 minutes), sized off real on-chain confirmation latency across every chain Klappay supports. Min stays 60 seconds.- Business metrics querying moves from
POST /v1/organizations/{id}/metrics/query(session-authenticated) toPOST /v1/metrics/query(API-key-authenticated, no organization in the path) — every valid key gets access to its own tenant's data, no member/role sub-scoping.
Added:
ApiKeyScopeSchema/ApiKeyScope/API_KEY_SCOPES— the fixed set of permissions an API key can carry (charges:read,charges:write,webhooks:read,webhooks:write,webhooks:manage_secret,metrics:read,metrics:charges:read,metrics:transactions:read,metrics:distributions:read,sandbox:trigger).MetricsQuerySchemagains ayeardate-bucket granularity,expiresAtas a charges date field,distributorAddressas a distributions dimension field, andprocessingStartedAtas a distributions date field.
1.1.2
Patch Changes
- aa3fe9f: Simplified — public charge endpoints no longer require
?environment=.GET /v1/public/charges/{id}, its SSE sibling, andGET /v1/public/charges/{id}/qrcodenow look a charge up byidalone — already a global primary key, not scoped by organization or environment, so there was nothing left to disambiguate.environmentcomes back as a field on the response instead of being a required input; callers who want to assert it matches an expectation do so themselves.GetPublicChargeQuerySchemaandGetPublicChargeQrCodeQuerySchemaare removed — the QR endpoint now takes the sameGetChargeQrCodeQuerySchema({ token?, network? }) the authenticated one already used. No real consumer of the removed schemas yet, hencepatchrather than a version bump reflecting a breaking change.
1.1.1
Patch Changes
- b6c5206: Added — public, unauthenticated QR code:
GET /v1/public/charges/{id}/qrcodeis the unauthenticated sibling ofGET /v1/charges/{id}/qrcode— identical EIP-681 QR code, no API key required, newGetPublicChargeQrCodeQuerySchema(GetPublicChargeQuerySchemaextended with the sametoken/networkselectors the authenticated endpoint already has). Nothing new to redact: the QR only ever encodesaddress/acceptedPayments/amount, already exposed byGET /v1/public/charges/{id}. The authenticated endpoint stays —klap-app's dashboard genuinely uses it today, and keeping that trusted, low-volume traffic off the public endpoint's rate limit (sized to absorb anonymous, potentially abusive traffic) is a real reason to keep both, not just inertia.
1.1.0
Minor Changes
3d37a04: API surface cleanup and additions. Bundled as one release,
minorrather thanmajordespite three technically breaking changes below — a deliberate call: there are no real production consumers of any of them yet, so this was treated as pre-1.0-style flexibility rather than forcing a major bump for changes nobody is actually depending on.Removed —
/v1/verify(breaking): the public, unauthenticated proof-of-payment surface (GET /v1/verify/{id},GET /v1/verify/{id}/events) is gone, along with its exported schemas (VerifyChargeSchema,VerifyPaymentSchema,VerifySplitEntrySchema,SplitRecipientRoleSchema) and the now-unusedChargeStatusEventSchema/ChargeStatusEvent. It had no real integrator depending on it — every first-party consumer already reads charge status through the authenticatedGET /v1/charges/{id}/GET /v1/charges/{id}/eventsinstead.Moved —
/v1/cli/listen→/v1/webhooks/listen(breaking URL change): same endpoint, same behavior, relocated because it's a generic "stream every webhook event live" capability, not something exclusive to the official CLI.@klappay/clineeds the corresponding update.Changed —
GET /v1/distributions/pendingnow paginated (breaking response shape): was a flat array capped at 200 rows; now returns the same{ data, nextCursor, hasMore }envelope every other list endpoint uses (PaginatedPendingDistributionsSchema), removing the hard cap.GET /v1/distributions/pending/eventsgained an optional?limit=for a self-contained snapshot+live connection (newListenPendingDistributionsQuerySchema) — omitting it keeps the original connect-then-fetch behavior unchanged.Added — cancel a charge:
POST /v1/charges/{id}/cancelmarks apending/partially_paid,mode: standardchargecanceled— the one terminalChargeStatusvalue that's merchant-initiated rather than reached automatically. NewCharge.canceledAtfield, two new webhook events (charge.canceled, andcharge.paid_after_cancelfor the rare case a payment still lands on a canceled charge's address afterward).Added — public, unauthenticated charge lookup:
GET /v1/public/charges/{id}and its SSE siblingGET /v1/public/charges/{id}/eventsreturn a new, redactedPublicChargeshape (PublicChargeSchema) — no API key required, for a consumer with no per-org key at all (e.g. a hosted checkout). This is the public, unauthenticated use case/v1/verifyused to serve, brought back in a different, safer shape now that a real consumer exists: safety comes from redacting the response (apiKeyId/externalRef/sourcealways dropped;metadatafiltered to only the reservedklappaykey, if present,nullotherwise), not from a scoped credential. Both endpoints require?environment=(GetPublicChargeQuerySchema) — there's no key to infer it from, and a mismatch is indistinguishable from the charge not existing (404), so the endpoint can't be used to probe an id's real environment. Draws from its own rate limit and, for the SSE variant, its own small connection budget, independent of every authenticated endpoint.
1.0.9
Patch Changes
- 627868c: Adds
GetChargeQrCodeQuerySchemaforGET /v1/charges/{id}/qrcode— a new endpoint returning a scannable EIP-681 payment QR code (SVG) for a charge.token/networkquery params select which accepted(token, network)pair to encode when a charge accepts more than one.
1.0.8
Patch Changes
- 055606b: Adds schemas for three new self-service account endpoints:
ChangeNameSchema(PATCH /v1/auth/me),ChangePasswordSchema(POST /v1/auth/change-password, requires the current password), andChangeEmailSchema/ConfirmEmailChangeSchema(POST /v1/auth/change-email→POST /v1/auth/confirm-email-change, confirmed via the current email address before it takes effect). Also exportsSelfUserSchema(the "pure identity" shapeAuthResponseSchema.useralready used) and three newsecurity-category webhook events:auth.password_changed,auth.email_change_requested,auth.email_changed.
1.0.7
Patch Changes
- 4f2d3e5:
WebhookSchema/WebhookListItemgainenvironment('live' | 'test' | null) — set automatically from whichever API key created the webhook,nullfor a webhook created before this field existed.charges/webhooks-category events are now only delivered to a webhook whoseenvironmentmatches the event's own (or to anull-environment webhook, which still receives every environment);account/securityevents have no environment concept and are unaffected. Seedocs/webhooks.md's "Environment scoping" section.
1.0.6
Patch Changes
- db8177e:
MetricsQuerySchema'sorderBy.keynow requires the same safe-identifier pattern (^[a-zA-Z_][a-zA-Z0-9_]*$) asmetrics[].alias— every legitimate output column name (agroupByfield, a metric's default name, or its alias) already matches this shape, so this only rejects a value that could never have been a real column reference in the first place.
1.0.5
Patch Changes
- 97e02a5: Adds
MetricsQuerySchemaand its supporting types — the request/response contract for a new session-authenticated, org-scoped ad-hoc metrics query endpoint (charges/transactions/distributionsresources, with per-resource typed field enums for filters/groupBy/aggregation). Ametrics[].aliasmust match^[a-zA-Z_][a-zA-Z0-9_]*$and must not collide with agroupByfield name or the reserved wordbucket(it can become a SQL column alias server-side). Seedocs/metrics.mdandpackages/types/docs/metrics-query.mdfor the endpoint itself. - 36b2d49: Documents
Organization.currentFeePercent/feeUpdatedAtmore fully — why the platform fee exists, that it's dynamic (volume-based by default, but Klappay may assign a specific organization a different rate), and that it's frozen onto each charge at creation. No exact tier thresholds/percentages are published — those stay internal by design. - a06fecf: Renames the brand name from "Klap" to "Klappay" wherever it appears in schema descriptions and docs, for consistency with the
@klappaypackage scope and domain.
1.0.4
Patch Changes
b9cd132: Adds a
*Requesttype —z.input<typeof Schema>— alongside every*Inputtype (z.infer<typeof Schema>) for a schema with a default or transform, for SDKs and other callers that build a request object before it's parsed:CreateChargeRequest,ListChargesRequestInviteUserRequestCreateWebhookRequest,ListWebhookDeliveriesRequestListApiKeysRequestListUsersRequestListOrganizationsRequestPaginationQueryRequest
*Inputguarantees every defaulted/transformed field is present (mode,limit, etc.) since it describes an already-parsed value — that made it the wrong type for a caller building a request, where those same fields are meant to be optional.docs/charges.md'sCreateChargeInputexample actually failed to type-check for exactly this reason (missingmode/currency); it and the other affected docs now use the matching*Requesttype instead.
1.0.3
Patch Changes
1d3e9b1: No code changes — updates package metadata and README.md so npm shows everything correctly:
- Adds
keywordsfor npm search discoverability. README.md's documentation table,CHANGELOG.mdlink, andLICENSElink all now point at real, working URLs — a public docs site at api.klappay.com/types (including a changelog page) for the first,unpkg.comfor the second — instead of relative paths, which never rendered as navigable links on npmjs.com.docs/is no longer bundled in the published tarball — the public docs site above is now the canonical place to read it.docs/*.mdhad five stray references to this repo's own internal (private, unpublished) documentation by bare path — removed, since an external reader could never reach them.
- Adds
1.0.2
Patch Changes
00dd00a: No code changes — updates package metadata and docs links so npm shows them correctly:
- Adds
keywordsfor npm search discoverability. README.md's documentation table now links to api.klappay.com/docs (a dedicated public docs site) instead of relative./docs/*.mdpaths, which never rendered as navigable links on npmjs.com.docs/is no longer bundled in the published tarball — the public docs site above is now the canonical place to read it.
- Adds
1.0.1
Patch Changes
- 2dbda30: Test changeset to verify the version/publish pipeline end to end (OIDC trusted publishing, the "Version Packages" PR flow, CHANGELOG.md generation). No functional change to the package.
1.0.0
Initial public release.
TypeScript types and Zod schemas for the Klappay Core API's full request/response surface:
- Charges — create/read charges, with an optional
amount(pay-what-you-want) and optionalexpiresIn(never-expiring charges), acontinuouscollection mode alongside the defaultstandardmode, activity/pause tracking (lastActivityAt/pausedAt), and creator attribution (apiKeyId,createdByUserId,invitedByUserId). - Organizations — multi-org membership, each with its own role, plus an invite/accept flow by email.
- Webhooks — registration, delivery inspection, and the full event vocabulary across payments/account/webhooks/security categories.
- Sandbox — simulate charge and account events with
testAPI keys, no real transactions. - Verify — public, unauthenticated proof-of-payment lookup.
- Distributions — discover settlement payouts claimable within their grace period.
- Auth & accounts, tokens & networks, errors & health — see
packages/types/docs(published at api.klappay.com/types) for the full topic-split reference.
See packages/types/README.md for usage.
