Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Midtrans Laravel Package

sawirricardo/laravel-midtrans

A Laravel package for integrating Midtrans payments. Configure credentials, create Snap transactions, handle callbacks and webhooks, and support common payment flows from your Laravel app with a simple, framework-friendly API.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Indonesia market entry / localization roadmap. Midtrans (GoTo) is the default payment rail for Indonesian buyers — QRIS, GoPay/OVO/DANA/ShopeePay, virtual accounts (BCA/BNI/Mandiri), convenience-store cash (Indomaret/Alfamart), cards, and paylater. Adopting this package is implicitly a decision to serve Indonesian customers with locally preferred methods rather than forcing card checkout, which is the single biggest conversion lever in that market.
  • Build vs. buy on payment plumbing. The package is a thin Laravel service provider + facade + config over Midtrans' official PHP SDK. It buys configuration publishing, container bindings, and Snapshot token ergonomics — roughly hours-to-a-day of engineering, not weeks. Frame the real decision as "Midtrans vs. Xendit/Duitku/Stripe" and "official SDK vs. wrapper," not "this package vs. building payments from scratch."
  • Checkout conversion experiments. Snap's hosted page (redirect or embedded popup) enables A/B tests on payment method ordering, redirect vs. modal, and VA vs. e-wallet defaults without PCI-scope exposure on our side.
  • MVP / pilot sequencing. Suitable for a first revenue-generating release in Indonesia where speed matters more than vendor SLAs; defer hardening until volume justifies it.
  • Order state machine and finance ops design. Midtrans' HTTP notification (webhook) model forces explicit decisions on idempotency, reconciliation, refund handling, partial captures, and expired-VA cleanup — decisions that belong on the roadmap regardless of vendor.
  • Subscription / recurring billing feasibility. Midtrans supports recurring via saved tokens/cards, but a 12-star, single-maintainer wrapper is a poor foundation for dunning and retries. Treat recurring as a separate, higher-scrutiny decision.
  • Vendor concentration risk. One more reason to define an internal PaymentGateway contract so Midtrans is swappable and multi-country expansion (e.g., adding Stripe for SG/MY) doesn't require rewriting checkout.

When to Consider This Package

Consider it when:

  • The app is Laravel (8/9/10-era) and the team already knows the framework's package conventions; auto-discovery and a config file meaningfully cut boilerplate.
  • The customer base is primarily Indonesian and Midtrans is already the chosen provider — this is the fastest path to a sandbox-to-production Snap integration.
  • You're validating a market or product with a small team, and a few hours of saved integration work is real leverage.
  • You need standard one-time payments (Snap redirect/popup), basic webhook handling, and refunds — not exotic flows.
  • You're comfortable pinning a version, reviewing the source (it's small and MIT), and forking if the maintainer goes quiet.

Look elsewhere when:

  • Maintenance risk is unacceptable. 12 stars and a last release of February 2023 is a signal: no evidence of active security patching, Laravel 11+ compatibility work, or responsive issue triage. For payments — a regulated, fraud-adjacent surface — that matters.
  • You need vendor support, an SLA, or documented escalation. Go to Midtrans' official midtrans/midtrans-php SDK and write a ~50-line service provider yourself; you keep first-party support and lose almost nothing.
  • You need multi-country, multi-PSP orchestration, smart routing, or unified reporting — evaluate a payment orchestration layer or a provider with broader coverage.
  • Your stack isn't Laravel, or you're on a Laravel version outside the package's tested matrix.
  • You require audited webhook signature verification, 3DS/SCA edge cases, or subscription dunning out of the box — verify line by line before trusting it in production.
  • Volume and compliance posture demand change control: a dormant dependency in the payment path is a standing audit finding.

Adoption criteria checklist: active maintenance or willingness to fork · Laravel version compatibility confirmed · webhook signature handling reviewed · sandbox E2E test suite written against it · an internal abstraction layer so the wrapper is replaceable · a named owner for the dependency.

How to Pitch It (Stakeholders)

To executives: This is a low-cost, low-commitment enabler for selling in Indonesia — the fourth-most-populous market and one where card penetration is low and e-wallets/QRIS dominate. Midtrans is the market-standard gateway, PCI-DSS compliant and trusted by local buyers; using its hosted checkout keeps card data off our servers and shrinks our compliance burden. The wrapper itself saves only days of engineering, so the strategic value is the market access, not the code. Recommendation: approve Midtrans as the Indonesian PSP, adopt the wrapper for a time-boxed pilot, and gate broader rollout on volume.

To engineering: It's a small MIT Laravel wrapper around the official Midtrans PHP SDK — config publishing, facade, container bindings, Snap helpers. Upside is speed and idiomatic Laravel ergonomics; the downside is a single maintainer, no release since February 2023, and 12 stars, so treat it as vendored code, not an ecosystem dependency. Concretely: review and pin it, wrap it behind our own PaymentGateway interface, own the webhook signature verification and idempotency ourselves, and keep the official SDK as a documented fallback. Budget roughly 1–2 days for integration plus 2–3 days for webhook state handling, reconciliation, and sandbox test coverage — the wrapper shortens the first number, not the second. If maintenance lapses, forking or dropping to the official SDK should be a half-day change.

To finance/ops: Expect asynchronous confirmation via webhooks, VA expiry windows, and refund flows with their own SLAs; we'll need a reconciliation routine and a manual-review queue for mismatched settlements before go-live.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log