SDKs
Official SDKs wrap authentication, request signing, automatic retries and webhook verification so you write less boilerplate.
🐍 Python
Python 3.8+ · growthbnk on PyPI
🐘 PHP
PHP 8.0+ · growthbnk/sdk on Packagist
🟢 Node.js
Node 18+ · @growthbnk/sdk on npm
Install
Install
pip install growthbnkcomposer require growthbnk/sdknpm install @growthbnk/sdkCreate a payment
Initialise the client once with your credentials, then create a payment. The SDK computes the request signature for you.
Create payment
from growthbnk import GrowthBnk
gb = GrowthBnk(
api_key="YOUR_API_KEY",
api_secret="YOUR_API_SALT",
base_url="https://api.growthbnk.com",
)
payment = gb.payments.create(
merchant_transaction_id="ORDER-2026-0001",
amount="1499.00",
currency="INR",
customer={"email": "jane.doe@example.com", "phone": "9876543210"},
success_url="https://merchant.example.com/success",
failure_url="https://merchant.example.com/failure",
)
print(payment["payment_link"])<?php
use Growthbnk\Client;
$gb = new Client([
'api_key' => 'YOUR_API_KEY',
'api_secret' => 'YOUR_API_SALT',
'base_url' => 'https://api.growthbnk.com',
]);
$payment = $gb->payments->create([
'merchant_transaction_id' => 'ORDER-2026-0001',
'amount' => '1499.00',
'currency' => 'INR',
'customer' => ['email' => 'jane.doe@example.com', 'phone' => '9876543210'],
'success_url' => 'https://merchant.example.com/success',
'failure_url' => 'https://merchant.example.com/failure',
]);
echo $payment['payment_link'];import { GrowthBnk } from '@growthbnk/sdk';
const gb = new GrowthBnk({
apiKey: 'YOUR_API_KEY',
apiSecret: 'YOUR_API_SALT',
baseUrl: 'https://api.growthbnk.com',
});
const payment = await gb.payments.create({
merchantTransactionId: 'ORDER-2026-0001',
amount: '1499.00',
currency: 'INR',
customer: { email: 'jane.doe@example.com', phone: '9876543210' },
successUrl: 'https://merchant.example.com/success',
failureUrl: 'https://merchant.example.com/failure',
});
console.log(payment.paymentLink);Verify a webhook
Verify inbound webhooks in one call — the SDK recomputes and compares the signature, throwing if it does not match.
Verify webhook
event = gb.webhooks.verify(raw_body, request.headers)
if event["transaction_status"] == "SUCCESS":
fulfill_order(event["merchant_transaction_id"])$event = $gb->webhooks->verify($rawBody, getallheaders());
if ($event['transaction_status'] === 'SUCCESS') {
fulfillOrder($event['merchant_transaction_id']);
}const event = gb.webhooks.verify(rawBody, req.headers);
if (event.transaction_status === 'SUCCESS') {
fulfillOrder(event.merchant_transaction_id);
}Prefer raw HTTP?
You can integrate without an SDK using the HTTP API reference and the signing guide directly — the SDKs are a convenience, not a requirement.