Changelog
All notable changes to the Yona SDK and API.
v0.7.0 — 2026-06-09
New: CollectionService
Collect invoice payments from buyers via virtual (bank) accounts. Inbound transfers are reconciled against the seller’s invoices and any excess is held as buyer credit, then settled to the seller’s registered bank — Yona never holds buyer money. 15 new methods on client.collection:
- Settlement accounts:
addSettlementAccount(),resolveBankAccount(),listSettlementAccounts(),getSettlementAccount(),listBanks() - Collection accounts:
createAccount(),listAccounts(),getAccount(),getAccountStatus(),deactivateAccount() - Payments, exceptions & credits:
listPayments(),refundPayment(),listExceptions(),resolveException(),listBuyerCredits()
Requires the new collection.read / collection.manage permissions. See API Reference — Collection.
New webhook events
- Collection:
collection.payment_received,collection.payment_reconciled,collection.payment_applied,collection.settlement_updated. - Invoice authority outcomes now delivered:
invoice.approved,invoice.rejected,invoice.submission_failed, andinvoice.status.changednow fire when the tax authority responds to a submission. Previously these were documented but not emitted — subscribe to be notified of the FIRS outcome, not just submission.
Other
- System roles are now Owner, Admin, Member (the former
VIEWERrole is renamed toMEMBER).
v0.5.1 — 2026-05-13
This release includes breaking changes. Please review before upgrading.
Breaking changes
NotificationServiceremoved. Use webhooks for event delivery instead.getSetup()removed from all services. These endpoints returned dashboard form metadata and are no longer part of the SDK.checkBalance()now requiresaccountIdas the first parameter. Update all call sites:client.billing.checkBalance(accountId).
New: RoleService
Six new methods for managing custom RBAC roles within your organization:
create(),list(),get(),update(),delete()getAvailablePermissions()— list all assignable permissions
New invoice methods
getResources()— list available invoice resources (currencies, unit codes, etc.)getResourceByType(type)— get a specific resource typelookupTaxId(params)— look up taxpayer information by TINvalidateReference(params)— validate an invoice reference numbersubmitTaxReport(params)— submit a tax report for a period
New billing methods
getAccountStats()— get billing account statisticsgetTransaction(id)— get a single credit transaction by IDsubscribeAndPay(params)— subscribe to a plan and pay in one callgetRenewalHistory(subscriptionId)— list renewal history for a subscriptiongetRenewalStats(subscriptionId)— get renewal statistics
New user methods
sendPhoneVerification(id, params)— send OTP to a user’s phone numberverifyPhone(id, params)— verify OTP and mark phone as verified
v0.4.3 — 2026-04-22
New: InvitationService
Six methods for managing organization invitations:
create(),list(),resend(),revoke()verify(token)— verify an invitation token (public, no auth required)accept(token, params)— accept an invitation (public, no auth required)
New organization hierarchy methods
getCreditPoolConfig()— get credit pool configuration for parent orgsupdateCreditPoolConfig(params)— update credit pool settingsgetChildren()— list child organizations
New billing method
transferCredits(params)— transfer credits between organizations in a hierarchy
New types
CreditPoolConfig,TransferCreditsParams,Invitation,AcceptInvitationResult
v0.3.0 — 2026-04-17
This release includes breaking changes. Please review before upgrading.
Breaking changes
- Enum values changed from UPPERCASE to lowercase. For example,
InvoiceStatus.DRAFTis nowInvoiceStatus.draft. Update all enum comparisons. - PostalAddress fields renamed.
streetNameis nowline1,cityNameis nowcity,countrySubentityis nowstate,postalZoneis nowpostalCode,countryCodeis nowcountry. - Type renames.
TINis nowTaxNumber.PaymentStatusis nowInvoicePaymentStatus.
New: B2B2B platform support
Three new methods on the EInvoice client for multi-tenant / partner use cases:
forOrganization(orgId)— scope all requests to a child organizationforApiKey(apiKey)— authenticate with a provisioned API keycreateOrganizationWithApiKey(params)— create a child org and get an API key in one call
New services
- WebhookService — create, list, update, delete webhook endpoints; test delivery; retry failed deliveries
- ApiKeyService — create, list, get, revoke, rotate API keys; manage key roles and permissions
- OrganizationService — create, list, get, update, delete organizations; onboarding; TIN and phone verification
- UserService — list, get, update users; manage roles, status, and permissions
New billing methods
- Subscription management:
getSubscription(),cancelSubscription(),getPlans() - Payment methods:
getPaymentMethods(),addPaymentMethod(),removePaymentMethod(),setDefaultPaymentMethod()
New invoice methods
searchHsnCodes(query)— search HSN/SAC codes for line itemsgetHsnCode(code)— get details for a specific HSN code
v0.2.0 — 2026-03-21
Improvements
- SDK configuration improvements (backward compatible)
- Better error messages for invalid configuration
v0.1.0 — 2026-03-20
Initial release of @useyona/einvoice-js.
Services
- InvoiceService (15 methods) — create, list, get, update, delete, submit, batch submit, retry, cancel, validate, download, statistics
- SellerService (8 methods) — CRUD, TIN verification, search, bulk delete
- BuyerService (8 methods) — CRUD, TIN verification, search, bulk delete
- BillingService (12 methods) — account info, credit balance, purchase credits, transaction history, usage analytics
Core features
- Webhook HMAC-SHA256 signature verification with replay protection
- Typed error hierarchy:
EInvoiceError,EInvoiceApiError,EInvoiceConfigError,EInvoiceNetworkError - HTTP client with exponential backoff retry, rate limiting, and configurable timeouts
- Zero runtime dependencies
- Dual ESM + CJS output