Get Start

Welcome To teamsbapp.com Docs Last updated: 2026-07-16

teamsbapp.com is a simple and secure payment automation tool designed to use a personal account as a payment gateway so that you can accept payments from your customers through your website.

API Introduction

teamsbapp.com Payment Gateway enables merchants to receive money from their customers easily. Use your secure production API key credentials to initialize payments.

API Operation

Create Payment Endpoint:

POST https://pay.teamsbapp.com/api/payment/create

Verify Payment Endpoint:

POST https://pay.teamsbapp.com/api/payment/verify

Parameter Details

Variables needed to POST to Initialize Process:

Field Description Req. Example
cus_name Customer Full Name Yes John Doe
cus_email Email address Yes john@gmail.com
amount Total payable amount Yes 100
success_url Redirect after Success Yes https://domain.com/success.php

Headers Details

Header Name Value Details
Content-Type application/json
API-KEY Your unique production single API Key

Sample Request Code

cURL
curl -X POST "https://pay.teamsbapp.com/api/payment/create" \
     -H "Content-Type: application/json" \
     -H "API-KEY: YOUR_API_KEY" \
     -d '{
       "cus_name": "John Doe",
       "cus_email": "john@gmail.com",
       "amount": "100",
       "success_url": "https://yourdomain.com/success.php",
       "cancel_url": "https://yourdomain.com/cancel.php"
     }'
HTML Form
<form action="https://pay.teamsbapp.com/api/payment/create" method="POST">

    <input
        type="hidden"
        name="API-KEY"
        value="YOUR_API_KEY"
    >

    <input
        type="text"
        name="cus_name"
        placeholder="Name"
        required
    >

    <input
        type="email"
        name="cus_email"
        placeholder="Email"
        required
    >

    <input
        type="number"
        name="amount"
        placeholder="Amount"
        required
    >

    <button type="submit">
        Pay Now
    </button>

</form>
Python
import requests

url = "https://pay.teamsbapp.com/api/payment/create"

headers = {
    "Content-Type": "application/json",
    "API-KEY": "YOUR_API_KEY"
}

payload = {
    "cus_name": "John Doe",
    "cus_email": "john@gmail.com",
    "amount": "100",
    "success_url": "https://yourdomain.com/success.php",
    "cancel_url": "https://yourdomain.com/cancel.php"
}

response = requests.post(
    url,
    json=payload,
    headers=headers
)

print(response.json())
JavaScript Fetch
fetch("https://pay.teamsbapp.com/api/payment/create", {
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        "API-KEY": "YOUR_API_KEY"
    },
    body: JSON.stringify({
        cus_name: "John Doe",
        cus_email: "john@gmail.com",
        amount: "100",
        success_url: "https://yourdomain.com/success.php",
        cancel_url: "https://yourdomain.com/cancel.php"
    })
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error(error));
PHP cURL
<?php

$url = "https://pay.teamsbapp.com/api/payment/create";

$post_data = json_encode([
    "cus_name"     => "John Doe",
    "cus_email"    => "john@gmail.com",
    "amount"       => "100",
    "success_url"  => "https://yourdomain.com/success.php",
    "cancel_url"   => "https://yourdomain.com/cancel.php"
]);

$ch = curl_init($url);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);

curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json",
    "API-KEY: "YOUR_API_KEY"
]);

$response = curl_exec($ch);

if ($response === false) {
    die(curl_error($ch));
}

curl_close($ch);

echo $response;

?>

Quick cURL Integration

আপনার গেটওয়ে ইন্টিগ্রেশন সহজ করার জন্য নিচে রেডিমেড production cURL script দেওয়া হলো। আপনার configured API URL এবং API Key এখানে automaticভাবে ব্যবহার করা হচ্ছে।

cURL Production Engine
curl -X POST "https://pay.teamsbapp.com/api/payment/create" \
     -H "Content-Type: application/json" \
     -H "API-KEY: YOUR_API_KEY" \
     -d '{
       "cus_name": "Customer Name",
       "cus_email": "customer@mail.com",
       "amount": "100",
       "success_url": "https://yourdomain.com/success.php",
       "cancel_url": "https://yourdomain.com/cancel.php"
     }'

SbPAY Docs — v1.0

Telegram Bot Payments Simplified. A lightweight serverless bridge connecting your Telegram bots to the SbPAY payment gateway.

Note: Webhook API-এর URL structure হবে: https://pay.teamsbapp.com/api.php/api অথবা আপনার configured gateway domain অনুযায়ী একই endpoint ব্যবহার করুন।

How It Works

1 Initiate Request: Your bot sends a JSON payload to POST /api with webhook URL, user details, amount, and your secret key.
2 Gateway Creation: The middleware authenticates and generates a unique payment intent. A payment_url is returned immediately.
3 User Checkout: Send the payment_url to the user as a Telegram inline keyboard button.
4 Verification & Webhook: Once payment succeeds, SbPAY triggers a cryptographically secure POST webhook back to your Bot Webhook Server.

Getting Your API Key

1 Visit teamsbapp.com and create a free account.
2 Go to Plans and activate the 12-month free plan.
3 Set up your wallet inside Wallet Section.
4 Create a new Brand for your bot and register your device/domain.
5 Copy your unique Brand Key. Use this as your API Key.

Endpoint Documentation

Initialize SbPAY Telegram Payment Link:

POST https://pay.teamsbapp.com/api.php/api

User Checkout URL (Auto Redirect Engine):

GET https://pay.teamsbapp.com/api.php/pay/{id}

POST Parameters

Field Type Req. Description
webhook string Yes Absolute HTTPS webhook URL where final result will POST.
name string Yes Customer display name shown on checkout page.
key string Yes Your secret SbPAY Brand Key.
amount string Yes Transaction amount. Example: "500".
user_id string Yes Telegram user ID.
domain string Yes Automatically generated from configured PAYMENT_URL.

Integration Templates

cURL Command
curl -X POST "https://pay.teamsbapp.com/api.php/api" \
     -H "Content-Type: application/json" \
     -d '{
       "webhook": "https://your-bot-server.com/webhook",
       "name": "Customer Name",
       "key": "YOUR_API_KEY",
       "amount": "500",
       "user_id": "123456789",
       "domain": "https://pay.teamsbapp.com"
     }'
Node.js Axios
const axios = require("axios");

const initPayment = async () => {
    try {
        const response = await axios.post("https://pay.teamsbapp.com/api.php/api", {
            webhook: "https://your-bot-server.com/webhook",
            name: "Customer Name",
            key: "YOUR_API_KEY",
            amount: "500",
            user_id: "123456789",
            domain: "https://pay.teamsbapp.com"
        }, {
            headers: {
                "Content-Type": "application/json"
            }
        });

        console.log(response.data);
    } catch (error) {
        console.error(error);
    }
};

initPayment();
Python Requests
import requests
import json

url = "https://pay.teamsbapp.com/api.php/api"

payload = {
    "webhook": "https://your-bot-server.com/webhook",
    "name": "Customer Name",
    "key": "YOUR_API_KEY",
    "amount": "500",
    "user_id": "123456789",
    "domain": "https://pay.teamsbapp.com"
}

headers = {
    "Content-Type": "application/json"
}

response = requests.post(
    url,
    data=json.dumps(payload),
    headers=headers
)

print(response.json())

Bots.business (BJS)-এ integration flow: Webhook URLটি Bots.business runtime থেকে automaticভাবে generate হবে।

Command: /deposit
// Entry point — asks user for deposit amount

Api.sendMessage({
  text: "<b>Deposit Balance</b>\n\nPlease enter the amount you want to deposit.\n\n<b>Example:</b> 100",
  parse_mode: "HTML",
  reply_markup: {
    inline_keyboard: [[
      {
        text: "How to Add Money",
        url: "https://t.me/aura_amar_hala"
      }
    ]]
  },
  reply_to_message_id: request.message_id,
  on_result: "/message_id"
});

User.setProp(
    "msg_id",
    request.message_id,
    "string"
);

Bot.runCommand("/dp");
Command: /dp
let msg = message;

try {

    let msg1 = User.getProp("msg_id");
    let msg2 = User.getProp("message_id");

    Api.deleteMessage({
        message_id: msg2
    });

    Api.deleteMessage({
        message_id: msg1
    });

} catch (e) {}


if (!isNaN(msg) && msg > 9 && msg < 1000) {

    Api.sendMessage({
        text:
            "<b>Processing your request...</b>\n\n" +
            "Generating your secure payment link.",
        parse_mode: "HTML",
        on_result: "/message_id",
        reply_to_message_id: request.message_id
    });


    User.setProp(
        "amount",
        msg,
        "string"
    );


    /*
     * IMPORTANT:
     * Webhook URL is generated by
     * Bots.business at runtime.
     */

    var webhook = Libs.Webhooks.getUrlFor({
        command: "/pay",
        user_id: user.id
    });


    HTTP.post({

        url: "https://pay.teamsbapp.com/api.php/api",

        body: JSON.stringify({

            webhook: webhook,

            name: user.first_name,

            key: "YOUR_API_KEY",

            amount: msg,

            user_id:
                user.telegramid.toString(),

            domain:
                "https://pay.teamsbapp.com"

        }),

        headers: {
            "Content-Type":
                "application/json"
        },

        success: "/url"

    });


} else {

    Api.sendMessage({

        text:
            "<b>Invalid Amount</b>\n\n" +
            "Please send a valid number between " +
            "<b>10</b> and <b>1000</b>.",

        parse_mode: "HTML",

        reply_to_message_id:
            request.message_id

    });

    Bot.runCommand("/dp");
}
Command: /url
try {

    let data = JSON.parse(content);

    let msg_id =
        User.getProp("message_id");


    if (data.payment_url) {

        Api.editMessageText({

            text:
                "<b>Payment Link Ready</b>\n\n" +
                "Your secure payment link has been generated.\n" +
                "Tap the button below to complete your deposit.\n\n" +
                "⏱ Complete payment promptly " +
                "to avoid cancellation.",

            parse_mode: "HTML",

            message_id: msg_id,

            reply_markup: {

                inline_keyboard: [[

                    {
                        text: "Pay Now",

                        web_app: {
                            url:
                                data.payment_url
                        }
                    }

                ]]

            }

        });

    } else {

        Api.editMessageText({

            text:
                "<b>Payment Link Not Found</b>\n\n" +
                "API responded but payment link " +
                "is missing.\n" +
                "Please try again or contact support.",

            parse_mode: "HTML",

            message_id: msg_id

        });

    }

} catch (e) {

    let msg_id =
        User.getProp("message_id");

    Api.editMessageText({

        text:
            "<b>Unexpected API Response</b>\n\n" +
            "Please try again after a moment.",

        parse_mode: "HTML",

        message_id: msg_id

    });

}
Command: /message_id
if (!request) {
    return;
}

let id =
    options.result.message_id;

User.setProp(
    "message_id",
    id,
    "string"
);
Command: /pay
let body =
    JSON.parse(content);

let stat =
    body.ok;

let amount =
    User.getProp("amount");


if (stat === true) {

    Bot.sendMessage({

        text:
            "<b>Payment Successful!</b>\n\n" +
            "Your payment has been completed.\n" +
            "<b>Amount Added:</b> " +
            amount +
            "\n\nYour balance has been updated. Thank you!",

        parse_mode: "HTML"

    });

} else {

    Bot.sendMessage({

        text:
            "<b>Payment Cancelled</b>\n\n" +
            "The payment was cancelled.\n" +
            "No balance has been added.\n\n" +
            "If this was a mistake, please try again.",

        parse_mode: "HTML"

    });

}
JavaScript Fetch
fetch("https://pay.teamsbapp.com/api.php/api", {
    method: "POST",
    headers: {
        "Content-Type": "application/json"
    },
    body: JSON.stringify({
        webhook: "https://your-bot-server.com/webhook",
        name: "Customer Name",
        key: "YOUR_API_KEY",
        amount: "500",
        user_id: "123456789",
        domain: "https://pay.teamsbapp.com"
    })
})
.then(res => res.json())
.then(data => console.log(data))
.catch(error => console.error(error));
PHP file_get_contents
<?php

$url = "https://pay.teamsbapp.com/api.php/api";

$payload = json_encode([
    "webhook" => "https://your-bot-server.com/webhook",
    "name"    => "Customer Name",
    "key"     => "YOUR_API_KEY",
    "amount"  => "500",
    "user_id" => "123456789",
    "domain"  => "https://pay.teamsbapp.com"
]);

$options = [
    "http" => [
        "header"  => "Content-Type: application/json\r\n",
        "method"  => "POST",
        "content" => $payload
    ]
];

$context = stream_context_create($options);

$response = file_get_contents(
    $url,
    false,
    $context
);

echo $response;

?>

Webhook Callback Payload

SbPAY Gateway থেকে আপনার দেওয়া Webhook URL-এ নিচের Payload-টি POST করা হবে:

Success Webhook
{
    "ok": true
}
Failed / Cancelled Webhook
{
    "ok": false
}

Developer Technical Support

আপনার কোনো custom integration বা API সংক্রান্ত সমস্যা হলে সরাসরি Telegram-এ যোগাযোগ করুন।

Contact @sakib01994

Modules & Downloads

Pre-built official extensions for single-click integrations.

WordPress Module

Integrate our payment gateway into WooCommerce configurations easily.

WHMCS Module

Seamless automation setup for hosting and billing management portals.

SMM Panel Module V2

Custom payment automation solution built directly for high-scalability SMM panels.

Sketchware SWB

Integrate native payment flows inside your Sketchware app source files.

Companion Mobile App — Version 1

Get instant transaction push alerts, notification logging and tracking triggers on Android (v1.0 stable).

Watch setup tutorial video

Companion Mobile App — Version 2

Advanced push alert engine with optimized background service support, improved speed and modern UI (v2.0 latest).

Watch v2.0 setup tutorial