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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

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:

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:

WeMiscPayDashboardClient also throws a plain WeMiscPayException if you call an authenticated method before login()/withToken().

Testing this package


All versions of sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package paystream/sdk contains the following files

Loading the files please wait ...