The goal of paddleR is to provide a comprehensive and user-friendly R interface to the Paddle API, enabling seamless integration with Paddle’s powerful billing and subscription management platform.
This R package provides a robust interface to the Paddle API, enabling developers, analysts, and product teams to interact with Paddle’s billing and subscription platform directly from R.
The package allows you to:
You can install the development version of paddleR from GitHub or stable version from CRAN with:
# install development version from GitHub
# devtools::install_github("Arnold-Kakas/paddleR")
install.packages("paddleR")
library(paddleR)
The package supports two modes of operation:
You can toggle modes using:
set_paddle_mode("sandbox") # or "live"
All API endpoints automatically adjust their base URL and authentication based on the selected mode.
To authenticate with the Paddle API, you must set your API key(s) as environment variables. You have two options:
Set PADDLE_KEY to the appropriate key for your current mode.
Sys.setenv(PADDLE_KEY = "your-live-or-sandbox-key") # or use .Renviron file
Set both PADDLE_KEY_LIVE and PADDLE_KEY_SANDBOX, and the package will automatically use the correct one based on the selected mode.
Sys.setenv(PADDLE_KEY_LIVE = "your-live-key")
Sys.setenv(PADDLE_KEY_SANDBOX = "your-sandbox-key")
API keys must have the appropriate permissions based on the Paddle endpoint you are accessing. Refer to the official Paddle API docs for required scopes.
The package currently supports the following Paddle API endpoint categories:
Missing an endpoint? Please open an issue on GitHub or submit a pull request. At this moment there are several endpoint categories that are not yet implemented, including: