Supabase:Paddle
lastmod 2026-02-27created 2026-02-225 edits
Paddle is a merchant of record that acts to provide a payment infrastructure to thousands of software companies around the world.
The Paddle Wrapper is a WebAssembly (WASM) foreign data wrapper that lets you read and write data from Paddle within your PostgreSQL database.
Preparation
Before you can use Paddle, you must first enable the Wrappers extension and store your credentials in Postgres.
Enable Wrappers
Make sure the wrappers extension is installed in your database.
Enable the Paddle Wrapper
Enable the Wasm foreign data wrapper.
Store your credentials (optional)
By default, PostgreSQL stores FDW credentials in pg_catalog.pg_foreign_server as plain text.
Anyone with access to this table can view these credentials.
Wrappers is designed to work with Supabase:Vault, which provides an additional level of security for storing credentials. We recommend using Supabase:Vault to store your credentials.
-- Save your Paddle API key in Vault and retrieve the created `key_id`
select vault.create_secret(
'<Paddle API key>', -- Paddle API key
'paddle',
'Paddle API key for Wrappers'
);
Connecting to Paddle
You need to provide Postgres with the credentials and additional options to access Paddle. You can do this with the following create server command.
create server paddle_server
foreign data wrapper wasm_wrapper
options (
fdw_package_url 'https://github.com/supabase/wrappers/releases/download/wasm_paddle_fdw_v0.2.0/paddle_fdw.wasm',
fdw_package_name 'supabase:paddle-fdw',
fdw_package_version '0.2.0',
fdw_package_checksum 'e788b29ae46c158643e1e1f229d94b28a9af8edbd3233f59c5a79053c25da213',
api_url 'https://sandbox-api.paddle.com', -- Use https://api.paddle.com for live account
api_key_id '<key_ID>' -- The Key ID from above.
);
The fdw_package_* options are required and specify the Wasm package metadata. You can find the list of available package versions above.
Create a schema
We recommend creating a schema to hold all the foreign tables.