Direct Payment Gateways (Stripe & PayPal)
Direct payment gateways let you sell credits straight through Stripe Checkout or PayPal without running a separate e-commerce plugin. The Wbcom Credits SDK that powers the credit system bundles both gateways, so all you do is paste your keys and a webhook URL.
History: the 1.0.x releases shipped a built-in Stripe integration with its own API-key fields and a
/wcb/v1/stripe/webhookendpoint. That was removed in 1.1.0 - the old Stripe options are deleted automatically on upgrade. Since 1.2.0 the credit system uses the Wbcom Credits SDK, which exposes Stripe and PayPal as Direct Payment Gateways under a single webhook namespace. This guide covers the current (1.2.0+) gateway model. If you already sell through WooCommerce or a membership plugin, use the adapter guides instead - you do not need a direct gateway as well.
When to use a direct gateway
Section titled “When to use a direct gateway”- You do not run WooCommerce or a membership plugin and don’t want to install one just to sell credits.
- You want a one-click hosted checkout (Stripe Checkout or PayPal) where cardholder data never touches your site.
If you already have WooCommerce, PMPro, or MemberPress, the adapter path is simpler - skip this page.
Where the settings live
Section titled “Where the settings live”- Go to WP Career Board -> Settings -> Credits.
- Scroll to the Direct Payment Gateways card.
- Expand the Stripe or PayPal block.
Each gateway block renders inline on this card - there is no separate
Stripe tab and no publishable/secret-key field outside this block. All
gateway settings save to a single option
(wbcom_credits_gateway_settings_wp-career-board).
Stripe
Section titled “Stripe”Stripe uses Stripe Checkout (hosted by Stripe), so cardholder data never reaches your server.
Fields
Section titled “Fields”| Field | Notes |
|---|---|
| Enable Stripe | Turns the gateway on. Until this is on and a secret key is set, Stripe is reported as unavailable. |
| Mode | Test or Live. |
| Publishable key (active mode) | From Stripe -> Developers -> API keys. |
| Secret key (active mode) | From the same screen. |
| Webhook signing secret | The whsec_... value Stripe shows after you add the webhook endpoint (below). |
| Post-purchase redirect | Where the buyer lands after a successful payment. Optional - defaults to your site home with a success flag. |
| Cancel-redirect URL | Where the buyer lands if they cancel. Optional. |
Webhook
Section titled “Webhook”The Credits card shows the exact webhook URL to paste into Stripe. It looks like this:
https://yourdomain.com/wp-json/wbcom-credits/v1/wp-career-board/webhook/stripeIn your Stripe Dashboard go to Developers -> Webhooks -> Add endpoint, paste that URL, and subscribe to exactly these two events:
checkout.session.completedcharge.refunded
Copy the endpoint’s signing secret (whsec_...) into the Webhook
signing secret field. Without the webhook, employers can pay but
never receive credits, and refunds will not credit back.
PayPal
Section titled “PayPal”Fields
Section titled “Fields”| Field | Notes |
|---|---|
| Enable PayPal | Turns the gateway on. |
| Client ID | From developer.paypal.com -> Apps & Credentials (Merchant REST app). |
| Client secret | From the same app. |
| Webhook ID | The ID of the webhook you create in the PayPal app settings (below). |
Account checklist
Section titled “Account checklist”- Create a Merchant REST app at developer.paypal.com -> Apps & Credentials. Copy the Client ID and secret into the fields above.
- In App settings -> Features, tick Accept payments and Refund. No other scopes are needed.
- In App settings -> Webhooks, add a webhook endpoint and copy its Webhook ID into the Webhook ID field.
Webhook
Section titled “Webhook”The Credits card shows the PayPal webhook URL:
https://yourdomain.com/wp-json/wbcom-credits/v1/wp-career-board/webhook/paypalSubscribe the webhook to exactly these two events:
PAYMENT.CAPTURE.COMPLETEDPAYMENT.CAPTURE.REFUNDED
How a purchase flows
Section titled “How a purchase flows”- The buyer starts a credit checkout. The SDK calls the gateway and redirects to the hosted checkout page (Stripe Checkout or PayPal).
- After payment, the gateway sends a webhook to the URL above.
- The SDK verifies the signature, cross-checks the amount, and writes
a
topuprow to the credit ledger - the balance updates automatically. - A refund issued from the provider dashboard fires the refund event,
and the SDK writes a matching
deductrow, returning the credits.
Every webhook is processed once. Duplicate deliveries do not double-credit.
Testing
Section titled “Testing”For Stripe, set Mode to Test, use test-mode keys, and pay with
Stripe’s test card 4242 4242 4242 4242 (any future expiry, any CVC).
Confirm a topup row appears in the employer’s credit ledger.
For PayPal, use a sandbox app and a sandbox buyer account.
Note: keep test and live credentials separate. Switching Mode to
Live(Stripe) or swapping in live app credentials (PayPal) makes the next purchase a real charge.
Related
Section titled “Related”- Selling credits through WooCommerce - the adapter path when you already run a store.
- Paid Memberships Pro / MemberPress - membership-based credit grants.
- Manual adjustments & refunds.

