Official SDKs · 6 Languages · Production-Ready

Official SDKs
Idiomatic. Typed.
Production-Ready.

Six official libraries for Node.js, Python, PHP, Go, Ruby, and Java. Full TypeScript generics, async/await, automatic retries with exponential backoff, and webhook signature verification — all built in, zero config.

TypeScript generics
Async / await
Auto-retry
Webhook helpers
Idempotency built-in
6
Languages
2.5M+
Weekly Downloads
v3.2
Latest Version
100%
Test Coverage
Code Examples

Install & Create Your First Payment

Select your language. Install. Ship.

Install v3.2.1
# npm
npm install @paymentgate/node

# yarn
yarn add @paymentgate/node

# pnpm
pnpm add @paymentgate/node
Create a payment
import Paymentgate from '@paymentgate/node';

const pg = new Paymentgate('sk_live_...');

const intent = await pg.paymentIntents.create({
  amount: 4900,        // € 49.00
  currency: 'eur',
  payment_method_types: ['card'],
  metadata: { order_id: 'ORD-7741' },
});

console.log(intent.client_secret);
TypeScript generics Async / await Auto-retry (3x exp. backoff) ESM + CJS dual build Deno & Bun compatible
Install v3.1.4
# pip
pip install paymentgate

# poetry
poetry add paymentgate

# uv
uv add paymentgate
Create a payment
import paymentgate

pg = paymentgate.Client("sk_live_...")

# async variant: aiopaymentgate
intent = pg.payment_intents.create(
    amount=4900,
    currency="eur",
    payment_method_types=["card"],
    metadata={"order_id": "ORD-7741"},
)
print(intent.client_secret)
PEP 484 type hints asyncio (aiopaymentgate) Django middleware FastAPI dependency Python 3.9+
Install v4.3.0
# Composer
composer require paymentgate/paymentgate-php

# Laravel: auto-discovers service provider
# Add PG_SECRET_KEY=sk_live_... to .env
Create a payment
use Paymentgate\Client;

$pg = new Client('sk_live_...');

$intent = $pg->paymentIntents->create([
  'amount'   => 4900,
  'currency' => 'eur',
  'payment_method_types' => ['card'],
  'metadata' => ['order_id' => 'ORD-7741'],
]);

echo $intent->client_secret;
PSR-7 / PSR-18 Laravel Facade Symfony Bundle WordPress helper PHP 8.1+
Install v3.0.2
go get github.com/paymentgate/paymentgate-go/v3

# Go 1.21+ required
# Context-aware, goroutine-safe
Create a payment
import (
  pg "github.com/paymentgate/paymentgate-go/v3"
  "github.com/paymentgate/paymentgate-go/v3/paymentintent"
)

client := pg.New("sk_live_...", nil)
params := &paymentintent.Params{
  Amount:   pg.Int64(4900),
  Currency: pg.String("eur"),
}
intent, err := client.PaymentIntents.New(params)
context.Context propagation Goroutine-safe errors.As wrapping Go modules Go 1.21+
Install v5.2.3
# Gemfile
gem 'paymentgate', '~> 5.2'

# CLI
gem install paymentgate
Create a payment
require 'paymentgate'

Paymentgate.api_key = 'sk_live_...'

intent = Paymentgate::PaymentIntent.create(
  amount: 4900,
  currency: 'eur',
  payment_method_types: ['card'],
  metadata: { order_id: 'ORD-7741' }
)
Rails engine Sorbet type signatures Rack middleware (webhooks) ActiveRecord helpers Ruby 3.1+
Install (Maven) v3.2.0
<!-- pom.xml -->
<dependency>
  <groupId>io.paymentgate</groupId>
  <artifactId>paymentgate-java</artifactId>
  <version>3.2.0</version>
</dependency>
Create a payment
import io.paymentgate.PaymentgateClient;
import io.paymentgate.model.*;

PaymentgateClient pg = new PaymentgateClient(
  "sk_live_...");

PaymentIntentCreateParams params =
  PaymentIntentCreateParams.builder()
    .setAmount(4900L)
    .setCurrency("eur")
    .addPaymentMethodType("card")
    .build();
PaymentIntent i = pg.paymentIntents().create(params);
Spring Boot starter Reactive WebClient Maven + Gradle Builder pattern API Java 11+
All Libraries

Versions, Features & GitHub

Every official library — versioned, documented, open-source.

v3.2.1

Node.js / TypeScript

Node 18+, Deno, Bun, and Cloudflare Workers. Full TypeScript generics across all resource types.

TypeScript ESM + CJS Auto-retry
GitHub npm Changelog
v3.1.4

Python

Python 3.9+. Sync and async clients. Django middleware and FastAPI dependency injection included.

Async/await Type hints Django
GitHub PyPI Changelog
v4.3.0

PHP

PHP 8.1+. PSR-7/18 compatible. Laravel Facade, Symfony Bundle, and WordPress helper class all included.

Laravel PSR-7 Symfony
GitHub Packagist Changelog
v3.0.2

Go

Go 1.21+. Context propagation throughout. Goroutine-safe. Idiomatic error wrapping with errors.As.

Context Goroutine-safe Go modules
GitHub pkg.go.dev Changelog
v5.2.3

Ruby

Ruby 3.1+. Rails engine with ActiveRecord helpers. Sorbet type signatures. Webhook validator as Rack middleware.

Rails Sorbet Rack middleware
GitHub RubyGems Changelog
v3.2.0

Java

Java 11+. Spring Boot starter auto-configures from application.properties. Reactive WebClient variant for non-blocking I/O.

Spring Boot Maven Gradle
GitHub Maven Central Changelog

Built-in Features — Every SDK

Not bolted on later. Designed from day one for production payment systems.

TypeScript Types

Full generic types across every resource and every method parameter. Autocomplete in VS Code, WebStorm, and IntelliJ with zero extra config.

Automatic Retries

Idempotent requests are retried up to 3 times with exponential backoff on network errors or 500/503 responses. Configurable per-client or per-request.

Webhook Signature Verification

One-line HMAC-SHA256 signature verification via webhooks.constructEvent(). Prevents replay attacks and spoofed payloads.

Pagination Helpers

Cursor-based pagination with autoPagingEach() and autoPagingToArray() — iterate millions of records without writing page-loop boilerplate.

Idempotency Built-in

Pass an idempotency key per-request to safely retry on network failures. Duplicate requests return the original response with no side effects.

Full Test Coverage

100% unit test coverage. Integration test suite runs against the live sandbox on every merge. All SDKs include test fixtures and a local mock server for offline testing.

Developers Love the SDKs

What engineers who ship with Paymentgate have to say.

"We migrated from a legacy processor in a single sprint. The TypeScript types caught two integration bugs before they ever reached production. The auto-pagination helper alone saved me two days of boilerplate."

MH
Markus Holmberg
Lead Engineer, Nordcart AB · Stockholm

"The Go SDK is everything I expect from an idiomatic library — context propagation everywhere, clean error wrapping, goroutine-safe by default. We process 30,000 transactions a day with it and it's rock solid."

TA
Tuulikki Ahonen
Senior Backend Engineer, Kauppilas Oy · Helsinki

Versioning Policy

All SDKs follow Semantic Versioning 2.0. Breaking changes are introduced only on major versions, with a 12-month deprecation window and advance notice via email and changelog.

# Pin to minor, allow patches (recommended)
npm install @paymentgate/node@^3.2.0

# Exact lock for regulated environments
npm install @paymentgate/[email protected]

Recent Changelog

v3.2.1 — April 2026
Webhook idempotency helpers across all SDKs, improved 3DS2 error messages, Go 1.22 support.
v3.2.0 — March 2026
Cursor-based pagination on all list methods, TypeScript strict mode, Python asyncio client GA.
v3.1.0 — January 2026
Disputes and Payouts resources, SEPA Direct Debit support across all six SDKs.
Full changelog →