Pro Features

Paid Packages & Payments

April 29, 2026 docsadmin 5 min read

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 Global · 135+ currencies cards, Apple Pay, Google Pay Razorpay India · INR + GST UPI, cards, netbanking, wallets Other (custom) PayPal, Square, etc. extension via filter Gateway selection logic · Both enabled → user picks at checkout · Geo-detect to suggest (IN visitors → Razorpay first; everyone else → Stripe first)

Stripe setup

Get your keys

  1. Sign up at stripe.com.
  2. Activate your account (business name, bank details, identity verification).
  3. 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

  1. Classifieds Pro → Settings → Payments → Stripe.
  2. Toggle Enable Stripe.
  3. Paste publishable + secret keys.
  4. Set the Mode (Test or Live).
  5. 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.

Stripe webhooks confirm payments after the user closes the browser. Without them, only synchronous confirmations work.

  1. Stripe Dashboard → Developers → Webhooks → Add endpoint.
  2. URL: https://yoursite.com/?wpdigipro-action=stripe-webhook (actually, for BC Pro it’s ?bcpro-action=stripe-webhook)
  3. Events to send: payment_intent.succeeded, payment_intent.payment_failed, charge.refunded.
  4. Copy the Signing secret (whsec_...) and paste into BC Pro Stripe settings.

Razorpay setup

Get your keys

  1. Sign up at razorpay.com.
  2. Complete KYC (PAN, GST, bank account).
  3. 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

  1. Classifieds Pro → Settings → Payments → Razorpay.
  2. Toggle Enable Razorpay.
  3. Paste Key ID + Key Secret.
  4. Set Mode (Test or Live).
  5. (Indian sellers) Toggle Enable GST if you collect 18% GST on listings.
  6. 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

  1. User submits a listing via [bc_submit_listing].
  2. They reach the package step. If they pick a paid package, the form submission triggers payment.
  3. The selected gateway’s modal opens (Stripe Checkout or Razorpay popup).
  4. User pays with card / UPI / wallet.
  5. On success, the listing is published (or pending if approval is required).
  6. The user lands on the new listing’s permalink with a “Listing live!” success banner.
  7. 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:

  1. Classifieds Pro → Orders → find the order.
  2. Click Refund → enter amount (full or partial).
  3. The refund goes through the original gateway. The listing goes to refunded status (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.

Leave a comment