SumUp For Developers

SumUp For Developers

  • Terminal Payments
  • Online Payments
  • Help
  • API Reference

›Online Payments

Online Payments

    Introduction

    • Getting started
    • Register application
    • Authorization
    • Response Handling
    • Webhooks

    Guides

    • Make a payment with a card entered by a customer
    • Saving a payment instrument for future use
    • Make a payment recurrent
    • Make a refund

    Alternative Payment Methods

    • Getting Started

    Features

    • Open Banking
    • 3-D Secure flow

    Tools

    • Payment card widget
    • PHP SDK

    Plugins

    • WooCommerce
    • PrestaShop
    • WIX

PHP SDK

SumUp provides a library that allows smoother integration into the SumUp’s API. It is written in PHP as one of the most requested by developers programming language. It is designed to facilitate payment integrators, developers and other interested parties when building payment checkout experiences and provides easier access to other services like:

  • managing merchant profiles
  • managing checkouts
  • managing customers
  • managing payouts
  • querying transactions

Installation

The SumUp eCom PHP SDK can be installed with Composer. Run the following command:

composer require sumup/sumup-ecom-php-sdk

Basic usage

try {
    $sumup = new \SumUp\SumUp([
        'app_id'     => 'YOUR-CLIENT-ID',
        'app_secret' => 'YOUR-CLIENT-SECRET',
        'code'       => 'YOUR-AUTHORIZATION-CODE'
    ]);
    $checkoutService = $sumup->getCheckoutService();
    $checkoutResponse = $checkoutService->create($amount, $currency, $checkoutRef, $payToEmail);
    $checkoutId = $checkoutResponse->getBody()->id;
//  pass the $chekoutId to the front-end to be processed
} catch (\SumUp\Exceptions\SumUpAuthenticationException $e) {
    echo 'Authentication error: ' . $e->getMessage();
} catch (\SumUp\Exceptions\SumUpResponseException $e) {
    echo 'Response error: ' . $e->getMessage();
} catch(\SumUp\Exceptions\SumUpSDKException $e) {
    echo 'SumUp SDK error: ' . $e->getMessage();
}

SDK documentation

For more information read the documentation.

← Payment card widgetWooCommerce →
  • Installation
  • Basic usage
  • SDK documentation
SumUp For Developers
Terminal Payments
Online Payments
Help
API Reference
Contact us

Legal Notice
Privacy Policy
Terms & Conditions
Cookie Policy
© SumUp Inc.

In order to provide optimal service, SumUp uses cookies. By continuing to browse the site you are agreeing to our use of cookies.