PayPal Checkout Setup - softerfish/fyuhls GitHub Wiki

PayPal Checkout Setup

This guide walks through the current PayPal setup flow in fyuhls.

Where to configure it

Go to:

  • Admin -> Config Hub -> Monetization

In the Payment Gateways section, PayPal uses:

  • Enable PayPal Checkout
  • Client ID
  • Client Secret
  • Webhook ID
  • Use PayPal Sandbox

What fyuhls currently needs

PayPal checkout is only considered ready when:

  1. Enable PayPal Checkout is turned on
  2. a Client ID is saved
  3. a Client Secret is saved

Important:

  • Use PayPal Sandbox does not enable PayPal by itself
  • it only switches fyuhls between the sandbox API and the live API

Step-by-step setup

1. Create or open your PayPal developer app

Use the PayPal developer dashboard and create an app for:

  • sandbox testing first, then
  • live when you are ready

2. Copy the app credentials

From PayPal, copy:

  • Client ID
  • Client Secret

Paste them into fyuhls:

  • Client ID
  • Client Secret

3. Decide whether you are testing or going live

If you are still testing, keep this turned on:

  • Use PayPal Sandbox

If you are moving to production, turn that off only after:

  • you have live PayPal credentials ready
  • you have updated the webhook in the live PayPal app too

4. Enable PayPal checkout

Turn on:

  • Enable PayPal Checkout

Then save Config Hub.

At that point, fyuhls can create PayPal orders if the credentials are valid.

Webhook setup

PayPal checkout uses server-side order creation and capture, and the webhook should still be configured for safer event handling.

5. Create a PayPal webhook

In the PayPal app for the same environment you are using, create a webhook pointing to:

  • /payment/callback/paypal

using your site domain, for example:

  • https://yourdomain.com/payment/callback/paypal

6. Copy the webhook ID

After creating the webhook, copy the webhook ID from PayPal and paste it into:

  • Webhook ID

Then save again.

Testing checklist

Before going live, test:

  1. a successful PayPal checkout
  2. a cancelled PayPal checkout
  3. return into fyuhls after approval
  4. package activation on the user account

If you use PPS or affiliate earnings tied to sales, also validate at least one later adverse payment state in your broader process.

Common mistakes

PayPal is enabled but checkout fails immediately

Usually caused by one of these:

  • Client ID is blank
  • Client Secret is blank
  • sandbox is enabled but you pasted live credentials
  • sandbox is disabled but you pasted sandbox credentials

PayPal says checkout is enabled, but the package page still shows it as unavailable

That happens when the toggle is on but the required credentials are still missing. fyuhls only treats PayPal as ready when the gateway is both:

  • enabled, and
  • fully configured

Webhook verification problems

Usually caused by:

  • wrong webhook URL
  • wrong environment
  • missing or wrong Webhook ID

Notes for operators

  • fyuhls creates a pending internal transaction before redirecting the user to PayPal.
  • PayPal order approval returns through /payment/paypal/return.
  • capture and later webhook handling can still affect transaction state after the initial redirect flow.

Related pages

⚠️ **GitHub.com Fallback** ⚠️