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

Ponto Connect Laravel Sdk Laravel Package

chuckbe/ponto-connect-laravel-sdk

Laravel SDK for Ponto Connect, Isabel Group's European open banking API. Securely integrate OAuth bank account linking, balance and transaction retrieval, and payment initiation into Laravel applications with a clean, expressive client built for PSD2 and multi-bank workflows.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install with composer require chuckbe/ponto-connect-laravel-sdk, then publish the config: php artisan vendor:publish --tag=ponto-connect-config. The config file is the first place to look — it is where the client credentials, OAuth redirect URI, base URL (sandbox vs. live), and now the signing certificate are wired up.
  • Populate the env vars immediately after publishing. Keep credentials out of config/*.php; the package reads from services.ponto / dedicated PONTO_* keys, so a .env.example update is part of the setup PR.
  • Register the OAuth callback route before anything else works. Ponto Connect is an authorization-code flow at the organization level: you redirect to Ponto, Ponto redirects back with a code, you exchange it for an access/refresh token pair. Most first-day friction is a redirect URI mismatch, not API code.
  • First use case to prove the integration end-to-end: authenticate, list accounts, then pull transactions for one account. That path exercises auth, signing, pagination, and the sync cursor in one go.
  • For the newly shipped v1.1.0 behaviour, the second thing to look at after the config is the certificate path/passphrase entries. If they are empty you are in unsigned mode; if they are set, live requests get a Signature header automatically. Treat that switch as the boundary between "works in sandbox" and "works in production".

Implementation Patterns

  • Config-driven signing. Do not hand-roll the HTTP signature. The v1.1.0 feature signs outgoing live requests with the signature certificate, which means your application code should not construct Digest / Signature / Date headers itself. Set the certificate path, private key, and passphrase in config and let the package's HTTP client middleware do the work. Keeping signing out of your service classes is the single biggest maintainability win here.
  • Guard the sandbox/live split explicitly. Signing is a live-environment concern. Structure your config so that PONTO_BASE_URL and the certificate settings move together (sandbox + no cert, live + cert). A config/ponto-connect.php that allows "live base URL with no certificate" is a misconfiguration waiting to happen — add a boot-time check in a service provider that fails fast.
  • Token persistence per organization. Tokens are long-lived relative to a request; store them (database or cache) keyed by organization/user rather than re-running the authorization-code flow. Wrap token retrieval in a small repository class so refresh-on-401 is centralised, and let the package's client handle the refresh call.
  • Incremental transaction sync, not full re-pulls. Ponto exposes a sync endpoint with a cursor. Persist the cursor alongside the account, and make your scheduled job "fetch since cursor → upsert → store new cursor" idempotent. This is the pattern that scales; naive date-range polling will duplicate rows and get rate-limited.
  • Wrap the SDK in your own thin service layer. Controllers and jobs should depend on something like PontoAccountService / PontoTransactionSync, not on the package facade directly. That layer is where you normalise Ponto's response shapes, map to your Eloquent models, and dispatch domain events — it also makes it trivial to fake the integration in tests.
  • Queue the writes, keep the reads synchronous only when interactive. Payment initiation and bulk sync jobs belong on a queue with retries and backoff; treat 429s and transient 5xx as retryable, but never retry a signature failure — that is deterministic and will just burn attempts.
  • Testing pattern. Bind a fake client in the container for feature tests, and keep one integration test that runs against sandbox. For the signing path, assert on the effect (a request is deemed signed) rather than reimplementing JWT signing in your test suite; a throwaway self-signed certificate in tests/fixtures is enough to exercise the live-mode branch.

Gotchas and Tips

  • The certificate is the new failure surface. v1.1.0 introduces a class of errors that look like auth failures but are not: a malformed PEM, an encrypted key with the wrong passphrase, an expired certificate, or a key/cert pair that don't match. When a live request returns 401/403, check the signature path before you check the token.
  • Key format matters more than the path. Ponto expects a PEM-encoded private key and certificate. If your certificate authority hands you a PKCS#12 (.p12/.pfx) bundle, convert and extract before pointing config at it — the package will not unwrap it for you.
  • Never commit certificates. The private key is a production secret. Load it from a path outside the repo or from a secret manager writing to a tmpfs path at boot; add the directory to .gitignore even in development.
  • Clock skew breaks signatures silently. HTTP signatures embed a timestamp; a container with drifting clock produces signatures that look structurally valid but are rejected. Make sure NTP is sane on your app servers and check Date headers when debugging intermittent live-only failures.
  • Body-hash mismatches. If you insert middleware that mutates the request body (encoders, loggers that re-serialise, a custom Guzzle handler) after signing, the digest no longer matches. Keep your custom HTTP middleware ordering explicit and put anything that touches the payload before the signing layer, or avoid it entirely.
  • Sandbox success proves less than you think. The absence of signing requirements in sandbox means a green test suite can still fail in production. Run at least one real live-mode smoke test (a read-only call) as part of your go-live checklist.
  • Config caching bites. After changing certificate paths or credentials, php artisan config:cache must be re-run — a stale cached config with the old path is a very common "but I changed the env var" bug.
  • Debugging output should be redacted. The package exposes the underlying HTTP client; if you enable request logging, filter the Authorization and Signature headers and never log the private key passphrase. Signature headers are effectively bearer material within their validity window.
  • Extension points. Prefer the package's published config and container bindings for customisation. If you need to intercept calls (retries, correlation IDs, metrics), attach it as HTTP client middleware rather than forking the SDK — v1.1.0 shows the package is still moving, and a fork will make the next signature or endpoint change painful.
  • Upgrade note from v1.0.0. v1.1.0 is additive, but it changes the code path for live requests the moment certificate config is present. If you were previously working around missing signatures with custom middleware, remove it when upgrading — double-signing will be rejected.
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.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast