PHPackages                             blockchyp/blockchyp-php - 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. [API Development](/categories/api)
4. /
5. blockchyp/blockchyp-php

ActiveLibrary[API Development](/categories/api)

blockchyp/blockchyp-php
=======================

BlockChyp PHP SDK

v2.30.1(1mo ago)335.7k—2.8%3[1 PRs](https://github.com/blockchyp/blockchyp-php/pulls)MITPHPPHP &gt;=5.6.0CI passing

Since Jan 6Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/blockchyp/blockchyp-php)[ Packagist](https://packagist.org/packages/blockchyp/blockchyp-php)[ Docs](https://www.blockchyp.com/)[ RSS](/packages/blockchyp-blockchyp-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (133)Used By (0)

BlockChyp PHP SDK
=================

[](#blockchyp-php-sdk)

[![Build Status](https://github.com/blockchyp/blockchyp-php/actions/workflows/main.yml/badge.svg)](https://github.com/blockchyp/blockchyp-php/actions/workflows/main.yml)[![Packagist](https://camo.githubusercontent.com/1ba287450ffe5d177bfe67647c8a400f18f973e2ed6443d43129469e68f53d92/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626c6f636b636879702f626c6f636b636879702d706870)](https://packagist.org/packages/blockchyp/blockchyp-php)[![License: MIT](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://github.com/blockchyp/blockchyp-php/blob/master/LICENSE)

This is the SDK for PHP. Like all BlockChyp SDKs, it provides a full client for the BlockChyp gateway and BlockChyp payment terminals.

Installation
------------

[](#installation)

The preferred method of installing BlockChyp is via composer. Type the following command from your project's root directory to add BlockChyp to your composer.json file.

```
composer require blockchyp/blockchyp-php

```

Public Facing Web Pages
-----------------------

[](#public-facing-web-pages)

If you're using PHP, there's a good chance your front end is a web page. This SDK is great for communicating with terminals and the BlockChyp gateway, but is not sufficient on its own for dealing with e-commerce scenarios.

For e-commerce, consider supplementing the SDK with our [Web Tokenizer](https://github.com/blockchyp/blockchyp-tokenizer). It's a pure JavaScript library that allows you to tokenize e-commerce payments via a cross-origin iframe. This keeps you out of PCI scope. Check it out on [GitHub](https://github.com/blockchyp/blockchyp-tokenizer).

A Simple Example
----------------

[](#a-simple-example)

Running your first transaction is easy. Make sure you have a BlockChyp terminal, activate it, and generate a set of API keys. The sample code below show how to run a basic terminal transaction.

```
