VeldoraDocs

24. Veldora Connect — Integrations Ecosystem

Veldora Connect is the official first-party integrations monorepo for the Veldora Framework. It provides battle-tested, production-ready connectors for essential third-party services, starting with payment gateways.

Install only what you need — each integration is an independent Composer package.

Available Packages

PackageStatusDescription
veldora/connect-stripeActive (v0.7.0)Stripe payment gateway — Checkout, PaymentIntents, Customers, Webhooks
veldora/connect-sslcommerzUpcomingSSLCommerz payment gateway for Bangladesh
veldora/connect-resendUpcomingResend transactional email service
veldora/connect-s3UpcomingAWS S3 / S3-compatible cloud storage
veldora/connect-sentryUpcomingSentry crash reporting & telemetry

Stripe Integration (veldora/connect-stripe)

Installation

Terminal • bash
composer require veldora/connect-stripe

Environment Configuration

Add your Stripe API keys to .env:

.env
INI
STRIPE_KEY=pk_test_...
STRIPE_SECRET=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
STRIPE_CURRENCY=usd

Service Provider (if not auto-discovered)

example.php
PHP
// config/app.php
'providers' => [
    // ...
    Veldora\Connect\Stripe\StripeServiceProvider::class,
],

Checkout Session

Create a Stripe Checkout session and redirect the user:

example.php
PHP
use Veldora\Connect\Stripe\Facades\Stripe;

Route::post('/checkout', function () {
    $session = Stripe::checkout()->create([
        'payment_method_types' => ['card'],
        'line_items' => [[
            'price_data' => [
                'currency'     => 'usd',
                'product_data' => ['name' => 'Veldora Pro'],
                'unit_amount'  => 2000,
            ],
            'quantity' => 1,
        ]],
        'mode'        => 'payment',
        'success_url' => url('/success?session_id={CHECKOUT_SESSION_ID}'),
        'cancel_url'  => url('/cancel'),
    ]);

    return redirect($session->url);
});

PaymentIntents

example.php
PHP
use Veldora\Connect\Stripe\Facades\Stripe;

// Create a PaymentIntent
$intent = Stripe::paymentIntents()->create([
    'amount'   => 2000,
    'currency' => 'usd',
]);

// Confirm a PaymentIntent
$confirmed = Stripe::paymentIntents()->confirm($intent->id, [
    'payment_method' => 'pm_card_visa',
]);

Customer Management

example.php
PHP
use Veldora\Connect\Stripe\Facades\Stripe;

// Create
$customer = Stripe::customers()->create([
    'email' => 'user@example.com',
    'name'  => 'John Doe',
]);

// Retrieve
$customer = Stripe::customers()->retrieve($customer->id);

// Update
Stripe::customers()->update($customer->id, ['name' => 'Jane Doe']);

// Delete
Stripe::customers()->delete($customer->id);

Webhook Handling

Verify and process incoming Stripe webhook events:

example.php
PHP
use Veldora\Connect\Stripe\Facades\Stripe;
use Veldora\Framework\Http\Request;
use Veldora\Framework\Http\Response;

Route::post('/webhook/stripe', function (Request $request) {
    $payload   = $request->getContent();
    $sigHeader = $request->header('stripe-signature');

    try {
        $event = Stripe::webhook()->constructEvent(
            $payload,
            $sigHeader,
            config('stripe.webhook_secret')
        );

        match ($event->type) {
            'checkout.session.completed' => handleCheckout($event->data->object),
            'payment_intent.succeeded'   => handlePayment($event->data->object),
            default                      => null,
        };

        return Response::json(['status' => 'success']);
    } catch (\Exception $e) {
        return Response::json(['error' => $e->getMessage()], 400);
    }
});

Facade Reference

MethodDescription
Stripe::checkout()->create($params)Create a Checkout Session
Stripe::checkout()->retrieve($id)Retrieve a Checkout Session
Stripe::paymentIntents()->create($params)Create a PaymentIntent
Stripe::paymentIntents()->confirm($id, $params)Confirm a PaymentIntent
Stripe::paymentIntents()->capture($id)Capture a PaymentIntent
Stripe::customers()->create($params)Create a Customer
Stripe::customers()->retrieve($id)Retrieve a Customer
Stripe::customers()->update($id, $params)Update a Customer
Stripe::customers()->delete($id)Delete a Customer
Stripe::webhook()->constructEvent($payload, $sig, $secret)Verify & parse a webhook
[!NOTE]
All Connect packages use the Veldora service container. The stripe binding and StripeClient::class binding are both registered automatically by StripeServiceProvider.
[!TIP]
Connect packages fire Veldora events on webhook dispatch: StripeWebhookHandled (success) and StripeWebhookFailed (on exception). Listen to them via the standard Veldora event system.

Connect Repository

Source code and full monorepo: github.com/veldorahq/connect

Building with AI Assistants?
Copy the Veldora AI Developer Prompt to teach ChatGPT, Claude, Cursor, or Gemini all framework APIs for error-free coding.