monext/payline-sdk
A PHP SDK for integrating Monext Payline payment services into your application. It provides client classes and helpers for calling Payline web services, managing payment transactions, and connecting PHP projects to the Payline API.
Architecture fit. monext/payline-sdk is a vendor-authored, framework-agnostic PHP client for Monext Payline — a French PSP with strong domestic Cartes Bancaires coverage. It is not a Laravel package: no service provider, facade, config file, or migration. That is not a blocker, but it fixes the shape of the integration: the SDK must live behind an anti-corruption layer exposing an internal PaymentGateway contract (authorize, capture, refund, status). Payline's vocabulary — merchant contracts, wallets, DoWebPayment/DoAuthorization operations, Payment/Transaction/Order objects — should not leak into controllers, models, or domain events. Treat it as a transport adapter, not an application dependency.
Integration feasibility. Composer-installable and namespace-isolated, so it coexists with a standard Laravel skeleton. The real work is resolving four unknowns before estimation:
^7.4|^8.0 or narrower) matches the Laravel version we target.ext-curl, ext-json, and sometimes ext-soap; a missing SOAP extension is a container-build blocker.Technical risk. Moderate, concentrated in four areas:
Key questions to answer before committing.
Stack fit. Target Laravel 10/11/12 on PHP 8.1+. Concrete shape:
config/payline.php sourcing merchant ID, access key, contract number, and environment from env vars; secrets from Vault or AWS Secrets Manager, never .env in production images.app/Services/Payments/PaylineGateway.php implementing the internal PaymentGateway interface, with domain events (PaymentAuthorized, PaymentFailed, PaymentRefunded) emitted from the adapter so the rest of the app stays PSP-agnostic.Migration path. Five stages, each with a go/no-go gate:
Compatibility and sequencing. Card-on-file tokens do not migrate across PSPs — budget for hosted re-entry or network token migration, whichever the network and business allow. Sequence delivery so each stage is independently shippable and revertible: (1) auth + configuration, (2) authorize/capture, (3) webhook receipt and verification, (4) refunds and partials, (5) recurring/subscriptions, (6) 3DS and fraud-screening rules. Commercially, sequence the merchant contract before the SDK — the SDK is only useful inside that relationship, and the decision to route French volume through Payline is a product decision this library merely enables.
Maintenance. Low volume but non-zero. Pin an exact version in composer.json, subscribe to the release feed, and budget two to four hours per quarter for review and upgrade. The larger cost is not the library — it is Payline endpoint version deprecations and the reconciliation and reporting tooling we build around it.
Support. The repository is not the support channel. Escalation runs through the Monext account manager and merchant contract; GitHub issues are likely low-traffic and slow. Establish a named support contact and documented escalation path during onboarding, not during the first incident. Support is French-first — confirm English-language coverage for our operating hours.
Scaling. The SDK is stateless per request, so throughput is bounded by Payline's contract-level rate limits and per-transaction latency (typically 300–1500ms, higher with a 3DS redirect). Two implications: keep payment calls out of long synchronous request cycles, and do not assume horizontal scaling of our app solves throughput — the constraint is the vendor's API tier in our contract. Size the API tier against peak checkout, not average.
Failure modes to design for now.
Ramp-up. A competent Laravel engineer becomes productive against the adapter in one to two days; full fluency — Payline's contract/wallet model, sandbox quirks, 3DS return handling, reconciliation — takes two to three weeks of real integration work. Add vendor onboarding lead time (merchant account, contract numbers, sandbox credentials) as a separate, often longer, calendar risk. For the TPM, the launch-readiness gates are: PCI scope confirmed and documented, reconciliation running in staging, rollback rehearsed, named Monext escalation contact on file, and baseline metrics (authorization rate, p95 latency, decline-code mix, orphan-transaction count) captured before canary.
How can I help you explore Laravel packages today?