All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
This change log follows the format documented in Keep a CHANGELOG.
- Export
PaddleWeb
namespace frompaddle-billing/web
for convenience.
- Fixed TypeScript types resolution in different environments.
- BREAKING: The root index now exports only API methods. To access the webhooks functionality, use
paddle-billing/webhooks
. For the web API, usepaddle-billing/web
.
- Improved the Paddle.js wrapper types: added
PaddleWeb.Items
. Allow passing a singleemail
when opening checkout.
- BREAKING: Custom data objects are now passed to core types as
Paddle.CustomDataDef
and resolved usingPaddle.ResolveCustomData
right in the entity type. That allows using a single custom data definition type for all entities. Unless you used thePaddle
namespace extensively, this change likely won't affect your codebase at all.
- Fixed
Paddle.Checkout
complaining about missingcustomData
when none is defined.
- Added types for payment's
status
anderror_code
:Paddle.PaymentStatus
andPaddle.PaymentErrorCode
correspondingly.
- Moved the
payments
property in theTransaction
type fromdetails
to the root level where it is supposed to be.p
customData
is now not required in the checkout props when usingtransactionId
as it must be already attached to the transaction.
- Added missing
transaction.paid
event to the webhooks.
- Improved web portion types, making checkout methods closer to the actual API:
- At least on item is required when
items
is passed. - Made
customer
optional. - Made
quantity
optional (it defaults to1
).
- At least on item is required when
- Fixed TypeScript errors on
Paddle.Checkout.open
.
- Added the ability to pass a function that returns the key as the key argument to
client
. This allows the use of Google Cloud Secrets and callingclient
on the module level where the secrets aren't defined inprocess
.
previewPrices
success response now correctly doesn't include pagination information.
-
Reorganized custom data types to share between API and web modules. If you used
PaddleAPI
and see a missing type, use thePaddle
namespace instead. -
Transaction
andSubscription
custom data should now overlap. Fields that do not overlap should be optional. It's dictated by the web's custom data-assigning to relevant transaction and subscription simultaneously. Creating an API or web client with incompatible custom data definitions will result in the client function returningnever
.
- Added web portion of Paddle Billing platform that allows working with Paddle from the browser, i.e., open checkout. Use
loadScript
to load and use the web API. See README for more information.
- BREAKING:
parseWebhookBody
now expects a client instance (created withclient
function) ornull
as the first argument so that theEvent
that is returned from the function has the correct custom data types inferred.
-
Added
custom_data
field toCustomer
,Address
andBusiness
. -
client
now acceptsCustomer
,Address
andBusiness
properties in the generic argument.
- Fixed
current_billing_period
field inSubscription
. Now it'sTimePeriod
.
Initial release