SDK & Developer Integration Hub

DIRECT ACTIVATED (LIVE)
Notifications

No new notifications

SDK Integration Portal v3.5 READY

Multi-Platform SDKs & API Kits

Integrate AdityaLoot Payment Gateway into Website, PHP, Python, Node.js, Android, Flutter, & WooCommerce in minutes.

Your API Credentials & Integration Keys
Manage Keys in Settings →
Language Code Snippets & Integration Manual

Embed 1 line of JS script on your checkout page to open instant popup UPI payment modal:

<!-- Include AdityaLoot JS SDK -->
<script src="https://wp.dghost.in/sdk/adityaloot.js"></script>

<!-- Checkout Trigger Button -->
<button onclick="payNow()" class="btn btn-primary">Pay ₹100 via UPI</button>

<script>
function payNow() {
    AdityaLootCheckout.open({
        apiKey: "pk_live_c4ca4238a0b92382",
        amount: 100.00,
        customerName: "John Doe",
        orderId: "ORDER_" + Date.now(),
        onSuccess: function(res) {
            alert("Payment Verified! UTR: " + res.utr);
        },
        onDismiss: function() {
            console.log("Checkout closed");
        }
    });
}
</script>

Use official PHP SDK class `AdityaLoot.php` to create orders and handle server-side callbacks:

<?php
require_once 'AdityaLoot.php';

$pg = new AdityaLootGateway([
    'api_key'    => 'pk_live_c4ca4238a0b92382',
    'api_secret' => 'sk_live_b36c525848fee03529b338fa',
    'domain'     => 'https://wp.dghost.in'
]);

$response = $pg->createOrder([
    'amount'        => 500.00,
    'order_id'      => 'ORD_' . time(),
    'customer_name' => 'Rahul Sharma',
    'callback_url'  => 'https://yoursite.com/callback.php'
]);

if ($response['success']) {
    header('Location: ' . $response['payment_url']);
    exit;
} else {
    echo "Error: " . $response['error'];
}
?>

Python Django / Flask REST API Integration:

import requests

headers = {
    'X-API-Key': 'pk_live_c4ca4238a0b92382',
    'X-API-Secret': 'sk_live_b36c525848fee03529b338fa',
    'Content-Type': 'application/json'
}

payload = {
    'amount': 250.00,
    'order_id': 'PY_ORD_1029',
    'customer_name': 'Amit Patel',
    'callback_url': 'https://yourdomain.com/webhooks/adityaloot'
}

res = requests.post('https://wp.dghost.in/api/create-order.php', json=payload, headers=headers)
print(res.json())

Android Native OkHttp Request:

OkHttpClient client = new OkHttpClient();

JSONObject json = new JSONObject();
json.put("amount", 199.00);
json.put("order_id", "AND_ORD_889");
json.put("customer_name", "Vikas Verma");

RequestBody body = RequestBody.create(json.toString(), MediaType.get("application/json"));
Request request = new Request.Builder()
    .url("https://wp.dghost.in/api/create-order.php")
    .addHeader("X-API-Key", "pk_live_c4ca4238a0b92382")
    .addHeader("X-API-Secret", "sk_live_b36c525848fee03529b338fa")
    .post(body)
    .build();

Response response = client.newCall(request).execute();
System.out.println(response.body().string());

Flutter Dart HTTP Request & Webview Launch:

import 'package:http/http.dart' as http;
import 'convert.dart';

Future<void> createPayment() async {
  final res = await http.post(
    Uri.parse('https://wp.dghost.in/api/create-order.php'),
    headers: {
      'X-API-Key': 'pk_live_c4ca4238a0b92382',
      'X-API-Secret': 'sk_live_b36c525848fee03529b338fa',
      'Content-Type': 'application/json',
    },
    body: jsonEncode({
      'amount': 300.0,
      'order_id': 'FLUTTER_ORD_101',
      'customer_name': 'Sneha Kapoor',
    }),
  );
  print(res.body);
}

WooCommerce WordPress Plugin Setup:

  1. Download the official PHP SDK file AdityaLoot.php from top banner.
  2. Copy API Public Key and API Secret into WooCommerce Payment Gateway Settings.
  3. Set Callback Webhook URL to: https://wp.dghost.in/api/verify-utr.php