PHPackages                             paykun/checkout - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. paykun/checkout

ActivePackage[Payment Processing](/categories/payments)

paykun/checkout
===============

PayKun Checkout library which can be used to initiate payment

2.0.5(5y ago)29.7k3[1 PRs](https://github.com/paykun-code/paykun-php/pulls)MITPHPPHP &gt;=5.3.0

Since Jul 5Pushed 1y agoCompare

[ Source](https://github.com/paykun-code/paykun-php)[ Packagist](https://packagist.org/packages/paykun/checkout)[ RSS](/packages/paykun-checkout/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (9)Dependencies (1)Versions (8)Used By (0)

checkout-php
============

[](#checkout-php)

[Latest Stable Version](https://packagist.org/packages/paykun/checkout) \*\*\* [License](https://packagist.org/packages/paykun/checkout)

Installation
============

[](#installation)

- If your project uses composer, run the below command

```
composer require paykun/checkout

```

- If you are not using composer, download the latest release from [the releases section](https://github.com/paykun-code/paykun-php/releases/). **You should download the `Source code.zip` file**. After that include `Payment.php` in your application and you can use the API as usual.

How To Generate Access token and API Secret
===========================================

[](#how-to-generate-access-token-and-api-secret)

You can generate Or Regenerate Access token and API Secret from login into your paykun admin panel, Then Go To : Settings -&gt; Security -&gt; API Keys. There you will find the generate button if you have not generated api key before.

If you have generated api key before then you will see the date of the api key generate, since you will not be able to retrieve the old api key (For security reasons) we have provided the re-generate option, so you can re-generate api key in case you have lost the old one.

Note : Once you re-generate api key your old api key will stop working immediately. So be cautious while using this option.

Usage (Composer project)
========================

[](#usage-composer-project)

```
use Paykun\Checkout\Payment;

$obj = new Payment('', '', '');

// Initializing Order
// default currency is 'INR'
$obj->initOrder('', '', "", '',  '', 'INR');

// Add Customer
$obj->addCustomer('', '', '');

// Add Shipping address
$obj->addShippingAddress('', '', '', '', '');

// Add Billing Address
$obj->addBillingAddress('', '', '', '', '');

echo $obj->submit();

/* Check for transaction status
 * Once your success or failed url called then create an instance of Payment same as above and then call getTransactionInfo like below
 *  $obj = new Payment('merchantUId', 'accessToken', 'encryptionKey');
 *  $transactionData = $obj->getTransactionInfo(Get payment-id from the success or failed url);
 *  Process $transactionData as per your requirement
 *
 * */
```

Usage (Non-composer project)
============================

[](#usage-non-composer-project)

```
require 'src/Payment.php';
require 'src/Validator.php';
require 'src/Crypto.php';

/**
 *  Parameters requires to initialize an object of Payment are as follow.
 *  mid => Merchant Id provided by Paykun
 *  accessToken => Access Token provided by Paykun
 *  encKey =>  Encryption provided by Paykun
 *  isLive => Set true for production environment and false for sandbox or testing mode
 *  isCustomTemplate => Set true for non composer projects, will disable twig template
 */

$obj = new \Paykun\Checkout\Payment('', '', '', true, true);

// Initializing Order
// default currency is 'INR'
$obj->initOrder('', '', "", '',  '', 'INR');

// Add Customer
$obj->addCustomer('', '', '');

// Add Shipping address
$obj->addShippingAddress('', '', '', '', '');

// Add Billing Address
$obj->addBillingAddress('', '', '', '', '');

//Render template and submit the form
echo $obj->submit();

/* Check for transaction status
 * Once your success or failed url called then create an instance of Payment same as above and then call getTransactionInfo like below
 *  $obj = new Payment('merchantUId', 'accessToken', 'encryptionKey', true, true); //Second last false if sandbox mode
 *  $transactionData = $obj->getTransactionInfo(Get payment-id from the success or failed url);
 *  Process $transactionData as per your requirement
 *
 * */
```

For further help, see our documentation on .

License
-------

[](#license)

The Paykun PHP SDK is released under the MIT License.

Release
-------

[](#release)

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~86 days

Recently: every ~63 days

Total

6

Last Release

2113d ago

Major Versions

1.0.0 → 2.0.02019-12-31

### Community

Maintainers

![](https://www.gravatar.com/avatar/7f6a38ee0f1ca5106cae0d0c8348ff9d0775070abacc4d64e1dda0f3c5e44d2f?d=identicon)[paykun-code](/maintainers/paykun-code)

---

Top Contributors

[![sankhatVijay](https://avatars.githubusercontent.com/u/45311113?v=4)](https://github.com/sankhatVijay "sankhatVijay (1 commits)")

### Embed Badge

![Health badge](/badges/paykun-checkout/health.svg)

```
[![Health](https://phpackages.com/badges/paykun-checkout/health.svg)](https://phpackages.com/packages/paykun-checkout)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
