SDKs and examples
Official libraries and ready-to-copy integration examples.
Official SDKs
| SDK | Install | Links |
|---|---|---|
| Checkout SDK, for the browser | npm install @payinto/checkout-sdk | npm, guide |
| PHP and Laravel, PHP 8.1+ | composer require payintohq/payinto-php-sdk | GitHub, Packagist |
For Node.js and Python, call the API directly. Every guide has JavaScript and Python examples that need no SDK.
Checkout SDK
Add a hosted payment popup to your website. You can also load it from https://checkout.payinto.co/v1/checkout.js. See the Checkout SDK guide for full examples.
import PayintoCheckout from '@payinto/checkout-sdk';
PayintoCheckout.open({
mode: 'public_key',
public_key: 'pk_test_your_public_key',
amount: 150000,
currency: 'NGN',
merchant_reference: 'ORDER-10001',
customer: { email: 'customer@example.com' },
});PHP
composer require payintohq/payinto-php-sdk<?php
use Payinto\Client;
$payinto = new Client([
'secretKey' => $_ENV['PAYINTO_TEST_SECRET_KEY'],
'webhookSecret' => $_ENV['PAYINTO_TEST_WEBHOOK_SECRET'] ?? null,
]);
$whoami = $payinto->business->whoami();
$virtualAccount = $payinto->virtualAccounts->createDynamic([
'amount' => 150000,
'amount_control' => 'Fixed',
'merchant_reference' => 'order-10001',
]);Laravel apps get a service provider and a Payinto facade automatically. Publish the configuration with:
php artisan vendor:publish --tag=payinto-configOpenAPI
Generate a client in any language, or import the API into your tools, from the specification:
Examples
| Flow | Guide |
|---|---|
| Add a payment popup | Checkout SDK |
| Collect one payment | Dynamic virtual account |
| Issue a reusable account | Static virtual account |
| Pay a vendor | Resolve, quote, and transfer |
| Verify webhooks | Signature verification |