G2Bulk Public API Documentation

Last Updated: 19 October 2025 05:00 AM UTC

Welcome to the G2Bulk Public API documentation. This guide provides details about the API, authentication methods, request/response formats, and error handling.

Base URL

https://api.g2bulk.com/v1/

Table of Contents

Authentication

Public Access

Header: X-API-Key

Description: Some endpoints require an API key for access. Obtain an API key from the G2Bulk Telegram Bot.

Public Endpoints

Get Me

Endpoint: GET /v1/getMe

Authentication: X-API-Key

Response: JSON object containing user details.

{
    "balance": 8.74,
    "first_name": "John Doe",
    "success": true,
    "user_id": 123456789,
    "username": "username"

}
        

Get All Categories

Endpoint: GET /v1/category

Authentication: None

Response: JSON list of categories.

{ 
"success": true,
"categories": [
    {
        "id": 1,
        "title": "PUBG Mobile UC Vouchers",
        "description": "",
        "product_count": 11
    },
    {
        "id": 2,
        "title": "Razer Gold Accounts",
        "description": "",
        "product_count": 0
    },
    {
        "id": 3,
        "title": "Itunes USA",
        "description": "",
        "product_count": 0
    },
}
    

Get All Products

Endpoint: GET /v1/products

Authentication: None

Response: JSON list of products.

{   "success": true, 
    "products": [
        {
            "id": 1,
            "title": "60 UC Voucher",
            "description": "",
            "category_id": 1,
            "category_title": "PUBG Mobile UC Vouchers",
            "unit_price": 0.84,
            "stock": 1006
        },
        {
            "id": 2,
            "title": "325 UC Voucher",
            "description": "",
            "category_id": 1,
            "category_title": "PUBG Mobile UC Vouchers",
            "unit_price": 4.2,
            "stock": 0
        },
        {
            "id": 3,
            "title": "660 UC Voucher",
            "description": "",
            "category_id": 1,
            "category_title": "PUBG Mobile UC Vouchers",
            "unit_price": 8.4,
            "stock": 0
        },
}

Get All Products From Specific Category

Endpoint: GET /v1/category/:id

Authentication: None

Response: JSON list of products.

{   "success": true, 
    "products": [
        {
            "id": 1,
            "title": "60 UC Voucher",
            "description": "",
            "category_id": 1,
            "category_title": "PUBG Mobile UC Vouchers",
            "unit_price": 0.84,
            "stock": 1006
        },
        {
            "id": 2,
            "title": "325 UC Voucher",
            "description": "",
            "category_id": 1,
            "category_title": "PUBG Mobile UC Vouchers",
            "unit_price": 4.2,
            "stock": 0
        },
}

Get Product by ID

Endpoint: GET /v1/products/:id

Authentication: None

Response: JSON representation of the product.

{
"product": {
    "id": 1,
    "title": "60 UC Voucher",
    "description": "",
    "category_id": 1,
    "category_title": "PUBG Mobile UC Vouchers",
    "unit_price": 0.84,
    "stock": 1006
},
"success": true
}
    

Purchase Product

Endpoint: POST /v1/products/:id/purchase

Authentication: X-API-Key

Request Body:

{
    "quantity": <number>
}

Response: Purchase confirmation.

Response Body:

{
    "success":        true,
    "order_id":       123,
    "transaction_id": 123,
    "product_id":     1,
    "product_title":  "Product Title",
    "delivery_items": ["arrayOfSecretKeys","..."],

}

Get All Orders

Endpoint: GET /v1/orders

Authentication: X-API-KEY

Response: JSON list of orders.

{
"success": true,
"orders": [
    {
        "id": 1,
        "user_id": 123456789,
        "product_id": 1,
        "product_title": "60 UC Voucher",
        "quantity": 1,
        "total_price": 0.84,
        "status": "COMPLETED",
        "description": "Purchase from G2Bulk Bot"
    },
    {
        "id": 2,
        "user_id": 123456789,
        "product_id": 1,
        "product_title": "60 UC Voucher",
        "quantity": 10,
        "total_price": 8.4,
        "status": "COMPLETED",
        "description": "Purchase from G2Bulk Bot"
    },
    {
        "id": 3,
        "user_id": 123456789,
        "product_id": 1,
        "product_title": "60 UC Voucher",
        "quantity": 3,
        "total_price": 2.52,
        "status": "COMPLETED",
        "description": "Purchase from G2Bulk Bot"
    }
],
}

Get Order by ID

Endpoint: GET /v1/orders/:id

Authentication: X-API-KEY

Response: JSON representation of the order.

{
    "order": {
        "id": 1,
        "user_id": 123456789,
        "product_id": 1,
        "product_title": "60 UC Voucher",
        "quantity": 1,
        "total_price": 0.84,
        "status": "COMPLETED",
        "description": "Purchase from G2Bulk Bot"
    },
    "success": true
}
    

Get PUBG Mobile Recharge Offers

Endpoint: GET /v1/topup/pubgMobile/offers

Authentication: None

Description: Get all available PUBG Mobile top-up offers with live pricing. Offers are sorted by UC amount (low to high), then alphabetically.

Response: JSON list of the offers.

{
    "success": true,
    "offers": [
        {
            "id": "60",
            "title": "60 UC",
            "unit_price": "1.126",
            "stock": 9999
        },
        {
            "id": "120",
            "title": "120 UC",
            "unit_price": "2.251",
            "stock": 9999
        },
        {
            "id": "180",
            "title": "180 UC",
            "unit_price": "3.377",
            "stock": 9999
        },
        {
            "id": "Prime (1 Month)",
            "title": "Prime (1 Month)",
            "unit_price": "1.095",
            "stock": 9999
        },
        {
            "id": "Weekly Deal Pack 1",
            "title": "Weekly Deal Pack 1",
            "unit_price": "1.126",
            "stock": 9999
        }
    ]
}
    

Check PUBG Mobile Player ID

Endpoint: POST /v1/topup/pubgMobile/checkPlayerId

Authentication: None

Description: Validate a PUBG Mobile player ID before making a purchase.

Request Body:

{
    "player_id": "5679523421"
}

Response (Valid Player):

{
    "success": true,
    "data": {
        "valid": true,
        "name": "PRIME惻AKASH",
        "open_id": "41581795132966184"
    }
}

Response (Invalid Player):

{
    "success": true,
    "data": {
        "valid": false
    }
}

Purchase PUBG Mobile Recharge Offer

Endpoint: POST /v1/topup/pubgMobile/purchase

Authentication: X-API-KEY

Description: Purchase a PUBG Mobile top-up. Player ID is automatically validated before processing.

Request Body:

{
    "product_id": "60",
    "player_id": "5679523421"
}

Note: The product_id is the offer ID from the offers list (can include spaces and special characters).

Response: Confirmation of the purchase.

{
    "success": true,
    "message": "We are processing your order. Thank you.",
    "topup_id": 58
}
    

Check PUBG Mobile Topup Status

Endpoint: GET /v1/topup/pubgMobile/status

Authentication: X-API-KEY

Description: Check the current status of your PUBG Mobile top-up order.

Request Body:

{
    "topup_id": 58
}

Response: Current status of your topup request.

{
    "success": true,
    "data": {
        "topup_id": 58,
        "player_id": "5679523421",
        "status": "COMPLETED",
        "cost": 1.126,
        "uc_value": "60",
        "is_refunded": false,
        "refund_amount": 0.000,
        "external_id": "ED123456789"
    }
}

Status Values:

Rate Limiting

Error Handling

Status Code Meaning
400 Bad Request - Invalid request format
401 Unauthorized - Authentication failed
404 Not Found - Requested resource does not exist
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error - An unexpected error occurred

Support

For questions, issues, or API key requests, contact our support team.