Paynow Developer Hub
  • DOCUMENTATION
  • ABOUT
  • HELP
  • FORUMS
  • SIGN UP / SIGN IN

›Library Source Docs

Getting Started

  • Getting started
  • Generating Integration Keys
  • Test Mode
  • Artwork and Buttons
  • PHP
  • .NET
  • Node.JS
  • Python
  • Java
  • WooCommerce
  • Gravity Forms
  • Easy Digital Downloads
  • Shopify
  • Camptix
  • Magento
  • Spring Boot

Links & Buttons

  • Simple Payment Request Button
  • Advanced Payment Request Button
  • Notification, Success & Cancel URLs
  • URL Safe Base 64 Encoding

API Reference

  • System Layout
  • Initiate a transaction
  • Express Checkout Transactions
  • Complete a Transaction
  • Status Update
  • Polling for a Status Update
  • Generating Hash
  • Validating Hash
  • Initiate a Passenger Ticket Transaction

Library Source Docs

  • PHP
  • .NET
  • Node.JS
  • Java

Source Docs for PHP Library

Class: \Paynow\Core\Constants

VisibilityFunction

Class: \Paynow\Core\InitResponse

VisibilityFunction
public__construct(array $response) : void
InitResponse constructor.
publicdata() : array
Get the original data sent from Paynow
publicerrors(bool $pretty=true) : string/array
Get the errors sent by Paynow
publicinstructions() : void
publicpollUrl() : bool/string
Returns the poll URL sent from Paynow
publicredirectUrl() : bool/string
Returns the url the user should be taken to so they can make a payment
publicsuccess() : mixed
Gets a boolean indicating whether a request succeeded or failed

Class: \Paynow\Core\Logger

Class Logger

VisibilityFunction

Class: \Paynow\Core\StatusResponse

VisibilityFunction
public__construct(array $response) : void
Default constructor
publicamount() : float/mixed Returns the amount of the transaction, -1 if not available
Get the original amount of the transaction
publicdata() : array
Get the original data sent from Paynow
publicerrors(bool $pretty=true) : string/array
Get the errors sent by Paynow
publicpaid() : mixed/string
Get the status of the transaction
publicpaynowReference() : void
publicreference() : void
publicstatus() : mixed/string
Get the status of the transaction

Class: \Paynow\Http\Client

HTTP Client

VisibilityFunction
public__construct() : void
Default Constructor
publicexecute(\Paynow\Http\RequestInfo $info) : mixed
Executes an HTTP request

Class: \Paynow\Http\ConnectionException

Exception thrown if an error occurs while sending Http request

VisibilityFunction

This class extends \Exception

This class implements \Throwable


Class: \Paynow\Http\RequestInfo

Stores parameters for an http request

VisibilityFunction
public staticcreate(string $url, string $method, array $data=array()) : \Paynow\Http\RequestInfo
Create a new RequestInfo object
publicgetData() : string
Gets the data for the http request as an http query string
publicgetMethod() : string
Get the method for the http request
publicgetUrl() : string
Get the url for the http request

Class: \Paynow\Payments\EmptyCartException

Exception thrown when there's an attempt to send an empty cart to Paynow

VisibilityFunction
public__construct(\Paynow\Payments\FluentBuilder $builder) : void
EmptyCartException constructor.

This class extends \InvalidArgumentException

This class implements \Throwable


Class: \Paynow\Payments\EmptyTransactionReferenceException

Exception thrown when there's an attempt to send a transaction without a reference to Paynow

VisibilityFunction
public__construct(mixed $builder) : void

This class extends \InvalidArgumentException

This class implements \Throwable


Class: \Paynow\Payments\FluentBuilder

VisibilityFunction
public__construct(mixed $ref, string $authEmail='') : void
Default constructor
public__get(mixed $name) : void
publicadd(string/array $item, float/int $amount=null) : void
Add a new item to the list
publiccomputeTotal() : void
publicitemsDescription() : void
Get the description
publicsetDescription(mixed $description) : void
publictoArray() : void
Convert the builder to an array
protectedparseItems(array $items) : void
Parse an array of items

Class: \Paynow\Payments\HashMismatchException

Exception thrown if the hash sent from Paynow does not match the one generated locally

VisibilityFunction

This class extends \Exception

This class implements \Throwable


Class: \Paynow\Payments\InvalidIntegrationException

Exception thrown if wrong credentials are used to make a request to Paynow

VisibilityFunction

This class extends \Exception

This class implements \Throwable


Class: \Paynow\Payments\InvalidUrlException

Exception thrown when return or result url's are not set

VisibilityFunction

This class extends \InvalidArgumentException

This class implements \Throwable


Class: \Paynow\Payments\NotImplementedException

VisibilityFunction

This class extends \Exception

This class implements \Throwable


Class: \Paynow\Payments\Payment

VisibilityFunction
public__get(mixed $name) : void
publicadd(string/array $item, float/int $amount=null) : void
Add a new item to the list
publiccomputeTotal() : void
Calculate the total of the items in the 'cart'
public staticcreate(string $ref, string $authEmail='') : void
Create an instance of the payment class (for normal payments)
public staticcreateMobile(string $ref, string $authEmail, string $phone, string $method) : void
Create an instance of the payment class (for mobile payments)
publicitemsDescription() : void
Get the description for the items in the cart
publicsetDescription(string $description) : void
Sets the description for the transaction
publictoArray() : void
Convert the builder to an array
protectedparseItems(array $items) : void
Parse an array of items

Class: \Paynow\Payments\Paynow

VisibilityFunction
public__construct(string $id, string $key, mixed $returnUrl, mixed $resultUrl) : void
Default constructor.
publiccreateMobilePayment(string/null $ref, mixed $authEmail) : \Paynow\Payments\FluentBuilder
publiccreatePayment(string/null $ref) : \Paynow\Payments\FluentBuilder
publicgetResultUrl() : string
Get the result url for the merchant
publicgetReturnUrl() : string
Get the merchant's return url
publicpollTransaction(mixed $url) : \Paynow\Core\StatusResponse
Check the status of a transaction
publicprocessStatusUpdate() : \Paynow\Core\StatusResponse
Process a status update from Paynow
publicsend(\Paynow\Payments\FluentBuilder/array $builder) : \Paynow\Core\InitResponse
Send a transaction to Paynow
publicsendMobile(\Paynow\Payments\FluentBuilder $builder, mixed $phone, mixed $method) : \Paynow\Core\InitResponse
Send a mobile transaction
publicsetResultUrl(string $resultUrl) : void
Sets the merchant's result url
publicsetReturnUrl(string $returnUrl) : void
Sets the merchant's return url
protectedinit(\Paynow\Payments\FluentBuilder $builder) : InitResponse The response from Paynow
Initiate a new Paynow transaction
protectedinitMobile(\Paynow\Payments\FluentBuilder $builder, string $phone, string $method) : InitResponse The response from Paynow
Initiate a new Paynow transaction

Class: \Paynow\Util\Hash

VisibilityFunction
public staticmake(array $values, mixed $integration_key) : void
public staticverify(mixed $values, mixed $key) : void
← Initiate a Passenger Ticket Transaction.NET →
  • Class: \Paynow\Core\Constants
  • Class: \Paynow\Core\InitResponse
  • Class: \Paynow\Core\Logger
  • Class: \Paynow\Core\StatusResponse
  • Class: \Paynow\Http\Client
  • Class: \Paynow\Http\ConnectionException
  • Class: \Paynow\Http\RequestInfo
  • Class: \Paynow\Payments\EmptyCartException
  • Class: \Paynow\Payments\EmptyTransactionReferenceException
  • Class: \Paynow\Payments\FluentBuilder
  • Class: \Paynow\Payments\HashMismatchException
  • Class: \Paynow\Payments\InvalidIntegrationException
  • Class: \Paynow\Payments\InvalidUrlException
  • Class: \Paynow\Payments\NotImplementedException
  • Class: \Paynow\Payments\Payment
  • Class: \Paynow\Payments\Paynow
  • Class: \Paynow\Util\Hash
Documentation
Getting StartedAPI ReferenceFrequently Asked QuestionsArtwork & Buttons
Libraries & Plugins
PHP.NETNode.JSPythonJava
Plugins
WooCommerceGravity FormsEasy Digital DownloadsShopify
Community
Discussion ForumsBlogs & TutorialsGithubFacebookTwitter
Paynow Zimbabwe
Copyright © 2025 Paynow Zimbabwe