Download the PHP package paystream/sdk without Composer
On this page you can find all versions of the php package paystream/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download paystream/sdk
More information about paystream/sdk
Files in paystream/sdk
Informations about the package sdk
wemisc/pay-sdk
The official WeMisc Pay PHP SDK. The Composer package name is
wemisc/pay-sdk. It covers both WeMisc Pay APIs with typed results and
exceptions instead of hand-rolled HTTP calls:
WeMiscPayClient— the partner integration API (api_token, server-to-server): create a checkout, confirm an invoice's status. This is what most integrations need.WeMiscPayDashboardClient— the dashboard/mobile API (per-user login): company profile, invoice/payment-session listing, reports. Use this to build a mobile app or an external dashboard on top of the same data a user sees when they log into WeMisc Pay.
Install
Partner integration — WeMiscPayClient
Laravel
Handling the redirect back
Once the customer finishes on checkout_url, WeMiscPay redirects their browser back to your success_url or fail_url with ?invoice_id=... appended (&status=... too, on the success and explicit-cancel paths — a generic failure only appends invoice_id).
Don't trust those query params as proof of payment — they're for UX (which page to show), not confirmation. Always re-check the real state server-side:
Dashboard / mobile — WeMiscPayDashboardClient
A separate API, authenticated by logging in as a WeMiscPay user (Sanctum token), not the company api_token above. A main-account user sees every company through it; everyone else sees only their own — exactly like the web dashboard.
Already have a token from a previous login() (e.g. you persisted it in the current user's session)? Skip logging in again:
Laravel
Note this facade resolves a request-scoped instance (Application::scoped(), not a plain singleton) — safe under Octane/queue workers, where a plain singleton could otherwise leak one user's logged-in token into another request.
Reports
monthlyPaidPerCompany(), monthlyPaidPerBank(), settledPerCompany(), companyWithBanks() return plain decoded arrays, not DTOs — each groups rows differently (by company+month, bank+month, company+batch, company+bank), so a single fixed shape doesn't fit all four honestly. Check the field names against the in-dashboard API docs #mobile-reports section, or just var_dump() a response once.
API surface
WeMiscPayClient (partner integration, api_token):
| Method | Maps to | Returns |
|---|---|---|
checkout(amount, successUrl, failUrl, reference?) |
POST /checkout |
DTO\CheckoutResult |
getInvoice(invoiceId) |
GET /invoices/{id} |
DTO\Invoice |
WeMiscPayDashboardClient (dashboard/mobile, user login):
| Method | Maps to | Returns |
|---|---|---|
login(email, password) |
POST /login |
string (token, also stored on the client) |
withToken(token) |
— | $this, for reusing an existing token |
logout() |
POST /logout |
void |
companyProfile() |
GET /company/profile |
DTO\CompanyProfile |
invoices(page = 1) |
GET /invoices |
DTO\PaginatedResult<DTO\DashboardInvoice> |
invoice(invoiceId) |
GET /invoices/{id} |
DTO\DashboardInvoice |
paymentSessions(page = 1) |
GET /payment-sessions |
DTO\PaginatedResult<DTO\PaymentSession> |
monthlyPaidPerCompany() |
GET /reports/monthly-paid-company |
array |
monthlyPaidPerBank() |
GET /reports/monthly-paid-banks |
array |
settledPerCompany() |
GET /reports/settled-per-company |
array |
companyWithBanks() |
GET /reports/company-with-banks |
array |
Exceptions
Both clients throw the same set, all extending WeMiscPay\Sdk\Exceptions\WeMiscPayException:
AuthenticationException— invalid/missing credentials (401).ValidationException— bad input (422);->errors()gives the field-level messages.ApiException— anything else non-2xx (404, 503, ...);->statusCode()/->body().
WeMiscPayDashboardClient also throws a plain WeMiscPayException if you call an authenticated method before login()/withToken().