Skip to content

Selling Credits Through WooCommerce

This is the most common credit-purchase setup. WooCommerce handles payment processing (with its own Stripe, PayPal, Square, or any other WC gateway), and WP Career Board Pro listens for completed orders and credits the employer’s balance automatically.

Use this guide when:

  • You already have a WooCommerce store on your site.
  • You want employers to buy credit packs the same way they would buy any other product (cart, checkout, account orders page).
  • You want to sell recurring credits (e.g. “10 credits per month”) - that uses WooCommerce Subscriptions, covered below.
  • WooCommerce is installed and active.
  • (Optional) WooCommerce Subscriptions is installed if you want recurring credit packs.
  • At least one WooCommerce payment gateway is configured (WooCommerce → Settings → Payments).
  • The credit system is active automatically (it is part of Pro). To actually charge for posting, set a per-board credit cost - see Credit packages & costs. Selling credit packs works regardless of whether posting charges credits.

Step 1: Create a Credit Product in WooCommerce

Section titled “Step 1: Create a Credit Product in WooCommerce”
  1. Go to Products → Add New.
  2. Set the product name (e.g. “10 Job Posting Credits”).
  3. Set the product Price.
  4. Under Product Data, leave the type as Simple product (or Simple subscription for recurring credits).
  5. Optionally mark the product Virtual - credits aren’t shipped.
  6. Publish the product.

Step 2: Map the Product to a Credit Amount

Section titled “Step 2: Map the Product to a Credit Amount”
  1. Go to Career Board → Settings → Credits.
  2. Scroll to the Credit Mappings section.
  3. In the Product / Plan dropdown, pick the product you just created. Products are grouped by source, so WooCommerce products appear under a “WooCommerce” heading. (If WooCommerce is not active, it shows as “not installed” in the adapter list above and its products won’t appear here.)
  4. Enter the number of Credits (e.g. 10).
  5. Click + Add Mapping.

The new row appears in the mappings table (Provider / Product / Plan / Credits). Repeat for as many credit packs as you want to offer (10, 50, 100, …).

Step 3: Set the “Buy Credits” Page URL

Section titled “Step 3: Set the “Buy Credits” Page URL”

When an employer is low on credits, the dashboard shows a Buy Credits button. Point that button at your WooCommerce shop:

  1. Career Board → Settings → Credits → Credit Purchase URL.
  2. Set it to the URL of either:
    • A single product page (e.g. /product/10-job-posting-credits/)
    • A category page that lists every credit pack
    • A custom “Buy Credits” page you’ve built with a product grid
  3. Save Changes.

Leave it empty if you don’t want the “Buy Credits” button to appear.

  1. Log in as an employer (or use a test account).
  2. Go to Career Board → Employer Dashboard.
  3. Note the current credit balance.
  4. Click Buy Credits, complete the WooCommerce checkout.
  5. Once the order status moves to Completed, return to the dashboard.
  6. The balance updates automatically - the credit-purchase row appears in the credit ledger with type: topup.

Recurring Credits With WooCommerce Subscriptions

Section titled “Recurring Credits With WooCommerce Subscriptions”

If you want monthly credit packs (e.g. “20 credits/month”):

  1. Install WooCommerce Subscriptions.
  2. Create the product as a Simple subscription.
  3. Map it the same way under Credit Mappings - the subscription product appears under the “WooCommerce Subscriptions” group in the Product / Plan dropdown.
  4. Set the credit amount that gets added on every successful renewal.

When the subscription renews, the same topup ledger entry is written - same flow, just on a schedule.

Every credit transaction is recorded in an append-only ledger. An employer’s recent history is shown in the Credit Balance block (Transaction History panel) and over the REST API at GET /wcb/v1/employers/{id}/credits:

Type Trigger Notes
topup WooCommerce order completed Credit amount from the product mapping
hold Employer submitted a job to a paid board Reserves the cost; awaiting approval
deduct Job approved + published Final consumption
refund Job rejected by admin Returns the held credits

The ledger is the source of truth - even if a customer disputes later, you can prove exactly what happened.

Order completed but credits didn’t add. On Career Board → Settings → Credits, the adapter list at the top of the Credit Mappings area shows each source as active or not installed. If WooCommerce shows “not installed” but Woo is active, deactivate and reactivate Career Board Pro to re-trigger registration. Also confirm the purchased product has a mapping row.

Credits added twice for the same order. The ledger is idempotent on order ID - duplicate webhook deliveries do not double-credit. If you genuinely see two topup rows for the same order, file a bug - that’s a real failure mode and we want to catch it.

Employer bought credits before the product was mapped. The order won’t credit them automatically. Use Manual Adjustments (see 08-manual-adjustments-and-refunds.md) to add the credits by hand.