PHP SDK for FasterPay Integration
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Welcome to FasterPay PHP SDK

FasterPay PHP SDK enables you to integrate the FasterPay's Checkout Page seamlessly without having the hassle of integrating everything from Scratch. Once your customer is ready to pay, FasterPay will take care of the payment, notify your system about the payment and return the customer back to your Thank You page.

Downloading the FasterPay PHP SDK

$ git clone

Setting up the PHP SDK for your project

$ cp fasterpay-php path-to-project/lib/fasterpay-php

Initiating Payment Request using Python SDK


$gateway = new FasterPay\Gateway(array(
'publicKey' 	=> '<your public key>',
'privateKey'	=> '<your private key>',

$form = $gateway->paymentForm()->buildForm(
  'description' => 'Test order',
  'amount' => '10',
  'currency' => 'USD',
  'merchant_order_id' => 'xxxxxx',
  'success_url' => ''

echo $form;

For more information on the API Parameters, refer to our entire API Documentation here

Handling FasterPay Pingbacks


$gateway = new Fasterpay\Gateway(array(
    'publicKey'     => '<your public key>',
    'privateKey'    => '<your private key>',

$pingbackData = json_decode(file_get_contents('php://input'), true);

      array("apiKey" => $_SERVER["HTTP_X_APIKEY"]))
        #TODO: Write your code to deliver contents to the End-User.
        echo "OK"; exit();

echo "NOK";

FasterPay Test Mode

FasterPay has a Sandbox environment called Test Mode. Test Mode is a virtual testing environment which is an exact replica of the live FasterPay environment. This allows businesses to integrate and test the payment flow without being in the live environment. Businesses can create a FasterPay account, turn on the Test Mode and begin to integrate the widget using the test integration keys.

Initiating FasterPay Gateway in Test-Mode


$gateway = new FasterPay\Gateway(array(
  'publicKey'   => '<your public key>',
  'privateKey'  => '<your private key>',
  'apiBaseUrl'  => ''