All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Check our main developer changelog for information about changes to the Paddle Billing platform, the Paddle API, and other developer tools.
When we make non-breaking changes to the Paddle API, we'll only release a new major version of the Node.js SDK when it causes problems at runtime. We won't release a new version of the SDK when we weaken TypeScript types in a way that doesn't cause existing implementations to break or malfunction. For example, if we add a new field to a request or an allowed value for a field in a response, this weakens the Typescript type but does not cause existing usages to stop working.
This means when upgrading minor versions of the SDK, you may notice type errors. You can safely ignore these or fix by adding additional type guards.
discount.startsAt
for Subscriptions can now benull
- Added
proration
to transaction line items
VND
(Vietnamese dong) as new currency- Added
adjustment.type
which is eitherpartial
which should includeitems
orfull
whereitems
are not required
paddle.webhooks.unmarshal
will now return an event for unhandled event types instead ofnull
this is only possible for legacy/no longer supported events or for new events that have not been added to the sdk yet
- Updated payment-methods export to use
.js
extension
- ESLint rule to ensure
.js
extension is provided
- Updated imports to use
.js
extension
- Added
customerPortalSessions
resources
Breaking changes: This version includes major improvements that introduce breaking changes. These are called out below.
- Added support for edge runtime.
- Added
simulationTypes
resources - Added
simulations
resources - Added
simulationRuns
resources - Added
simulationRunEvents
resources - Added the
trafficSource
filter on notification settings - Omitted the
transactionId
completely fromSubscriptionNotification
and created a separateSubscriptionCreatedNotification
with the non-nulltransactionId
- Added
paymentMethods
resources - Added
generateAuthToken
for customer
- Breaking change: Updated the minimum required Node.js version to v18.
- Breaking change:
Webhooks.unmarshal
andWebhooks.isSignatureValid
now returns a promise. - Enabled conditional exports based on runtimes.
- Switched from
node-fetch
to nativefetch
API.
- Marked
paymentMethodId
as nullable inTransactionPaymentAttempt
as it can benull
.
- Added
adjustments.getCreditNotePDF()
to get a credit note for an adjustment - Added
disposition
query parameter toadjustments.getCreditNotePDF()
andtransactions.getInvoicePDF()
operations, see related changelog. - Added pagination support to
notificationSettings.list()
operation, see related changelog. - Added support for Non-catalog products and prices to the
subscriptions.update()
andsubscriptions.previewUpdate()
operations, see related changelog.
- Marked
notification_id
as optional inIEventsResponse
interface. - Fixed a bug where query parameters with false values were not passed correctly to the API.
- Fixed a bug where query parameters with special characters were not passed correctly to the API.
- Dependabot security updates.
- Updated subscription items model to include
product
. See related changelog.
- Dependabot security updates.
- Added a new option to change the logging level of the SDK. You can now set the logging level to
verbose
,warn
,error
ornone
. The default logging level isverbose
.
- Updated the package to export both CommonJS and ES module formats.
- Updated
Collection
to returnhasMore
andestimatedTotal
properties
- Updated the optional properties returned by
pricingPreview.preview
operation to match the API response.
- Handled missing
unitPriceOverrides
in thesubscriptions.getPaymentMethodChangeTransaction
operation.
- Updated
ErrorCode
enum inTransactionPaymentAttempt
to include a new error codedeclined_not_retryable
- Added
createdAt
andupdatedAt
to product and price entities, see related changelog.
- Updated report API to support
discounts
andproduct_prices
report, see related changelog.
- Removed
ISharedProductResponse
andISharedPriceResponse
interfaces as they were redundant. Please useIProductResponse
andIPriceResponse
instead.
- Exported
ApiError
class for usage intry/catch
block.
- Added
customerId
property toAddress
andBusiness
entities, see related changelog.
- Removed early access notice from README and Changelog.
- Updated Package version to
1.0.0
Breaking changes: This version includes major improvements that introduce breaking changes. These are called out below.
-
Breaking change: Removed
*Includes
entity in favour of standard entities.- Use
Price
instead ofPriceWithIncludes
- Use
Product
instead ofProductWithIncludes
- Use
Subscription
instead ofSubscriptionIncludes
- Use
Transaction
instead ofTransactionIncludes
- Use
Breaking changes: This version includes major improvements that introduce breaking changes. These are called out below.
- We removed the shared entities between API and Notification as we foresee them diverging. No Action required for this change
- Added
availablePaymentMethods
as aninclude
Parameter to all transaction operations. - Added
importMeta
to Subscription webhooks.
- Filter customers by email address in
customers.list()
operation, see related changelog. - New payment method ID field for transaction payments, see related changelog.
- Fixed
effective_from
enum in Resume subscription operations.
- Deprecated
storedPaymentMethodId
from transaction payments in favour ofpaymentMethodId
field.
- The repo and the npm package is now generally available.
- Marked
endsAt
as optional in discount under Subscriptions entity.
- Marked
unitPriceOverrides
as optional in Price entity.
- Marked all properties in
ListNotificationQueryParameters
as optional. - Removed additional
?
from URLS in List Reports and List Notifications functions. - Fixed incorrect enum in Adjustment
type
- Added support for
address.imported
,business.imported
,customer.imported
,price.imported
andproduct.imported
notifications.
- Added support to get available payment methods when previewing prices or transactions, see related changelog.
- Added support to bill a one time non-catalog products and prices to subscription, see related changelog.
- Added support for non-catalog products and prices to transaction, see related changelog.
- Added
subscription.onPaymentFailure
to update subscriptions and preview update subscription operations, see related changelog.
- Added
reports.list()
to list reports - Added
reports.create()
to create a new report - Added
reports.get()
to get a report - Added
reports.getReportCsv()
to get a CSV file for a report
- Added
importMeta
to address, business, customer, discount and subscription entities - Added
creditToBalance
totransaction.details.payoutTotals
andtransaction.details.totals
- Added
origin
query parameter to list transactions, see related changelog.
- Added
eventTypes.list()
to list all event types - Added
notificationSettings.list()
to list all notification settings - Added
notificationSettings.create()
to create a notification settings - Added
notificationSettings.get()
to get a notification settings - Added
notificationSettings.update()
to update a notification settings - Added
notificationSettings.delete()
to delete a notification settings - Added
notifications.list()
to list all notifications - Added
notifications.get()
to get a notification - Added
notifications.replay()
to replay a notification - Added
notifications.getLogs()
to get all logs for a notification
- Fixed incorrect type of
action
insubscriptions.scheduled_change
- Added
events.list()
to list all events - Added helper function
paddle.webhooks.unmarshal
to validate and parse webhook events
- Added helper function to archive supported entities
- Added
pricingPreview.preview()
to preview calculations for one or more prices
- Breaking change: Converted all
list
operations to be synchronous. They did not have any async operation within them, and it was incorrectly typed to return aPromise
.
Breaking changes: This version includes major improvements that introduce breaking changes. These are called out below.
- Added
lodash
as a dependency. - Added
customData
to discount entity, see: related changelog. - Added
name
to price entity, see related changelog. - Added
importMeta
to product and price entities.
- Fixed list credit balances for a customer response entity.
- Fixed
adjustments
array innext_transaction
object in subscription entity.
- Breaking change: Converted all properties from
snake_case
tocamelCase
. This matches JavaScript conventions for field names.
- Breaking change: Removed
toJson
function from all entities.
- Added
transactions.preview()
to preview a transaction operation.
- Added changelog.
- Fixed optional management URL object in subscription entities.
- Added
transactions.getInvoicePDF()
for the get a PDF invoice for a transaction operation. - Enabled request and response logging.
- Removed unused dependency
lodash
.
- Added missing query parameters for the list transactions operation.
- Fixed incorrect update subscription request body TypeScript definition.
- Added
customers.getCreditBalance()
for the list credit balances for a customer operation. - Added
subscriptions.previewUpdate()
for the preview an update to a subscription operation. - Added
subscriptions.activate()
for the activate a trialing subscription operation. - Added
subscriptions.pause()
for the pause a subscription operation. - Added
subscriptions.resume()
for the resume a paused subscription operation. - Added
subscriptions.cancel()
for the cancel a subscription operation. - Added
subscriptions.createOneTimeCharge()
for the create a one-time charge for a subscription operation. - Added
subscriptions.previewOneTimeCharge()
for the preview a one-time charge for a subscription operation. - Added
subscriptions.getPaymentMethodChangeTransaction()
for the get a transaction to update payment method operation.
- Initial early access release. Added support for the most frequently used Paddle Billing entities and API operations. Check the README for more information.