Updates to our Python, Node.js, Go, and PHP SDKs
Our SDKs now support the latest API features, including webhook simulations, new Korean payment methods, and balance reports, unlocking more Paddle Billing workflows in your integrations.
What's new?
We've updated our Python, Node.js, Go, and PHP SDKs to support the latest API features, including webhook scenario simulations, new Korean payment methods, and balance reports.
How it works
SDKs in Paddle make it easier to work with the Paddle Billing platform. They reduce the amount of boilerplate code you need to write and include helper functions to make it quicker and easier to integrate Paddle Billing.
We've shipped some major updates to the Paddle platform and our API in the past months, including configuration options for webhook scenario simulations, new Korean payment methods, and balance reports.
Now, our SDKs support these new features, enabling you to take full advantage of the latest capabilities in your applications.
Summary of changes
SDK updates
This is a summary of the changes in our SDKs:
Our SDK for Python has been updated to version 1.8.0
.
Methods
These are new or updated methods and parameters now available in the Python SDK:
Method | Parameters | Type | Summary | Related changelog |
---|---|---|---|---|
adjustments.create() | tax_mode | string | Determines whether amounts for a partial refund are inclusive or exclusive of tax. When external , Paddle calculates tax on top of the amounts you provide. Defaults to internal . | Tax exclusive refunds |
client_tokens.create() | name , description | string , string | Create a client-side token. | Client-side tokens API |
client_tokens.get() | client_token_id | string | Get a client-side token. | Client-side tokens API |
client_tokens.list() | statuses | list | List client-side tokens, optionally filtering by status. | Client-side tokens API |
client_tokens.revoke() | client_token_id | string | Revoke a client-side token. | Client-side tokens API |
client_tokens.update() | client_token_id , status | string , string | Update a client-side token. | Client-side tokens API |
discounts.get() | include | ["discount_group"] | Include the related discount_group in the response. | Discount groups |
discounts.list() | discount_group_ids , mode , include | list , string , ["discount_group"] | Filter discounts by discount group or mode, and include the related discount_group . | Discount groups |
discount_groups.create() | name | string | Create a discount group. | Discount groups |
discount_groups.list() | ids | list | List discount groups, optionally filtering by ID. | Discount groups |
reports.create() | type | "balance" | Create a balance report. | Balance reports |
simulations.create() | config.entities | object | Create a webhook simulation to populate entity details into simulated webhooks. Valid entity fields depend on the type of scenario you are simulating. | Configure webhook scenario simulations |
simulations.create() | config.options | object | Create a webhook simulation which sends events as if certain conditions occurred. Valid option fields depend on the type of scenario you are simulating. | Configure webhook scenario simulations |
simulations.update() | config.entities | object | Update a webhook simulation to populate entity details into simulated webhooks. Valid entity fields depend on the type of scenario you are simulating. | Configure webhook scenario simulations |
simulations.update() | config.options | object | Update a webhook simulation which sends events as if certain conditions occurred. Valid option fields depend on the type of scenario you are simulating. | Configure webhook scenario simulations |
Fields
These are new or updated fields in the Python SDK:
Field | Type | Description | Related changelog |
---|---|---|---|
Adjustment.tax_mode | string | Determines whether the amounts to be adjusted are inclusive or exclusive of tax. | Tax exclusive refunds |
ApiKey.permissions | list[ApiKeyPermission] | List of permissions for an API key. | API key events |
ApiKey.status | ApiKeyStatus | Status of an API key. | API key events |
Discount.discount_group | object | The related DiscountGroup object, returned when include is used. | Discount groups |
Discount.discount_group_id | string | The ID of the discount group that a discount belongs to. | Discount groups |
Discount.mode | DiscountMode | Enum for the mode of the discount (standard or custom ). Import from paddle_billing.Entities.Shared . | Discount groups |
PaymentMethod.card | KoreaLocalPaymentMethodDetails | Details for a Korean local payment method. | Korean payment methods |
Simulation.config.entities | object | Entities to populate simulated webhooks with. | Configure webhook scenario simulations |
Simulation.config.options | object | Options selected to send simulated webhooks as if certain conditions occurred. | Configure webhook scenario simulations |
Types
These are new or updated types, including objects and enums, in the Python SDK:
Type | Kind | Description | Related changelog |
---|---|---|---|
ApiKey | object | Represents an API key. Returned in the payload for api_key.* webhook notifications. | API key events |
ApiKeyPermission | enum | Enum for API key permissions. Import from paddle_billing.Entities.Shared . | API key events |
ApiKeyStatus | enum | Enum for API key status (active , expired , revoked ). Import from paddle_billing.Entities.Shared . | API key events |
ClientToken | object | Represents a client-side token. | Client-side tokens API |
ClientTokenStatus | enum | Enum for client-side token status (active , revoked ). Import from paddle_billing.Entities.Shared . | Client-side tokens API |
DiscountGroup | object | Represents a discount group. Returned in discount group operations, and the payload for discount_group.* webhook notifications. | Discount groups |
EventTypeName | enum | Enum of event types. Import from paddle_billing.Entities.Shared . Added api_key.* , client_token.* , and discount_group.created event types. | API key events, Client-side tokens API, Discount groups |
KoreaLocalPaymentMethodDetails | object | Represents details for a Korean local payment method. | Korean payment methods |
KoreaLocalPaymentMethodType | enum | Enum to represent specific Korean local payment methods. Used in PaymentMethod.card . Import from paddle_billing.Entities.Shared . | Korean payment methods |
PaymentMethodType | enum | Enum of payment method types. Added korea_local . Import from paddle_billing.Entities.Shared . | Korean payment methods |
SavedPaymentMethodType | enum | Enum of saved payment method types. Added korea_local . Import from paddle_billing.Entities.Shared . | Korean payment methods |
Our SDK for Node.js has been updated to version 2.8.0
.
Methods
These are new or updated methods and parameters now available in the Node.js SDK:
Method | Parameters | Type | Summary | Related changelog |
---|---|---|---|---|
adjustments.create() | taxMode | AdjustmentTaxMode | Determines whether amounts for a partial refund are inclusive or exclusive of tax. When external , Paddle calculates tax on top of the amounts you provide. Defaults to internal . | Tax exclusive refunds |
discounts.list() | mode | DiscountMode | Filter discounts by mode. | Discount groups |
discount_groups.create() | name | string | Create a discount group. | Discount groups |
discount_groups.list() | id | string[] | List discount groups, optionally filtering by ID. | Discount groups |
reports.create() | type | "balance" | Create a balance report. | Balance reports |
simulations.create() | config.entities | object | Create a webhook simulation to populate entity details into simulated webhooks. Valid entity fields depend on the type of scenario you are simulating. | Configure webhook scenario simulations |
simulations.create() | config.options | object | Create a webhook simulation which sends events as if certain conditions occurred. Valid option fields depend on the type of scenario you are simulating. | Configure webhook scenario simulations |
simulations.update() | config.entities | object | Update a webhook simulation to populate entity details into simulated webhooks. Valid entity fields depend on the type of scenario you are simulating. | Configure webhook scenario simulations |
simulations.update() | config.options | object | Update a webhook simulation which sends events as if certain conditions occurred. Valid option fields depend on the type of scenario you are simulating. | Configure webhook scenario simulations |
Fields
These are new or updated fields in the Node.js SDK:
Field | Type | Description | Related changelog |
---|---|---|---|
Adjustment.taxMode | string | Determines whether the amounts to be adjusted are inclusive or exclusive of tax. | Tax exclusive refunds |
Discount.mode | DiscountMode | The mode of the discount (standard or custom ). | Discount groups |
PaymentMethod.underlyingDetails | object | Holds additional details for a payment method. Populated for Korean local payment methods. | Korean payment methods |
Simulation.config.entities | object | Entities to populate simulated webhooks with. | Configure webhook scenario simulations |
Simulation.config.options | object | Options selected to send simulated webhooks as if certain conditions occurred. | Configure webhook scenario simulations |
Types
These are new or updated types, including objects and enums, in the Node.js SDK:
Type | Kind | Description | Related changelog |
---|---|---|---|
ApiKey | object | Represents an API key. Returned in the payload for api_key.* webhook notifications. | API key events |
ApiKeyPermission | enum | Enum for API key permissions. Import from @paddle/paddle-node-sdk . | API key events |
ApiKeyStatus | enum | Enum for API key status (active , expired , revoked ). Import from @paddle/paddle-node-sdk . | API key events |
DiscountGroup | object | Represents a discount group. | Discount groups |
DiscountMode | enum | Enum for discount mode. Import from @paddle/paddle-node-sdk . | Discount groups |
KoreaLocalPaymentMethodDetails | object | Represents details for a Korean local payment method. | Korean payment methods |
KoreaLocalPaymentMethodType | enum | Enum to represent specific Korean local payment methods. Import from @paddle/paddle-node-sdk . | Korean payment methods |
PaymentMethodType | enum | Enum of payment method types. Added korea_local . Import from @paddle/paddle-node-sdk . | Korean payment methods |
Event | type | Event types for api_key.created , api_key.updated , api_key.revoked , api_key.expired , api_key.expiring and discount_group.created have been added. | API key events, Discount groups |
Our SDK for Go has been updated to version 4.0.0
.
Methods
These are new or updated methods and parameters now available in the Go SDK:
Method | Parameters | Type | Summary | Related changelog |
---|---|---|---|---|
adjustments.Client.Create() | TaxMode | shared.TaxMode | Determines whether amounts for a partial refund are inclusive or exclusive of tax. | Tax exclusive refunds |
discounts.Client.List() | Mode | []string | Filter discounts by mode. | Discount groups |
discountgroups.Client.Create() | Name | string | Create a discount group. | Discount groups |
discountgroups.Client.List() | ID | []string | List discount groups, optionally filtering by ID. | Discount groups |
reports.Client.CreateReport() | req | *CreateReportRequest | Create a report. Use helper functions like NewCreateReportRequestBalanceReport to build the request. | Balance reports |
simulations.Client.Create() | Config | *SimulationScenarioConfig | Create a webhook simulation to populate entity details and options into simulated webhooks. | Configure webhook scenario simulations |
simulations.Client.Update() | Config | *SimulationScenarioConfig | Update a webhook simulation to populate entity details and options into simulated webhooks. | Configure webhook scenario simulations |
Fields
These are new or updated fields on structs in the Go SDK:
Struct | Field | Type | Description | Related changelog |
---|---|---|---|---|
Adjustment | TaxMode | shared.TaxMode | Determines whether the amounts to be adjusted are inclusive or exclusive of tax. | Tax exclusive refunds |
Discount | Mode | *DiscountMode | The mode of the discount (standard or custom ). | Discount groups |
PaymentMethod | UnderlyingDetails | *PaymentMethodUnderlyingDetails | Holds additional details for a payment method. Populated for Korean local payment methods. | Korean payment methods |
Simulation | Config | *SimulationScenarioConfig | Configuration for a scenario simulation. | Configure webhook scenario simulations |
Types
These are new or updated types in the Go SDK. You can import them from github.com/PaddleHQ/paddle-go-sdk/v4
.
Type | Kind | Description | Related changelog |
---|---|---|---|
paddlenotification.ApiKey | struct | Represents an API key. Returned in the payload for api_key.* webhook notifications. | API key events |
paddlenotification.ApiKeyPermission | const | Constant for API key permissions. | API key events |
paddlenotification.ApiKeyStatus | const | Constant for API key status (Active , Expired , Revoked ). | API key events |
DiscountGroup | struct | Represents a discount group. | Discount groups |
DiscountMode | const | Constant for discount mode. | Discount groups |
KoreaLocalPaymentMethodDetails | struct | Represents details for a Korean local payment method. | Korean payment methods |
shared.KoreanMarketUnderlyingPaymentMethodType | const | Constant to represent specific Korean local payment methods. | Korean payment methods |
shared.PaymentMethodType | const | Constant of payment method types. Added KoreaLocal . | Korean payment methods |
EventTypeName | const | Constants for event types. Added constants for api_key and discount_group events. | API key events, Discount groups |
Our SDK for PHP has been updated to version 1.10.0
.
Methods
These are new or updated methods and parameters now available in the PHP SDK:
Method | Parameters | Type | Summary | Related changelog |
---|---|---|---|---|
adjustments.create() | taxMode | AdjustmentTaxMode | Determines whether amounts for a partial refund are inclusive or exclusive of tax. | Tax exclusive refunds |
discounts.list() | mode | array | Filter discounts by mode. | Discount groups |
discountgroups.create() | name | string | Create a discount group. | Discount groups |
discountgroups.list() | id | array | List discount groups, optionally filtering by ID. | Discount groups |
reports.create() | type , filters | ReportType , array | Create a balance report. | Balance reports |
simulations.update() | options | array | Update a webhook simulation which sends events as if certain conditions occurred. | Configure webhook scenario simulations |
Fields
These are new or updated fields in the PHP SDK:
Field | Type | Description | Related changelog |
---|---|---|---|
Adjustment.tax_mode | string | Determines whether the amounts to be adjusted are inclusive or exclusive of tax. | Tax exclusive refunds |
ApiKey.permissions | array | List of permissions for this API key. | API key events |
ApiKey.status | string | Status of this API key. | API key events |
Discount.discount_group | object | The related DiscountGroup object, returned when include is used. | Discount groups |
Discount.discount_group_id | string | The ID of the discount group that a discount belongs to. | Discount groups |
Discount.mode | string | The mode of the discount (standard or custom ). | Discount groups |
KoreaLocalUnderlyingDetails.card_authentications | array | Card authentication details for Korean local payment methods. | Korean payment methods |
Types
These are new types available in the PHP SDK:
Type | Description | Related changelog |
---|---|---|
ApiKey | Represents an API key. Returned in the payload for api_key.* webhook notifications. Import from Paddle\\SDK\\Notifications\\Entities\\ApiKey . | API key events |
ApiKeyPermission | A class of constants for API key permissions. Import from Paddle\\SDK\\Notifications\\Entities\\ApiKey\\ApiKeyPermission . | API key events |
ApiKeyStatus | A class of constants for API key status (active , expired , revoked ). Import from Paddle\\SDK\\Notifications\\Entities\\ApiKey\\ApiKeyStatus . | API key events |
DiscountGroup | Represents a discount group. Import from Paddle\\SDK\\Entities\\DiscountGroup . | Discount groups |
DiscountMode | A class of constants for the mode of the discount (standard or custom ). Import from Paddle\\SDK\\Entities\\Discount\\DiscountMode . | Discount groups |
EventTypeName | A class of constants for event types. Includes new event types: api_key.created , api_key.updated , api_key.expired , api_key.expiring , api_key.revoked , and discount_group.created . Import from Paddle\\SDK\\Entities\\Event\\EventTypeName . | API key events, Discount groups |
KoreaLocalPaymentMethodType | A class of constants for Korean local payment method types. Import from Paddle\\SDK\\Entities\\Shared\\KoreaLocalPaymentMethodType . | Korean payment methods |
KoreaLocalUnderlyingDetails | Represents underlying details for Korean local payment methods. Import from Paddle\\SDK\\Entities\\Shared\\KoreaLocalUnderlyingDetails . | Korean payment methods |
ReportType | A class of constants for report types. Added balance . Import from Paddle\\SDK\\Entities\\Report\\ReportType . | Balance reports |
SavedPaymentMethodType | A class of constants for saved payment method types. Added korea_local . Import from Paddle\\SDK\\Entities\\Shared\\SavedPaymentMethodType . | Korean payment methods |
Next steps
You can upgrade to the latest version of our SDKs from their respective repositories:
See the full list of changes in the CHANGELOG.md
file in each SDK repository on GitHub.