---
title: "Install the Jovvie PHP SDK for Stripe or NMI"
description: "Install the Jovvie PHP SDK for Stripe or NMI with Composer and create a client. Stripe supports live and test modes. NMI supports live payments only."
url: https://docs.jovvie.com/developers/install-the-sdk/
section: "Developers"
last_updated: 2026-10-27
---

# Install the Jovvie PHP SDK for Stripe or NMI

Section: Developers

> Install the Jovvie PHP SDK for Stripe or NMI with Composer and create a client. Stripe supports live and test modes. NMI supports live payments only.

This page shows you how to install the Jovvie PHP SDK, create a client with your keys, and check that it can reach the merchant’s account.

There is one SDK for each payment processor. Install the one that matches the merchant’s account. If you support both, you can install both.

## Before you start

- Get your keys and, for Stripe, your platform provider ID. See [Get started](https://docs.jovvie.com/developers/get-started/).

- Your server needs:

  - PHP 7.4 or later
  - The PHP `curl` and `json` extensions
  - Composer

## Install the package

For Stripe, run:

```bash
composer require bizswoop/jovvie-payments
```

For NMI, run:

```bash
composer require bizswoop/jovvie-payments-gateway
```

Both SDKs are open source:

- Stripe: [GitHub](https://github.com/bizswoop-development/jovvie-payments-php) and [Packagist](https://packagist.org/packages/bizswoop/jovvie-payments)
- NMI: [GitHub](https://github.com/bizswoop-development/jovvie-payments-gateway-php) and [Packagist](https://packagist.org/packages/bizswoop/jovvie-payments-gateway)

Then load Composer’s autoloader in your code, if your framework does not already do this:

```php
require __DIR__ . '/vendor/autoload.php';
```

## Create a client for Stripe

```php
use JovviePayments\JovviePaymentsClient;

$jovvie = new JovviePaymentsClient(
    'YOUR_PUBLIC_KEY',
    'YOUR_SECRET_KEY',
    'YOUR_PLATFORM_PROVIDER',
    'test', // 'live' or 'test'
    ['userAgent' => 'YourApp/1.0.0']
);
```

The arguments are:

| Argument             | What to pass                                                                                                                          |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| Public key           | The application’s **Public Key**                                                                                                      |
| Secret key           | The application’s **Secret Key**                                                                                                      |
| Platform provider ID | The platform provider ID you got from Jovvie support. It is required                                                                  |
| Mode                 | `'live'` for real payments or `'test'` for test payments. The default is `'live'`                                                     |
| Options              | An array. Set `userAgent` to your app’s name and version, such as `YourApp/1.0.0`. It is added to the requests your integration sends |

In your real code, read the keys and the platform provider ID from environment variables or a secrets manager instead of typing them into the file.

> **Caution**
>
> Always pass the platform provider ID that Jovvie support gave you. Some values are accepted in test mode only. With one of those, your client works in test mode, but creating it in live mode throws an `InvalidArgumentException`, so the integration fails when the merchant goes live. If you do not have a platform provider ID yet, contact [Jovvie support](https://jovvie.com/support/) before you start testing.

The main services are:

| Method                          | Use it to                                                           |
| ------------------------------- | ------------------------------------------------------------------- |
| `$jovvie->payments()`           | Create one-time and recurring payments, and get a payment by its ID |
| `$jovvie->authorizationLinks()` | Create links that unlock card readers for staff                     |
| `$jovvie->accounts()`           | Get details of the merchant’s account                               |

## Create a client for NMI

```php
use JovviePaymentsGateway\JovviePaymentsGatewayClient;

$gateway = new JovviePaymentsGatewayClient(
    'YOUR_PUBLIC_KEY',
    'YOUR_SECRET_KEY',
    ['userAgent' => 'YourApp/1.0.0']
);
```

The NMI client does not take a platform provider ID or a mode.

The main services are:

| Method                 | Use it to                                               |
| ---------------------- | ------------------------------------------------------- |
| `$gateway->payments()` | Create a payment and get a payment by its ID            |
| `$gateway->devices()`  | List, register, and remove the merchant’s NMI terminals |
| `$gateway->accounts()` | Get details of the merchant’s account                   |

## Check your connection

To check that your keys work, get the merchant’s account name. This makes a real request but does not create a payment.

For Stripe:

```php
$self = $jovvie->accounts()->self();

echo $self->account->name;
```

For NMI:

```php
$self = $gateway->accounts()->self();

echo $self->name;
```

If the keys, the platform provider ID, or the merchant’s account are not right, the SDK throws an exception. See [Handle errors](https://docs.jovvie.com/developers/errors/).

## Live and test mode

With Stripe, you choose the mode when you create the client. The same keys and platform provider ID work in both modes, so you only change the fourth argument:

- `'test'`: no real card is charged. Use this while you build and test.
- `'live'`: real payments.

Any other value throws an `InvalidArgumentException`. Creating a live client with a platform provider ID that works in test mode only also throws an `InvalidArgumentException`.

Payments, card readers, and authorization links in one mode do not appear in the other. Make the mode a setting in your integration, so the merchant can switch without a code change.

The NMI SDK has no test mode. Every payment you create with it is real. See [Test your integration](https://docs.jovvie.com/developers/test-mode/).

## Next steps

- Stripe: [Create a payment](https://docs.jovvie.com/developers/create-a-payment/)
- NMI: [Take payments with NMI](https://docs.jovvie.com/developers/nmi-payments/)
