Download the PHP package paytrail/paytrail-php-sdk without Composer

On this page you can find all versions of the php package paytrail/paytrail-php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.


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.

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 paytrail-php-sdk

Paytrail PHP-SDK

PHP Software Development Kit for Paytrail payment service

Paytrail Payment Service

Paytrail is a payment gateway that offers 20+ payment methods for Finnish customers.

The payment gateway provides all the popular payment methods with one simple integration. The provided payment methods include, but are not limited to, credit cards, online banking and mobile payments.

To use the payment service, you need to sign up for a Paytrail account. Transaction fees will be charged for every transaction. Transaction cost may vary from merchant to merchant, based on what is agreed upon with Paytrail when negotiating your contract. For more information and registration, please visit our website or contact [email protected] directly.


General requirements

Development requirements


PHP-SDK will use Guzzle 6 or 7, if in present application, otherwise it will fall back to cURL. Guzzle is still used as dev dependency to make testing easier.

Using Guzzle is recommended on applications using PHP-SDK.


Install with Composer:

The package uses PSR-4 autoloader. Activate autoloading by requiring the Composer autoloader:

Note the path to the vendor directory is relative to your project.

Folder contents & descriptions

Folder/File Content/Description
examples Examples
src/Exception Exception classes and functions
src/Interfaces Interface classes and functions for all the related classes to implement
src/Model Model classes and functions
src/Request Request classes and functions
src/Response Response classes and functions
src/Util Utility/trait classes and functions
src/Client.php Client class and functions
tests/unit PHP unit tests

Basic functionalities

The Paytrail PHP-SDK supports most of the functionalities of the Paytrail Payment API.

Some of the key features are:

Payments and refunds

Tokenized credit cards and payments





List of Client::class methods

Method Description
getPaymentProviders() Get a list of payment providers
getGroupedPaymentProviders() Returns an array of grouped payment providers fields
createPayment() Create payment
createShopInShopPayment() Create SiS payment
getPaymentStatus() Request payment status
refund() Create refund
emailRefund() Create email refund
createAddCardFormRequest() Save card details
createGetTokenRequest() Request card token
createCitPaymentCharge() Create CiT payment
createCitPaymentAuthorizationHold() Create CiT authorization hold
createCitPaymentCommit() Commit CiT authorization hold
createMitPaymentCharge() Create MiT payment
createMitPaymentAuthorizationHold() Create MiT authorization hold
createMitPaymentCommit() Commit MiT authorization hold
revertPaymentAuthorizationHold() Revert existing Mit or CiT authorization hold
getSettlements() [Deprecated] Deprecated Request settlements
requestSettlements() Request settlements
requestPaymentReport() Request payment report
requestPaymentReportBySettlement() Request payment report by settlement ID
createPaymentAndAddCard() Create payment and save card details

Disclaimer: This open source project is made available to assist coders in getting started with our API. However, we do not provide any warranty or guarantee that the code will work as intended and offer limited support for it. Use at your own risk.

All versions of paytrail-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
ext-json Version *
ext-curl Version *
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 paytrail/paytrail-php-sdk contains the following files

Loading the files please wait ....