Quick Start
Accept your first payment in four steps. Pick your language once — the tabs stay in sync across the whole portal.
1. Get your credentials
From your GrowthBnk dashboard, copy your API key and salt. Use the sandbox environment while you build.
2. Initiate a payment
Create a transaction. GrowthBnk signs are computed from your salt (see Authentication).
The response contains a hosted payment_link.
# 1. Compute the auth hash: sha256(key|merchant_transaction_id|transaction_amount|salt)
API_KEY="YOUR_API_KEY"
API_SALT="YOUR_API_SALT"
HASH=$(printf '%s' "$API_KEY|ORDER-2026-0001|1499.00|$API_SALT" | openssl dgst -sha256 | awk '{print $2}')
# 2. Call the API
curl -X POST "https://api.growthbnk.com/v1/route/initiate_payment" \
-H "Content-Type: application/json" \
-H "X-API-Key: $API_KEY" \
-H "Hash: $HASH" \
-d '{
"merchant_transaction_id": "ORDER-2026-0001",
"transaction_amount": "1499.00",
"currency": "INR",
"payment_method": "UPI",
"surl": "https://merchant.example.com/payment/success",
"furl": "https://merchant.example.com/payment/failure",
"customer_details": {
"customer_name": "Jane Doe",
"customer_email": "jane.doe@example.com",
"customer_phone": "9876543210"
}
}'import hashlib
import requests
API_KEY = "YOUR_API_KEY"
API_SALT = "YOUR_API_SALT"
BASE_URL = "https://api.growthbnk.com"
payload = {
'merchant_transaction_id': 'ORDER-2026-0001',
'transaction_amount': '1499.00',
'currency': 'INR',
'payment_method': 'UPI',
'surl': 'https://merchant.example.com/payment/success',
'furl': 'https://merchant.example.com/payment/failure',
'customer_details': {
'customer_name': 'Jane Doe',
'customer_email': 'jane.doe@example.com',
'customer_phone': '9876543210'
}
}
# Auth hash: sha256(key|merchant_transaction_id|transaction_amount|salt)
signing = f"{API_KEY}|ORDER-2026-0001|1499.00|{API_SALT}"
auth_hash = hashlib.sha256(signing.encode("utf-8")).hexdigest()
response = requests.post(
f"{BASE_URL}/v1/route/initiate_payment",
json=payload,
headers={
"Content-Type": "application/json",
"X-API-Key": API_KEY,
"Hash": auth_hash,
},
timeout=30,
)
response.raise_for_status()
print(response.json())<?php
$apiKey = 'YOUR_API_KEY';
$apiSalt = 'YOUR_API_SALT';
$baseUrl = 'https://api.growthbnk.com';
$payload = [
'merchant_transaction_id' => 'ORDER-2026-0001',
'transaction_amount' => '1499.00',
'currency' => 'INR',
'payment_method' => 'UPI',
'surl' => 'https://merchant.example.com/payment/success',
'furl' => 'https://merchant.example.com/payment/failure',
'customer_details' => [
'customer_name' => 'Jane Doe',
'customer_email' => 'jane.doe@example.com',
'customer_phone' => '9876543210'
]
];
// Auth hash: sha256(key|merchant_transaction_id|transaction_amount|salt)
$signing = "{$apiKey}|ORDER-2026-0001|1499.00|{$apiSalt}";
$authHash = hash('sha256', $signing);
$ch = curl_init("{$baseUrl}/v1/route/initiate_payment");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
"X-API-Key: {$apiKey}",
"Hash: {$authHash}",
],
CURLOPT_POSTFIELDS => json_encode($payload),
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;const crypto = require('crypto');
const API_KEY = 'YOUR_API_KEY';
const API_SALT = 'YOUR_API_SALT';
const BASE_URL = 'https://api.growthbnk.com';
const payload = {
'merchant_transaction_id': 'ORDER-2026-0001',
'transaction_amount': '1499.00',
'currency': 'INR',
'payment_method': 'UPI',
'surl': 'https://merchant.example.com/payment/success',
'furl': 'https://merchant.example.com/payment/failure',
'customer_details': {
'customer_name': 'Jane Doe',
'customer_email': 'jane.doe@example.com',
'customer_phone': '9876543210'
}
};
// Auth hash: sha256(key|merchant_transaction_id|transaction_amount|salt)
const signing = `${API_KEY}|ORDER-2026-0001|1499.00|${API_SALT}`;
const authHash = crypto.createHash('sha256').update(signing).digest('hex');
const response = await fetch(`${BASE_URL}/v1/route/initiate_payment`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': API_KEY,
'Hash': authHash,
},
body: JSON.stringify(payload),
});
console.log(await response.json());import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
public class GrowthBnkExample {
public static void main(String[] args) throws Exception {
String apiKey = "YOUR_API_KEY";
String apiSalt = "YOUR_API_SALT";
String baseUrl = "https://api.growthbnk.com";
String payload = """
{
"merchant_transaction_id": "ORDER-2026-0001",
"transaction_amount": "1499.00",
"currency": "INR",
"payment_method": "UPI",
"surl": "https://merchant.example.com/payment/success",
"furl": "https://merchant.example.com/payment/failure",
"customer_details": {
"customer_name": "Jane Doe",
"customer_email": "jane.doe@example.com",
"customer_phone": "9876543210"
}
}
""";
// Auth hash: sha256(key|merchant_transaction_id|transaction_amount|salt)
String signing = apiKey + "|ORDER-2026-0001|1499.00|" + apiSalt;
String authHash = sha256Hex(signing);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(baseUrl + "/v1/route/initiate_payment"))
.header("Content-Type", "application/json")
.header("X-API-Key", apiKey)
.header("Hash", authHash)
.method("POST", HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
private static String sha256Hex(String input) throws Exception {
byte[] digest = MessageDigest.getInstance("SHA-256")
.digest(input.getBytes(StandardCharsets.UTF_8));
StringBuilder sb = new StringBuilder();
for (byte b : digest) sb.append(String.format("%02x", b));
return sb.toString();
}
}using System;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
class GrowthBnkExample
{
static async Task Main()
{
var apiKey = "YOUR_API_KEY";
var apiSalt = "YOUR_API_SALT";
var baseUrl = "https://api.growthbnk.com";
var payload = """
{
"merchant_transaction_id": "ORDER-2026-0001",
"transaction_amount": "1499.00",
"currency": "INR",
"payment_method": "UPI",
"surl": "https://merchant.example.com/payment/success",
"furl": "https://merchant.example.com/payment/failure",
"customer_details": {
"customer_name": "Jane Doe",
"customer_email": "jane.doe@example.com",
"customer_phone": "9876543210"
}
}
""";
// Auth hash: sha256(key|merchant_transaction_id|transaction_amount|salt)
var signing = $"{apiKey}|ORDER-2026-0001|1499.00|{apiSalt}";
var authHash = Convert.ToHexString(
SHA256.HashData(Encoding.UTF8.GetBytes(signing))).ToLowerInvariant();
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", apiKey);
client.DefaultRequestHeaders.Add("Hash", authHash);
var content = new StringContent(payload, Encoding.UTF8, "application/json");
var response = await client.PostAsync($"{baseUrl}/v1/route/initiate_payment", content);
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}package main
import (
"bytes"
"crypto/sha256"
"encoding/hex"
"fmt"
"io"
"net/http"
)
func main() {
apiKey := "YOUR_API_KEY"
apiSalt := "YOUR_API_SALT"
baseURL := "https://api.growthbnk.com"
payload := []byte(`{
"merchant_transaction_id": "ORDER-2026-0001",
"transaction_amount": "1499.00",
"currency": "INR",
"payment_method": "UPI",
"surl": "https://merchant.example.com/payment/success",
"furl": "https://merchant.example.com/payment/failure",
"customer_details": {
"customer_name": "Jane Doe",
"customer_email": "jane.doe@example.com",
"customer_phone": "9876543210"
}
}`)
// Auth hash: sha256(key|merchant_transaction_id|transaction_amount|salt)
signing := apiKey + "|ORDER-2026-0001|1499.00|" + apiSalt
sum := sha256.Sum256([]byte(signing))
authHash := hex.EncodeToString(sum[:])
req, _ := http.NewRequest("POST", baseURL+"/v1/route/initiate_payment", bytes.NewReader(payload))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", apiKey)
req.Header.Set("Hash", authHash)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require 'digest'
require 'json'
require 'net/http'
require 'uri'
api_key = 'YOUR_API_KEY'
api_salt = 'YOUR_API_SALT'
base_url = 'https://api.growthbnk.com'
payload = {
'merchant_transaction_id' => 'ORDER-2026-0001',
'transaction_amount' => '1499.00',
'currency' => 'INR',
'payment_method' => 'UPI',
'surl' => 'https://merchant.example.com/payment/success',
'furl' => 'https://merchant.example.com/payment/failure',
'customer_details' => {
'customer_name' => 'Jane Doe',
'customer_email' => 'jane.doe@example.com',
'customer_phone' => '9876543210'
}
}
# Auth hash: sha256(key|merchant_transaction_id|transaction_amount|salt)
signing = "#{api_key}|ORDER-2026-0001|1499.00|#{api_salt}"
auth_hash = Digest::SHA256.hexdigest(signing)
uri = URI("#{base_url}/v1/route/initiate_payment")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri, {
'Content-Type' => 'application/json',
'X-API-Key' => api_key,
'Hash' => auth_hash
})
request.body = payload.to_json
response = http.request(request)
puts response.body{
"success": true,
"payment_link": "https://api.growthbnk.com/v1/route/pay/8f14e45fceea167a5a36dedd4bea2543",
"transaction_id": "TXN20260707172038123",
"merchant_transaction_id": "ORDER-2026-0001",
"message": "Payment Initiated Successfully"
}3. Redirect the customer
Redirect the customer to the payment_link. GrowthBnk routes them to the best-fit gateway and hosts the
checkout. On completion the customer is returned to your surl or furl.
The browser redirect is a hint, not proof of payment. Confirm the outcome with Transaction Status or a webhook before fulfilling the order.
4. Confirm the result
Fetch the authoritative status with Transaction Status.
Treat only SUCCESS as paid.
# 1. Compute the auth hash: sha256(key|merchant_transaction_id|salt)
API_KEY="YOUR_API_KEY"
API_SALT="YOUR_API_SALT"
HASH=$(printf '%s' "$API_KEY|ORDER-2026-0001|$API_SALT" | openssl dgst -sha256 | awk '{print $2}')
# 2. Call the API
curl -X POST "https://api.growthbnk.com/v1/route/transaction-status" \
-H "Content-Type: application/json" \
-H "X-API-Key: $API_KEY" \
-H "Hash: $HASH" \
-d '{
"merchant_transaction_id": "ORDER-2026-0001"
}'import hashlib
import requests
API_KEY = "YOUR_API_KEY"
API_SALT = "YOUR_API_SALT"
BASE_URL = "https://api.growthbnk.com"
payload = {
'merchant_transaction_id': 'ORDER-2026-0001'
}
# Auth hash: sha256(key|merchant_transaction_id|salt)
signing = f"{API_KEY}|ORDER-2026-0001|{API_SALT}"
auth_hash = hashlib.sha256(signing.encode("utf-8")).hexdigest()
response = requests.post(
f"{BASE_URL}/v1/route/transaction-status",
json=payload,
headers={
"Content-Type": "application/json",
"X-API-Key": API_KEY,
"Hash": auth_hash,
},
timeout=30,
)
response.raise_for_status()
print(response.json())<?php
$apiKey = 'YOUR_API_KEY';
$apiSalt = 'YOUR_API_SALT';
$baseUrl = 'https://api.growthbnk.com';
$payload = [
'merchant_transaction_id' => 'ORDER-2026-0001'
];
// Auth hash: sha256(key|merchant_transaction_id|salt)
$signing = "{$apiKey}|ORDER-2026-0001|{$apiSalt}";
$authHash = hash('sha256', $signing);
$ch = curl_init("{$baseUrl}/v1/route/transaction-status");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
"X-API-Key: {$apiKey}",
"Hash: {$authHash}",
],
CURLOPT_POSTFIELDS => json_encode($payload),
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;const crypto = require('crypto');
const API_KEY = 'YOUR_API_KEY';
const API_SALT = 'YOUR_API_SALT';
const BASE_URL = 'https://api.growthbnk.com';
const payload = {
'merchant_transaction_id': 'ORDER-2026-0001'
};
// Auth hash: sha256(key|merchant_transaction_id|salt)
const signing = `${API_KEY}|ORDER-2026-0001|${API_SALT}`;
const authHash = crypto.createHash('sha256').update(signing).digest('hex');
const response = await fetch(`${BASE_URL}/v1/route/transaction-status`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': API_KEY,
'Hash': authHash,
},
body: JSON.stringify(payload),
});
console.log(await response.json());import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
public class GrowthBnkExample {
public static void main(String[] args) throws Exception {
String apiKey = "YOUR_API_KEY";
String apiSalt = "YOUR_API_SALT";
String baseUrl = "https://api.growthbnk.com";
String payload = """
{
"merchant_transaction_id": "ORDER-2026-0001"
}
""";
// Auth hash: sha256(key|merchant_transaction_id|salt)
String signing = apiKey + "|ORDER-2026-0001|" + apiSalt;
String authHash = sha256Hex(signing);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(baseUrl + "/v1/route/transaction-status"))
.header("Content-Type", "application/json")
.header("X-API-Key", apiKey)
.header("Hash", authHash)
.method("POST", HttpRequest.BodyPublishers.ofString(payload))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
private static String sha256Hex(String input) throws Exception {
byte[] digest = MessageDigest.getInstance("SHA-256")
.digest(input.getBytes(StandardCharsets.UTF_8));
StringBuilder sb = new StringBuilder();
for (byte b : digest) sb.append(String.format("%02x", b));
return sb.toString();
}
}using System;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
class GrowthBnkExample
{
static async Task Main()
{
var apiKey = "YOUR_API_KEY";
var apiSalt = "YOUR_API_SALT";
var baseUrl = "https://api.growthbnk.com";
var payload = """
{
"merchant_transaction_id": "ORDER-2026-0001"
}
""";
// Auth hash: sha256(key|merchant_transaction_id|salt)
var signing = $"{apiKey}|ORDER-2026-0001|{apiSalt}";
var authHash = Convert.ToHexString(
SHA256.HashData(Encoding.UTF8.GetBytes(signing))).ToLowerInvariant();
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", apiKey);
client.DefaultRequestHeaders.Add("Hash", authHash);
var content = new StringContent(payload, Encoding.UTF8, "application/json");
var response = await client.PostAsync($"{baseUrl}/v1/route/transaction-status", content);
Console.WriteLine(await response.Content.ReadAsStringAsync());
}
}package main
import (
"bytes"
"crypto/sha256"
"encoding/hex"
"fmt"
"io"
"net/http"
)
func main() {
apiKey := "YOUR_API_KEY"
apiSalt := "YOUR_API_SALT"
baseURL := "https://api.growthbnk.com"
payload := []byte(`{
"merchant_transaction_id": "ORDER-2026-0001"
}`)
// Auth hash: sha256(key|merchant_transaction_id|salt)
signing := apiKey + "|ORDER-2026-0001|" + apiSalt
sum := sha256.Sum256([]byte(signing))
authHash := hex.EncodeToString(sum[:])
req, _ := http.NewRequest("POST", baseURL+"/v1/route/transaction-status", bytes.NewReader(payload))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", apiKey)
req.Header.Set("Hash", authHash)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require 'digest'
require 'json'
require 'net/http'
require 'uri'
api_key = 'YOUR_API_KEY'
api_salt = 'YOUR_API_SALT'
base_url = 'https://api.growthbnk.com'
payload = {
'merchant_transaction_id' => 'ORDER-2026-0001'
}
# Auth hash: sha256(key|merchant_transaction_id|salt)
signing = "#{api_key}|ORDER-2026-0001|#{api_salt}"
auth_hash = Digest::SHA256.hexdigest(signing)
uri = URI("#{base_url}/v1/route/transaction-status")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri, {
'Content-Type' => 'application/json',
'X-API-Key' => api_key,
'Hash' => auth_hash
})
request.body = payload.to_json
response = http.request(request)
puts response.body