Skip to content

Direct payment gateways (Stripe and PayPal)

WP Career Board overviewFree + ProGet WP Career Board →

You can sell credits straight through Stripe Checkout or PayPal without running a store plugin. You paste your keys and a webhook URL, and employers pay on the hosted Stripe or PayPal page, so card details never reach your site.

If you already sell through WooCommerce, PMPro or MemberPress, use the WooCommerce, PMPro or MemberPress guides instead. You do not need a direct gateway as well.

  1. Go to WP Career Board -> Settings -> Credits.
  2. Scroll to the Direct payment gateways card.
  3. Open the Stripe or PayPal block. A gateway you turned on shows an Enabled badge.

Each block shows its own Webhook URL, ready to copy.

Field Notes
Enable Stripe Turns the gateway on. Stripe is available only when this is on and a secret key is set.
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.
Post-purchase redirect Optional. Where the buyer lands after paying.
Cancel-redirect URL Optional. Where the buyer lands if they cancel.

The webhook URL looks like this:

https://yourdomain.com/wp-json/wbcom-credits/v1/wp-career-board/webhook/stripe
  1. In Stripe go to Developers -> Webhooks -> Add endpoint and paste the URL.
  2. Select these events:
    • checkout.session.completed
    • charge.refunded
    • checkout.session.async_payment_succeeded (needed if you accept delayed payment methods, so credits land when the payment clears)
  3. Copy the endpoint’s signing secret into Webhook signing secret.

The webhook credits the account even if the buyer closes the page after paying, and it is how refunds made in Stripe reach the ledger.

Field Notes
Enable PayPal Turns the gateway on. PayPal is available only when this is on and a Client ID and Client secret are set.
Mode Sandbox or Live.
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 (below). Required.
  1. Create a Merchant REST app at developer.paypal.com -> Apps & Credentials and copy the Client ID and secret into the fields above.
  2. In App settings -> Features, tick Accept payments and Refund.
  3. In App settings -> Webhooks, add the webhook URL below and copy its Webhook ID into the Webhook ID field.
https://yourdomain.com/wp-json/wbcom-credits/v1/wp-career-board/webhook/paypal

Select these events:

  • PAYMENT.CAPTURE.COMPLETED
  • PAYMENT.CAPTURE.REFUNDED
  • CHECKOUT.ORDER.APPROVED (takes the payment for a buyer who approves in PayPal but never returns to your site)
  1. The employer starts a credit checkout and is sent to the hosted Stripe or PayPal page.
  2. After payment, the gateway sends the webhook to your site. The signature is checked before anything is credited.
  3. The credits are added to the employer’s ledger as a topup and the balance updates.
  4. If you refund the payment from the provider dashboard, the credits that purchase gave are removed (a deduction row) and the employer gets a credit refund email.

A webhook delivered twice does not credit twice.

For Stripe, set Mode to Test, use test-mode keys, and pay with the test card 4242 4242 4242 4242 (any future expiry, any CVC). Check that a topup row appears in the employer’s ledger.

For PayPal, set Mode to Sandbox and use a sandbox app and a sandbox buyer account.

Keep test and live credentials separate. Switching Mode to Live makes the next purchase a real charge.