Search docs/
Getting StartedPlugins

SumUp

Plugin to communicate with a SumUp payment terminal

https://github.com/mariusbackes/cordova-plugin-sumup

Stuck on a Cordova issue?

If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.

Contact Us Today!

Installation

npm install cordova-sumup-pluginnpm install @ionic-native/sum-upionic cap syncionic cordova plugin add cordova-sumup-pluginnpm install @ionic-native/sum-up
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us

Supported Platforms

  • Android
  • iOS

Usage

React

See here.

Angular

import { SumUp } from '@ionic-native/sum-up';


constructor(private sumUp: SumUp) { }

const sumUpKeys: SumUpKeys = new SumUpKeys();
sumUpKeys.affiliateKey = 'YOUR_API_KEY'; // if not provided in installation
sumUpKeys.accessToken = 'YOUR_ACCESS_TOKEN';

this.sumUp.login(sumUpKeys)
  .then((res: SumUpResponse) => console.log(res))
  .catch((error: SumUpResponse) => console.error(error));

 this.sumUp.auth('YOUR_ACCESS_TOKEN')
  .then((res: SumUpResponse) => console.log(res))
  .catch((error: SumUpResponse) => console.error(error));

 this.sumUp.getSettings()
  .then((res: SumUpResponse) => console.log(res))
  .catch((error: SumUpResponse) => console.error(error));

 this.sumUp.logout()
  .then((res: SumUpResponse) => console.log(res))
  .catch((error: SumUpResponse) => console.error(error));

 this.sumUp.isLoggedIn()
  .then((res: SumUpLoginStatus) => console.log(res))
  .catch((error: SumUpLoginStatus) => console.error(error));

 this.sumUp.prepare()
  .then((res: SumUpResponse) => console.log(res))
  .catch((error: SumUpResponse) => console.error(error));

this.sumUp.closeConnection()
  .then((res: SumUpResponse) => console.log(res))
  .catch((error: SumUpResponse) => console.error(error));

this.sumUp.pay(10.0, 'EUR')
  .then((res: SumUpPayment) => console.log(res))
  .catch((error: SumUpPayment) => console.error(error));