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.
Prerequisites
Section titled “Prerequisites”- 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”- Go to Products → Add New.
- Set the product name (e.g. “10 Job Posting Credits”).
- Set the product Price.
- Under Product Data, leave the type as Simple product (or Simple subscription for recurring credits).
- Optionally mark the product Virtual - credits aren’t shipped.
- Publish the product.
Step 2: Map the Product to a Credit Amount
Section titled “Step 2: Map the Product to a Credit Amount”- Go to Career Board → Settings → Credits.
- Scroll to the Credit Mappings section.
- 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.)
- Enter the number of Credits (e.g.
10). - 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:
- Career Board → Settings → Credits → Credit Purchase URL.
- 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
- A single product page (e.g.
- Save Changes.
Leave it empty if you don’t want the “Buy Credits” button to appear.
Step 4: Test the Flow
Section titled “Step 4: Test the Flow”- Log in as an employer (or use a test account).
- Go to Career Board → Employer Dashboard.
- Note the current credit balance.
- Click Buy Credits, complete the WooCommerce checkout.
- Once the order status moves to Completed, return to the dashboard.
- 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”):
- Install WooCommerce Subscriptions.
- Create the product as a Simple subscription.
- Map it the same way under Credit Mappings - the subscription product appears under the “WooCommerce Subscriptions” group in the Product / Plan dropdown.
- 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.
How It Looks in the Ledger
Section titled “How It Looks in the Ledger”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.
Troubleshooting
Section titled “Troubleshooting”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.
Related
Section titled “Related”- 04-featured-upgrade.md - Charging for featured-job upgrades using the same credit system.
- 06-pmpro-setup.md - Granting credits via Paid Memberships Pro membership levels.
- 08-manual-adjustments-and-refunds.md
- How to manually grant, deduct, or refund credits.

