PHP SDK Documentation

Easily accept card payments in your PHP application!

Welcome to the myPOS PHP SDK — your toolkit for secure, fast, and flexible payment integration.
This guide walks you through setup, payment flows, and best practices, whether you’re building a custom checkout or adding myPOS to an existing site.

System Requirements

Before you start, make sure you have:

  • PHP Version: PHP 5.4.8 or newer (latest recommended)
  • Public IP Address: Your server must be publicly accessible
  • HTTPS Required: Your notification URL (URL_Notify) must use HTTPS

Important: Only SSL-enabled (HTTPS) URLs are accepted for notifications. HTTP will be rejected.

Handling Payment Notifications

When myPOS sends a payment notification, your server must respond like this:

  • Status code: HTTP 200 OK
  • Response body: OK (plain text, no quotes)

Don’t return:
✗ Custom messages
✗ Error responses
✗ HTML pages
✗ Anything except plain OK

Why? Any other response may cause transaction failures or repeated notifications.

Installation

The easiest way: Use Composer!

composer require developermypos/mypos-checkout-sdk

Why Composer?

  • Handles dependencies for you
  • Makes updates easy
  • Keeps your project organized

New to Composer? Visit getcomposer.org for a quick start.

What’s Inside This Guide

  • Step-by-step installation
  • Payment processing examples
  • Pre-authorization & capture
  • Refunds & reversals
  • Security & validation tips
  • Advanced features