# SumUp

Source: https://kart.bnomei.com/docs/providers/sumup
Updated: 2025-12-07T20:45:32+00:00
Summary: Integrate SumUp payments with Kirby CMS using the Kart plugin: configure provider and API keys, include SumUp Checkout JS, and manage customers in sessions.

> SumUp has no hosted checkout thus their JS library is used as described below.

## Using the provider

Path: site/config/config.php  
Code (php):  
```
<?php

return [
   'bnomei.kart.provider' => 'sumup',
   // other options
];
```

  
## API Credentials

![](https://kart.bnomei.com/media/pages/media/e189ed975d-1752161732/sumup-1920x.webp)  
Path: .env  
Code (plaintext):  
```
SUMUP_SECRET_KEY=ZZZ
SUMUP_SECRET_KEY=XXX
SUMUP_MERCHANT_CODE=MMMMMM
```

  
## SumUp Checkout JS

Path: site/templates/payment.php  
Code (php):  
```
<?php snippet('kart/sumup-checkout') ?>

<?php // or create a custom version based on the snippet ?>
<script>
  ...
</script>
```

  
## Customers

The SumUp customer API is designed for managing subscriptions. While it is technically possible to link a customer to a shopping cart checkout, I believe that this linkage will not be visible in the SumUp dashboard. However, you can store customer data within the orders created by Kart in Kirby. To make that possible, you need to...

### a) manually set the customer data during your checkout flow to the current session

Code (php):  
```
<?php

kirby()->session()->set('bnomei.kart.sumup.customer', [
    'email' => $email,
    'name' => $name,
]);
```

  
### Or b) forward the form fields within the checkout form of Kart

Code (php):  
```
<p><strong><?= kart()->cart()->formattedSubtotal() ?> +tax</strong></p>
<form method="POST" action="<?= kart()->urls()->cart_checkout() ?>">
    <?php // TODO: You should add an invisible CAPTCHA here, like...?>
    <?php // snippet('kart/turnstile-form')?>
    <input type="hidden" name="redirect" value="<?= $page?->url() ?>">

    <!-- forwarding data to customer creation -->
    <input type="text" name="name">
    <input type="email" name="email">

    <button type="submit" onclick="this.disabled=true;this.form.submit();" <?= kart()->cart()->canCheckout() === false ? 'disabled' : '' ?>>Checkout</button>
</form>
```

  
Read more about the [Kart checkout form](https://kart.bnomei.com/docs/content/cart-and-checkout#checkout) here.