Check the fit first

  • Pay 12.3–12.x, Ruby 3.3+. Pay 13 isn't supported yet.
  • Community alpha: 0.1.0.alpha.5. Production processing and full renewal lifecycles aren't verified yet. Start in Whop's sandbox and read the verification log in the repository.
  • Not supported: plan swaps with Stripe-style proration, seat quantities, metered billing and Pay's receipt emails (Whop sends its own). If you rely on these, stay on Stripe for now.

1. Install

# Gemfile
gem "pay-whop", "0.1.0.alpha.5"
bundle install
bin/rails pay:install:migrations
bin/rails pay_whop:install:migrations
bin/rails db:migrate

2. Configure

# config/initializers/pay_whop.rb
Pay::Whop.configure do |config|
  config.environment = ENV.fetch("WHOP_ENVIRONMENT", "sandbox")
  config.api_key = ENV.fetch("WHOP_API_KEY")
  config.account_id = ENV.fetch("WHOP_ACCOUNT_ID")
  config.webhook_secret = ENV.fetch("WHOP_WEBHOOK_SECRET")
end

Your pay_customer models stay as they are.

3. Register the webhook

  • Endpoint: POST /pay/whop/webhooks, API version 2026-10-28-1.
  • Events: the list in Pay::Whop::Delivery::EVENTS.
  • Secret: paste it as-is, including the ws_ prefix.
  • Run a durable Active Job backend such as GoodJob or Solid Queue. Webhooks sync in background jobs.

4. Swap the checkout

Stripe, with Pay:

current_user.set_payment_processor :stripe
session = current_user.payment_processor.checkout(
  mode: "subscription",
  line_items: "price_..."
)
redirect_to session.url, allow_other_host: true

Whop, with pay-whop:

customer = current_user.set_payment_processor(:whop)
checkout = customer.checkout(
  variant_id: "plan_...",
  redirect_url: billing_url,
  idempotency_key: checkout_attempt.id.to_s
)
redirect_to checkout.purchase_url, allow_other_host: true

For one-time payments, use customer.checkout_charge(amount: 500, redirect_url: billing_url, idempotency_key: order.id.to_s). Amounts are in cents, as with Stripe.

set_payment_processor(:whop) makes Whop the user's default processor. Call it only when the user starts a Whop checkout.

5. Check access across both processors

payment_processor.subscribed? checks only the default processor. While Stripe subscriptions are still live, check every processor:

current_user.pay_subscriptions.active.exists?

The rest of Pay's API works the same way:

current_user.payment_processor.subscription.cancel
current_user.payment_processor.charges.last.refund!(
  idempotency_key: refund_request.id.to_s
)
  • Access follows the webhook: grant access after Whop's verified webhook syncs the payment, not when the buyer returns from checkout.
  • Idempotency keys: pass a stable idempotency_key: on every write, and reuse it when you retry.
  • Unfinished payments: direct charges can raise Pay::Whop::PaymentIncomplete. Treat it as pending, not failed.

6. Existing Stripe subscribers

Run both processors side by side. New checkouts go to Whop. Keep Stripe configured, and existing Stripe subscriptions keep renewing.

  • One record per processor: Pay keeps a Pay::Customer for each processor. Stripe webhooks find the customer by its Stripe ID, so they keep syncing after Whop becomes the default.
  • Whop's migration tool: Whop can move Stripe card subscriptions (Settings → Payments → Migrations → Stripe). pay-whop links buyers through signed checkout data and never matches them by email, so migrated memberships won't attach to your users automatically.

Try it

Test checkout, refunds and saved cards in the sandbox demo, then read the source. You need a Whop account for the API key, account ID and webhook secret.

We earn a commission if you create a Whop account through this link.

Comparing providers first? Whop vs Stripe vs Paddle vs Polar.

Sources