Documentation

Because forwarding webhooks to local instance is not always straightforward (or requires additional resources), we’ve created a bash script to help you test payments locally.

PocketKit supports only Paddle payments at the moment

You need to update each bash script and change configuration to match your App configuration.

Setup

Set the following environment variables (paste it into terminal session):

export PADDLE_SECRET="your-paddle-secret"

Explanation:

  • PADDLE_SECRET - Paddle secret key same as in .env file

Visit User collection in PocketBase and create a new user.
http://127.0.0.1:8090//?#/collections?collectionId=_pb_users_auth

One Off Transaction

chmod +x ./tests/webhooks/paddle/transaction_completed.sh
chmod +x ./tests/webhooks/paddle/transaction_completed_add_credits.sh
./tests/webhooks/paddle/transaction_completed.sh <user_id>
./tests/webhooks/paddle/transaction_completed_add_credits.sh <user_id> <credits_to_add>

Subscription

Create

./tests/webhooks/paddle/subscription_created.sh <user_id>

Cancel

./tests/webhooks/paddle/subscription_cancelled.sh <user_id>