Online Booking Payment Integration: Stripe, YooKassa, Webhook

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1All 2062 services
Online Booking Payment Integration: Stripe, YooKassa, Webhook
Medium
~2-3 days
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1361
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1252
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    957
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1189
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    931
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    948

We integrate online payments into booking systems to eliminate no-shows and automate confirmations. Without prepayment, up to 40% of guests don't show up — administrators spend hours calling and refunding deposits. Online payment confirms the client's intent, automatically cancels unpaid slots, and reduces staff workload. We have completed over 50 payment integrations — from small beauty salons to large hotel chains. We know how to circumvent typical issues: 3D Secure errors, webhook failures, currency conflicts.

Online payment integration can increase average check by 15–20% and reduce no-shows by up to 95%.

Why don't clients pay for bookings in advance?

Clients often fear entering card data, face a complicated form, or lack Apple Pay, Google Pay, or Samsung Pay — these are the main reasons for abandonment. According to our data, implementing a single click with Apple Pay increases payment conversion by 25–30%. Technically, this is solved by choosing a reliable payment provider and a simple UX. We use Stripe Elements or ready-made YooKassa widgets with responsive design and support for popular methods without additional development. It's also important to set up 3D Secure 2.0 — it reduces fraud without adding extra steps.

How to choose a payment model for your business?

Model Description Best for
Full prepayment Entire amount at booking Master classes, tours, high-end hotels
Deposit Fixed amount Restaurants, beauty salons
Card holding Amount frozen, charged upon no-show Rentals, car hire, clinics
Pay on delivery Card saved, charged after service Regular clients, subscriptions

We combine models: deposit plus card holding — if the client doesn't show up, we charge the deposit; if they arrive, we release it. For restaurants a deposit of 20–30% is optimal, for hotels full prepayment for the first night.

Stripe vs YooKassa: Which to choose?

Criteria Stripe YooKassa
Geography 135+ currencies, international Russia and CIS, local methods (SBP, YooMoney)
Technology Payment Intents, Setup Intents API v3, card holding, cashout
Webhook HMAC signature, Stripe CLI support Email callback, signature verification
Documentation Detailed, SDKs for all languages In Russian, PHP/JS examples

Stripe supports 3 times more currencies than YooKassa, making it 3 times better for international projects.

How we integrate Stripe: code walkthrough

For full prepayment we use PaymentIntent. Below is an example on Laravel — creating the intent on the server and a form in React with Elements.

class BookingPaymentService
{
    public function createPaymentIntent(Booking $booking): array
    {
        $stripe = new \Stripe\StripeClient(config('services.stripe.secret'));

        $intent = $stripe->paymentIntents->create([
            'amount'   => $booking->total_cents,   // in cents
            'currency' => 'rub',
            'metadata' => [
                'booking_id'   => $booking->id,
                'customer_id'  => $booking->customer_id,
            ],
            'automatic_payment_methods' => ['enabled' => true],
        ]);

        $booking->update([
            'payment_intent_id' => $intent->id,
            'payment_status'    => 'pending',
        ]);

        return ['client_secret' => $intent->client_secret];
    }
}
import { loadStripe } from '@stripe/stripe-js';
import { Elements, PaymentElement, useStripe, useElements } from '@stripe/react-stripe-js';

const stripePromise = loadStripe(import.meta.env.VITE_STRIPE_KEY);

function BookingPaymentForm({ clientSecret }: { clientSecret: string }) {
  const stripe   = useStripe();
  const elements = useElements();

  async function handleSubmit(e: React.FormEvent) {
    e.preventDefault();
    if (!stripe || !elements) return;

    const { error } = await stripe.confirmPayment({
      elements,
      confirmParams: {
        return_url: `${window.location.origin}/bookings/success`,
      },
    });

    if (error) console.error(error.message);
  }

  return (
    <form onSubmit={handleSubmit}>
      <PaymentElement />
      <button type="submit" className="btn-primary mt-4">Pay</button>
    </form>
  );
}

How to set up a Stripe webhook

  1. Create an endpoint on the server, e.g., /webhooks/stripe.
  2. Register this endpoint in the Stripe Dashboard with a signed secret key.
  3. Use Stripe\Webhook::constructEvent to verify the signature.
  4. Handle payment_intent.succeeded and payment_intent.payment_failed events.
Route::post('/webhooks/stripe', function (Request $request) {
    $event = \Stripe\Webhook::constructEvent(
        $request->getContent(),
        $request->header('Stripe-Signature'),
        config('services.stripe.webhook_secret')
    );

    if ($event->type === 'payment_intent.succeeded') {
        $bookingId = $event->data->object->metadata->booking_id;
        Booking::find($bookingId)?->update(['payment_status' => 'paid', 'status' => 'confirmed']);
        Mail::to(Booking::find($bookingId)?->customer_email)
            ->send(new BookingConfirmedMail(Booking::find($bookingId)));
    }

    return response('ok');
});

Why a webhook is mandatory for online payments?

Without a webhook you won't know about a successful payment unless the client returns to the site. If the client closes the window after payment, the booking remains unconfirmed. A webhook ensures the payment status updates in real time. We also configure retries on errors and log all events for debugging.

Workflow: from consultation to deployment

Stage Duration Result
Analysis 1–2 days Booking scenarios, payment model selection
Design 1–2 days Payment flow diagram, provider selection, webhook JSON schemas
Integration 2–4 days Server-side code (Laravel/Node), frontend (React/Vue) with payment form
Testing 1–2 days Emulation of successful/failed payments, timeout handling, refunds
Deployment 0.5 day Staging, production validation, webhook monitoring

According to Stripe Payment Intents documentation, we implemented a seamless integration with 3D Secure support.

What's included in the work

  • Source code repository (server + frontend).
  • Documentation: payment flow description, instructions for adding new systems.
  • Tests: unit and integration tests for PaymentIntent and webhook.
  • Launch support: 14 days after deployment — we fix bugs and answer questions.

Timelines

From 4 to 6 working days for one payment system with a full cycle: from integration to documentation. If multiple systems are needed (e.g., Stripe + YooKassa + Sberbank), the timeline increases to 8–10 days. Contact us for an accurate estimate — we will select the optimal option for your project.

Over the past 5 years we have completed more than 50 payment integrations, ensuring stability and security. We have 5+ years of experience and PCI DSS certified processes. Our online booking payment integration with Stripe and YooKassa guarantees secure transactions. Typical integration costs range from $2000 to $4000 depending on complexity. Get a consultation — we will send a commercial proposal with details. Order integration now and start accepting online payments within a week.

Payment System Integration: YooKassa, Stripe, PayPal, Apple Pay, Google Pay

Conversion dropped by 12% immediately after the redesign. The team pushed a new SPA checkout on Vue 3, forgetting to handle fallback scenarios. Sentry logged a flurry of errors: Payment method not available, 3DS2 challenge flow failed, webhook signature verification failed. Users abandoned carts at the payment method selection stage. Inspection revealed Stripe Elements wasn't receiving the correct clientSecret after redirect, and the webhook endpoint responded with 500 due to lack of idempotency. After replacing the checkout form with a custom integration storing event IDs in Redis, errors disappeared and conversion recovered within two days. The goal isn't just to "connect an SDK"—payment processing requires synchronization with bank requirements, SCA in Europe, and Federal Law 54-FZ in Russia. Our experience: 7 years of integrations for 50+ projects, from e-commerce stores to SaaS platforms with million-dollar turnovers.

What's Included in Turnkey Work

  • Audit of current payment flow and requirements (currencies, fiscalization, subscriptions).
  • Provider selection based on geography and business model.
  • Backend integration (Laravel/Node.js/Go) with webhook handling, idempotency, and retries.
  • Frontend widget (Stripe Elements / YooKassa SDK) with Apple Pay and Google Pay support.
  • Testing all scenarios: success, decline, 3DS, refunds, correction receipts.
  • Monitoring of first transactions and documentation.

We will evaluate your project within 1 day—contact us via chat for a consultation.

Provider Comparison: Which to Choose

Criteria YooKassa Stripe PayPal
Currencies RUB only 135+ 25+
Fiscalization 54-FZ Built-in No (needs OFD) No
Apple/Google Pay support Via SDK Via PaymentElement Via Braintree
Transaction fee 2.5–4% 2.9% + $0.30 2.99% + $0.49
Recurring payments Via auto-payments Stripe Billing Reference Transactions
PCI DSS SAQ A (tokens) SAQ A (Elements) SAQ A (tokens)

Stripe wins on flexibility: 135+ currencies vs. YooKassa's single currency. But for Russia with 54-FZ and SBP, YooKassa is 3x faster to integrate—no external OFD needed. For subscriptions, Stripe Billing is a ready-made engine with trials and email notifications in 2 clicks.

How to Choose the Right Provider?

Three key points. Where do your clients live? Only Russia → YooKassa; globally → Stripe. Do you need 54-FZ fiscalization? Yes → YooKassa; otherwise Stripe + cloud OFD. Do you plan subscriptions? Yes → Stripe Billing as the benchmark; YooKassa requires custom logic with auto-payments. Saving on commissions by choosing the right provider can amount to up to 1.5% of turnover. For a project with 2 million RUB per month, that's 360,000 RUB per year.

Where the Real Difficulties Lie

Setting up a test mode takes an hour. Properly handling all scenarios takes weeks.

Webhook reliability. A webhook may not arrive—server unavailable, timeout, network issues. The provider retries with exponential backoff (Stripe up to 3 days). The handler must be idempotent: if payment.succeeded arrives twice with the same payment_id, the order is updated only once. This is implemented by storing event IDs in Redis with a TTL.

3DS2 and redirect flow. When paying with a card with 3DS2, the user goes to the bank's page and then returns via return_url. During this time, the session may expire or the cart may be cleared. The status is verified not by query parameters but by a direct API request to the provider upon return.

Partial refunds and receipts. A client returns part of the goods—this requires a correction receipt (Federal Tax Service) and a partial refund in YooKassa. Stripe natively supports partial_refund. In both cases, synchronizing statuses between the payment system, database, and warehouse is a separate task.

Currency limitations. YooKassa only handles rubles. If a client from Russia pays in euros via Stripe, conversion goes through their bank, and you don't control the exchange rate.

Why Do Webhooks Require Idempotency?

A webhook may be delivered twice due to network timeouts or provider retries. Without idempotency, the second call would duplicate the order or cause erroneous charges. The solution is to store a unique event ID (e.g., Stripe event id + timestamp) in Redis with a 24-hour TTL and check before processing. If the ID already exists, return 200 without executing business logic. Typical webhook integration mistakes: not verifying the HMAC signature (anyone could send a fake payment.succeeded), not using a queue (the handler blocks the response—provider considers it a failure and resends), not storing event ID (duplicates desynchronize statuses).

How We Build the Integration

Architecture. We never store card data—only tokens from the provider. Flow: Order in DB → Payment Intent → redirect/widget → webhook confirms → update status. The source of truth is the status in the payment system.

For Laravel we use stripe/stripe-php or yookassa-sdk. Webhook—a separate controller with VerifyCsrfToken exception, signature verification first line, Queue job for business logic.

For Next.js/React—@stripe/stripe-js + @stripe/react-stripe-js. PaymentElement includes Apple/Google Pay automatically. Example:

const stripe = await stripePromise;
const { error } = await stripe.confirmPayment({
  elements,
  confirmParams: { return_url: 'https://example.com/order/thank-you' },
});

Testing. Stripe CLI: stripe listen --forward-to localhost:8000/webhook. Test cards for all scenarios (3DS, decline, insufficient funds). Cypress checkout flow test in CI—mandatory stability guarantee.

We debugged Stripe Billing integration for a SaaS with 50,000 subscribers. The issue was handling invoice.payment_succeeded: the frontend updated the subscription immediately after redirect, but the webhook could be delayed by 10 seconds, and the status would be overwritten to incomplete. Solution—add polling API to check invoice status before showing the success page. This reduced erroneous cancellations by 18%.

Process and Timeline

Audit → provider selection → backend → frontend → tests → deploy → monitoring.

Scenario Timeline
Single provider (YooKassa or Stripe), basic flow 1–2 weeks
Multiple payment methods + Apple/Google Pay 2–4 weeks
Multi-currency + partial refunds + fiscalization 4–8 weeks
SaaS subscriptions via Stripe Billing 3–6 weeks

Pricing is custom. Order integration and your checkout won't crash on the next update.

Links:

We guarantee: 7 years of experience, 50+ successful integrations. Contact us for an audit of your checkout—we will evaluate your project and choose the optimal provider.