Payment

How to Set Up PayPal for XFile Ultra

Create a PayPal REST app, register PAYMENT.CAPTURE.COMPLETED webhook, paste Client ID, secret, and Webhook ID into Payment → PayPal.

How to Set Up PayPal for XFile Ultra

PayPal checkout uses the PayPal REST APIs. Members pay with PayPal; fulfillment relies on the webhook PAYMENT.CAPTURE.COMPLETED (and the capture return path).

This is member checkout — separate from affiliate/webmaster payout PayPal details under Payout methods.

PayPal is built-in — no premium plugin required.

Where to find it

Admin → Settings → PaymentPayPal

1. Turn Enable PayPal checkout on

2. Paste REST client ID, REST client secret, and Webhook ID

3. Optional: Business email (display/metadata — not the secret)

4. Register the webhook URL in PayPal

5. Match Sandbox mode to sandbox vs live credentials

6. Save settings and test on /premium

Enable for reseller (optional): shows this gateway on reseller balance top-up checkout. Member Premium upgrade and member balance top-up use the main Enable toggle only. Reseller enable needs the Reseller System premium plugin.

Fields in XFile Ultra

Field Setting key From PayPal
Enable PayPal checkout paypal_checkout_enabled Main on/off
Enable PayPal for reseller paypal_checkout_reseller_enabled Reseller top-up
REST client ID paypal_client_id App Client ID
REST client secret paypal_client_secret App Secret
Webhook ID paypal_webhook_id Webhook ID from dashboard
Business email paypal_email Optional
Sandbox mode paypal_sandbox Sandbox API vs live

Webhook URL:

https://YOUR-DOMAIN/api/webhooks/paypal

Event: PAYMENT.CAPTURE.COMPLETED

Return / capture path (automatic): /api/checkout/paypal/capture

Env overrides: PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET, PAYPAL_WEBHOOK_ID.

Step 1 — Create a REST app

1. Open the PayPal Developer Dashboard

2. Apps & Credentials

3. Choose Sandbox (learning) or Live

4. Create an app (or open an existing one)

5. Copy Client ID and Secret

Official: PayPal REST overview · Webhooks

Step 2 — Register the webhook

Required event (must subscribe): PAYMENT.CAPTURE.COMPLETED

Without that event, PayPal can complete payment and XFile Ultra may not mark the order paid.

1. In the same app / developer dashboard, open Webhooks (Sandbox or Live matching your keys)

2. Add webhook URL = admin Webhook endpoint

3. Under event subscriptions / permissions, enable PAYMENT.CAPTURE.COMPLETED (required)

4. Save and copy the Webhook ID into XFile Ultra (this is an ID, not a signing secret)

Step 3 — Paste into XFile Ultra

1. Admin → Settings → PaymentPayPal

2. Paste Client ID, Client secret, Webhook ID

3. Turn Sandbox mode on when using Sandbox credentials

4. Enable checkout → Save settings

What is Sandbox / Test mode?

Sandbox (sometimes labeled Test mode) means you use the provider’s test environment — fake cards, fake buyers, no real money. Turn it on while learning. When you go live:

1. Turn Sandbox / Test mode off

2. Paste live keys (not test keys)

3. Register live webhooks (Stripe/PayPal have separate Test vs Live webhook endpoints)

Step 4 — Test

1. Use a PayPal sandbox buyer account

2. Checkout on /premium

3. Confirm Payment transactions + membership entitlement

Common problems

Browser return OK, site still unpaid

Webhook not registered, wrong Webhook ID, or Sandbox/Live mismatch. Fix webhook first.

Confused with payout PayPal

Checkout Client ID/secret ≠ affiliate withdrawal PayPal email.

Wrong environment

Sandbox Client ID with Sandbox mode off (or live credentials with Sandbox on).

Related