Paid Packages & Payments [Pro]
If you charge for listings — featured slots, bumped-to-top, premium categories, or just any-listing-costs-money — this is where you set it up.
All Pro features. The free theme has no payment integration; everything here requires Best Classifieds Pro active and licensed.
Concepts
A package defines what a user gets when they pay (or post for free). A package has:
- A name and price
- A duration (the listing stays live for N days)
- Featured / not featured (gets the gold “Featured” badge and pinned-to-top placement)
- A maximum image count
- Allowed categories (some packages might only apply to Vehicles, for example)
Packages are configured at Classifieds Pro → Packages.
A typical package setup
| Package | Price | Duration | Featured | Max images | Use case |
|---|---|---|---|---|---|
| Free Standard | $0 | 30 days | No | 3 | Most listings — free for individuals |
| Boosted | $9 | 30 days | Yes | 6 | Featured badge + top-of-category placement |
| Premium 60-Day | $19 | 60 days | Yes | 8 | Long-running listings |
| Business Vehicle | $39 | 90 days | Yes | 12 | Auto dealers’ inventory |
Most marketplaces start with two packages: Free Standard + one paid Boosted option. Add more once you understand what your sellers want.
Payment gateways
Stripe setup
Get your keys
- Sign up at stripe.com.
- Activate your account (business name, bank details, identity verification).
- Dashboard → Developers → API keys:
– Publishable key starts with pk_live_... (or pk_test_... in test mode) – Secret key starts with sk_live_... (sk_test_... for test)
Configure in WordPress
- Classifieds Pro → Settings → Payments → Stripe.
- Toggle Enable Stripe.
- Paste publishable + secret keys.
- Set the Mode (Test or Live).
- Save.
Test it
In test mode, use Stripe’s test cards:
| Card | Number | Expected outcome |
|---|---|---|
| Visa success | 4242 4242 4242 4242 |
Payment approved |
| Card declined | 4000 0000 0000 0002 |
Generic decline |
| 3D Secure required | 4000 0027 6000 3184 |
Auth challenge appears |
Any future expiry, any 3-digit CVC, any postal code work.
Webhooks (optional but recommended)
Stripe webhooks confirm payments after the user closes the browser. Without them, only synchronous confirmations work.
- Stripe Dashboard → Developers → Webhooks → Add endpoint.
- URL:
https://yoursite.com/?wpdigipro-action=stripe-webhook(actually, for BC Pro it’s?bcpro-action=stripe-webhook) - Events to send:
payment_intent.succeeded,payment_intent.payment_failed,charge.refunded. - Copy the Signing secret (
whsec_...) and paste into BC Pro Stripe settings.
Razorpay setup
Get your keys
- Sign up at razorpay.com.
- Complete KYC (PAN, GST, bank account).
- Dashboard → Settings → API Keys → Generate Key:
– Key ID starts with rzp_live_... (rzp_test_... in test) – Key Secret is shown ONCE — save it immediately
Configure in WordPress
- Classifieds Pro → Settings → Payments → Razorpay.
- Toggle Enable Razorpay.
- Paste Key ID + Key Secret.
- Set Mode (Test or Live).
- (Indian sellers) Toggle Enable GST if you collect 18% GST on listings.
- Save.
Test it
Test mode uses dummy cards. Use card 4111 1111 1111 1111 with any expiry, any CVC. UPI test ID: success@razorpay (succeeds) or failure@razorpay (fails).
Webhooks
Same as Stripe but at ?bcpro-action=razorpay-webhook. Add via Razorpay Dashboard → Settings → Webhooks. Listen for payment.captured and payment.failed.
How the checkout flow works
- User submits a listing via
[bc_submit_listing]. - They reach the package step. If they pick a paid package, the form submission triggers payment.
- The selected gateway’s modal opens (Stripe Checkout or Razorpay popup).
- User pays with card / UPI / wallet.
- On success, the listing is published (or pending if approval is required).
- The user lands on the new listing’s permalink with a “Listing live!” success banner.
- The seller dashboard shows the listing under “Active” with the package badge.
If the payment fails or the user closes the popup, the listing stays in pending_payment status. The seller can retry from their dashboard.
Refunds
Refund a listing that’s already published:
- Classifieds Pro → Orders → find the order.
- Click Refund → enter amount (full or partial).
- The refund goes through the original gateway. The listing goes to
refundedstatus (not visible to public).
Sellers can refund through their gateway dashboard too — Stripe/Razorpay will fire a webhook that updates the order status in WP automatically (if webhooks are configured).
Currency
Set the default currency at Classifieds Pro → Settings → General → Currency. Affects:
- Price display (“$” prefix vs “₹” vs “€”)
- Stripe/Razorpay checkout currency
- Reporting in Classifieds Pro → Reports
Pre-formatted price strings (e.g. $14,800) ignore this setting — they render verbatim. Only pure-numeric prices are formatted.
Tax handling
For most marketplaces, you don’t charge tax — sellers are responsible for their own. But if you do:
- Razorpay — toggle “Enable GST” (India only) → 18% added at checkout, listed separately on the invoice.
- Stripe — use Stripe Tax. Enable in your Stripe dashboard, set product categories, BC Pro forwards the cart to Stripe Tax for calculation.
- Custom — filter
best_classifieds_payment_amount:
add_filter( 'best_classifieds_payment_amount', function( $amount, $package, $user_id ) {
$tax_rate = 0.10; // 10% sales tax
return $amount * ( 1 + $tax_rate );
}, 10, 3 );
Reporting
Classifieds Pro → Reports shows:
- Revenue by month (line chart)
- Top packages by sales
- Top categories by listing volume
- Active vs expired listings
- Refund rate
Export to CSV with the Export button (top-right of each chart).
Adding a custom payment gateway
To plug in PayPal, Square, or any other gateway, register a payment method via:
add_filter( 'best_classifieds_payment_gateways', function( $gateways ) {
$gateways['paypal'] = array(
'label' => 'PayPal',
'callback' => 'my_paypal_handler',
'fields' => array(
'client_id' => 'PayPal Client ID',
'client_secret' => 'PayPal Client Secret',
),
);
return $gateways;
} );
function my_paypal_handler( $order_id, $amount, $currency ) {
// Initiate the PayPal order, return the approval URL.
return array(
'success' => true,
'redirect' => 'https://paypal.com/...',
);
}
The settings page automatically adds a tab for your gateway. The submission flow includes it as a checkout option.