Skip to main content

SDKs

Open Pay provides official SDKs for five languages plus a CLI tool. Every SDK handles HMAC-SHA256 request signing automatically, so you never have to compute signatures manually.

TypeScript

@openpay/sdk for Node.js and edge runtimes

Go

openlankapay-go-sdk for backend services

Python

openpay-sdk with async httpx support

PHP

openpay/sdk via Composer

Java

com.openpay:openpay-sdk for JVM applications

CLI

openpay command-line tool

Common Features

All SDKs share the same capabilities:
FeatureDescription
Create PaymentsGenerate payment requests with amount, currency, and metadata
Checkout SessionsCreate hosted checkout pages with success/cancel URLs
Webhook VerificationVerify ED25519-signed webhook payloads
HMAC AuthenticationAutomatic request signing with your API key and secret
Error HandlingTyped errors with status codes and descriptive messages
Retry LogicAutomatic retries with exponential backoff for transient failures

Authentication

Every SDK uses HMAC-SHA256 to sign requests. You provide your API key (public identifier) and API secret (signing key), and the SDK handles the rest. The signature is computed as:
message = timestamp + method + path + body
signing_key = SHA256(api_secret)
signature = HMAC-SHA256(message, signing_key)
These headers are sent with each request:
HeaderValue
x-api-keyYour API key (ak_live_xxx)
x-timestampUnix timestamp in milliseconds
x-signatureHMAC-SHA256 hex digest
Get your API key and secret from the Merchant Portal under Integrations.

Quick Comparison

import { OpenPay } from "@openpay/sdk";

const client = new OpenPay({
  apiKey: process.env.OPENPAY_API_KEY!,
  apiSecret: process.env.OPENPAY_API_SECRET!,
});

API Base URL

All SDKs default to the production API:
https://olp-api.nipuntheekshana.com
You can override this by passing a baseUrl option during client initialization if you are targeting a different environment.