Select your language. Install. Ship.
# npm
npm install @paymentgate/node
# yarn
yarn add @paymentgate/node
# pnpm
pnpm add @paymentgate/node
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);
# pip
pip install paymentgate
# poetry
poetry add paymentgate
# uv
uv add paymentgate
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)
# Composer
composer require paymentgate/paymentgate-php
# Laravel: auto-discovers service provider
# Add PG_SECRET_KEY=sk_live_... to .env
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;
go get github.com/paymentgate/paymentgate-go/v3
# Go 1.21+ required
# Context-aware, goroutine-safe
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)
# Gemfile
gem 'paymentgate', '~> 5.2'
# CLI
gem install paymentgate
require 'paymentgate'
Paymentgate.api_key = 'sk_live_...'
intent = Paymentgate::PaymentIntent.create(
amount: 4900,
currency: 'eur',
payment_method_types: ['card'],
metadata: { order_id: 'ORD-7741' }
)
<!-- pom.xml -->
<dependency>
<groupId>io.paymentgate</groupId>
<artifactId>paymentgate-java</artifactId>
<version>3.2.0</version>
</dependency>
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);
Every official library — versioned, documented, open-source.
Node 18+, Deno, Bun, and Cloudflare Workers. Full TypeScript generics across all resource types.
Python 3.9+. Sync and async clients. Django middleware and FastAPI dependency injection included.
PHP 8.1+. PSR-7/18 compatible. Laravel Facade, Symfony Bundle, and WordPress helper class all included.
Go 1.21+. Context propagation throughout. Goroutine-safe. Idiomatic error wrapping with errors.As.
Ruby 3.1+. Rails engine with ActiveRecord helpers. Sorbet type signatures. Webhook validator as Rack middleware.
Java 11+. Spring Boot starter auto-configures from application.properties. Reactive WebClient variant for non-blocking I/O.
Not bolted on later. Designed from day one for production payment systems.
Full generic types across every resource and every method parameter. Autocomplete in VS Code, WebStorm, and IntelliJ with zero extra config.
Idempotent requests are retried up to 3 times with exponential backoff on network errors or 500/503 responses. Configurable per-client or per-request.
One-line HMAC-SHA256 signature verification via webhooks.constructEvent(). Prevents replay attacks and spoofed payloads.
Cursor-based pagination with autoPagingEach() and autoPagingToArray() — iterate millions of records without writing page-loop boilerplate.
Pass an idempotency key per-request to safely retry on network failures. Duplicate requests return the original response with no side effects.
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.
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."
"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."
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]