PayintoDocs

SDKs and examples

Official libraries and ready-to-copy integration examples.

Official SDKs

SDKInstallLinks
Checkout SDK, for the browsernpm install @payinto/checkout-sdknpm, guide
PHP and Laravel, PHP 8.1+composer require payintohq/payinto-php-sdkGitHub, 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-config

OpenAPI

Generate a client in any language, or import the API into your tools, from the specification:

Examples

FlowGuide
Add a payment popupCheckout SDK
Collect one paymentDynamic virtual account
Issue a reusable accountStatic virtual account
Pay a vendorResolve, quote, and transfer
Verify webhooksSignature verification

On this page