npm @adyen/api-library 32.3.0
Adyen Node API Library v32.3.0

6 hours ago

What's Changed

This unreleased range from v32.2.0 to HEAD adds recurring top-up and sweep-execution webhooks, Checkout tax utilities, and richer payment and transfer data. It also hardens HMAC validation and fixes UTF-8 response decoding. Review the compatibility notes before upgrading; the Node.js requirement remains >=18.

Table of contents

  • What's Changed
  • Breaking Changes πŸ› 
  • New Features πŸ’Ž
  • Fixes ⛑️
  • Contributor Notes πŸ”§
  • Other Changes πŸ–‡οΈ
  • PRs πŸ“‹οΈ
  • Contributors

Breaking Changes πŸ› 

Legal Entity Management API

  • Allow SoleProprietorship.countryOfGoverningLaw to be omitted and widen BankAccountInfoAccountIdentificationClass.discriminator from string to string | undefined. Under strict TypeScript checks, handle undefined when reading either member. (#1806)

Session Authentication API

  • Make AuthenticationSessionRequest.allowOrigin optional in the TypeScript model; update code that assumes it is always a string. Continue supplying it for Platform Experience and Onboarding components: omitting it produces an unusable session token. (#1794)

Terminal Cloud API

  • Throw during TerminalCloudAPI construction when terminalApiCloudEndpoint is missing, instead of failing on a later request. Configure a valid LIVE region or an explicit endpoint before constructing the service; this change does not introduce a default region. Related issue: #1785. (#1796)

Other

  • Reject empty, odd-length, quoted, whitespace-padded, or non-hex HMAC keys with an error in calculateHmacSignature, calculateHmac, validateHMAC, validateHMACSignature, and the already-deprecated validateBankingHMAC. Keys are not trimmed. Validators now accept only the exact base64 signature, using constant-time comparison; non-string signatures return false where comparison is reached. Prefer validateHMACSignature(key, signature, data) over validateBankingHMAC, whose key is its second argument. Fix issue #1816. (#1817)

New Features πŸ’Ž

ACS Webhooks

  • Add ChallengeInfo.FlowEnum.OtpPhoneFl (OTP_PHONE_FL) and PasskeyTriggerFl (PASSKEY_TRIGGER_FL) for SMS challenges without a passcode and passkey challenges. (#1811)

Checkout API

  • Add Canadian pay-by-bank direct debit through PayByBankCADirectDebitDetails (paybybank_ca) and the PaymentRequestPaymentMethod union, and add PaymentDetails.TypeEnum.Satispay (satispay). (#1793)
  • Add OpiRequest and OpiResponse to request issuer identifiers and transaction tokens through PaymentRequest.opi and StoredPaymentMethodRequest.opi, and read them through PaymentResponse.opi, PaymentDetailsResponse.opi, and StoredPaymentMethodResource.opi. (#1793)
  • Add CheckoutForwardResponse.accountUpdate and .networkToken, backed by CheckoutForwardAccountUpdateResult and CheckoutForwardNetworkTokenResult, to expose account-updater outcomes and whether forwarding used a network token. (#1793)
  • Add CreateCheckoutSessionRequest.payable and CreateCheckoutSessionResponse.payable to control when a shopper can submit a session payment. Set payable to false while the amount is provisional, then update it to true when final; the default is true. (#1793)
  • Add KlarnaNetworkDetails.klarnaNetworkPaymentAccountId for transactions using a Klarna Network session token. (#1793)
  • Add LineItem.riskCategory for Protect custom risk rules. (#1793)
  • Add UtilityApi.calculateTax, with CalculateTaxRequest, CalculateTaxResponse, and tax-calculation models for India LRS Tax Collected at Source. Read the calculated amounts and the returned taxCalculationToken. (#1809)
  • Add UtilityApi.verifyShopperTaxIdentification, with VerifyShopperTaxIdentificationRequest, VerifyShopperTaxIdentificationResponse, ShopperTaxIdentification, and VerifiedShopperTaxIdentification for tax-identifier verification and its returned verification token. (#1809)
  • Add enhancedSchemeData to CreateCheckoutSessionRequest and CreateCheckoutSessionResponse. (#1809)
  • Add KlarnaNetworkDetails.subtype and SubtypeEnum.Redirect / SubtypeEnum.Sdk to select redirect or SDK flows. (#1809)
  • Add AfterpayDetails.TypeEnum.AfterpaytouchUs (afterpaytouch_US) and StoredPaymentMethodDetails.TypeEnum.Revolutpay (revolutpay), with their payment-method discriminator mappings. (#1809)
  • Add TokenMandate.previousMandateId and .purposeCode to track replaced UPI mandate identifiers and scheme debit restrictions. (#1809)

Configuration Webhooks

Dispute Webhooks

  • Add DisputeEventNotification.TypeEnum.NotAsDescribed (notAsDescribed) and .Cancelled (cancelled). (#1814)

Legal Entity Management API

  • Add residentialAddressIndicator to Organization, SoleProprietorship, Trust, and UnincorporatedPartnership to identify a registered address as a residence. (#1806)
  • Add AdyenCapitalCashAdvance (adyenCapitalCashAdvance) and DirectDebit (directDebit) to AcceptTermsOfServiceResponse.TypeEnum, CalculateTermsOfServiceStatusResponse.TermsOfServiceTypesEnum, GetTermsOfServiceDocumentRequest.TypeEnum, GetTermsOfServiceDocumentResponse.TypeEnum, and TermsOfServiceAcceptanceInfo.TypeEnum. (#1806)

Standard Webhooks

  • Add the REVERSAL event as NotificationRequestItem.EventCodeEnum.Reversal to receive reversal results, including cancellation or refund details in additionalData. (#1813)

Transaction Webhooks

  • Add transactionWebhooks.IssuedCard.networkVariant and NetworkVariantEnum values MaestroUs, Mastercard, and Visa (maestro_us, mastercard, and visa) to identify the processing network variant. (#1789)

Transfer Webhooks

  • Add transferWebhooks.IssuedCard.networkVariant and NetworkVariantEnum values MaestroUs, Mastercard, and Visa; add ReversalReceived (reversalReceived) to Modification.StatusEnum, TransferData.StatusEnum, and TransferEvent.StatusEnum, FxSell / FxBuy to TransferData.TypeEnum, and UsAchCorrectionReasonCode to NetworkReason.NamespaceEnum. (#1788)
  • Add transferWebhooks.TransferData.CategoryEnum.Interest (interest) and TypeEnum.InterestPayout (interestPayout) for business-account interest settlements. (#1818)

Transfers API

  • Add transfers.IssuedCard.networkVariant and NetworkVariantEnum values MaestroUs, Mastercard, and Visa; add ReversalReceived (reversalReceived) to Modification.StatusEnum, Transfer.StatusEnum, TransferData.StatusEnum, and TransferEvent.StatusEnum, FxSell / FxBuy to Transfer.TypeEnum and TransferData.TypeEnum, and UsAchCorrectionReasonCode to NetworkReason.NamespaceEnum. (#1790)
  • Add Interest (interest) to Transfer.CategoryEnum and TransferData.CategoryEnum, and InterestPayout (interestPayout) to both models’ TypeEnum for business-account interest settlements. (#1819)

Fixes ⛑️

Legal Entity Management API

  • Resolve bank-account identification variants using the type discriminator by adding BankAccountInfoAccountIdentificationClass.mapping, so serialization and deserialization select the correct country-specific or IBAN model. (#1806)

Other

  • Decode HTTP response streams as UTF-8 across chunk boundaries in HttpURLConnectionClient, preserving non-ASCII characters in successful responses, error bodies, and API error messages. Fix issue #1807. (#1808)

Contributor Notes πŸ”§

  • Update the development dependency lockfile from fast-uri 3.1.6 to 3.1.8. (#1802)
  • Update the development dependency lockfile from handlebars 4.7.9 to 4.7.10. (#1803)
  • Override @istanbuljs/load-nyc-config to use js-yaml ^4.3.2, removing the obsolete YAML v3 dependency chain and its sprintf-js dependency from the lockfile. Runtime and optional dependency declarations remain unchanged. (#1804)
  • Update the development dependency lockfile from brace-expansion 1.1.18 to 1.1.21. (#1805)

Other Changes πŸ–‡οΈ

Legal Entity Management API

  • Clarify server-side name and address validation requirements in Name, Address, Organization, SoleProprietorship, Trust, and UnincorporatedPartnership documentation; these generated comments do not add client-side validation. (#1806)

Other

  • Expose JSDoc for Config.region, liveEndpointUrlPrefix, and enable308Redirect in published type declarations and IDE help, including the LIVE Terminal API region requirement. (#1815)

PRs πŸ“‹οΈ

Contributors

Full Changelog: v32.2.0...HEAD

Don't miss a new api-library release

NewReleases is sending notifications on new releases.