Payatom
  • PayAtom
    • India
      • Payin
      • Payout
    • Bangladesh
      • Payin
      • Payout
  • API Integration
    • India
      • Payin P2P Seamless UPI Integration
      • Payin P2P Non-Seamless UPI Integration
      • Payin P2P Non-Seamless IMPS Integration
      • Payout P2P Seamless IMPS Integration
      • Payin P2C Seamless UPI Integration
      • Payin P2C Non-Seamless UPI Integration
      • Payout P2C Seamless UPI Integration
    • Bangladesh
      • Payin P2P Seamless Wallet Integration
      • Payin P2P Non-Seamless Wallet Integration
      • Payout P2P Seamless wallet Integration
      • Payin P2C Seamless Wallet Integration
      • Payin P2C Non-Seamless Wallet Integration
      • Payout P2C Seamless wallet Integration
    • Pakistan
      • Pakistan H2H Integration
    • P2P Accounts Wallet Balance
    • Complaint
    • Payin Reconciliation
    • Payout Reconciliation
    • Wallet Transaction Summary
    • Wallet Data Endpoint
Powered by GitBook
On this page
  • Overview
  • Endpoint Details
  • Authentication
  • Request Format
  • Response Format
  • Notes
  1. API Integration

Wallet Data Endpoint

Overview

This API endpoint retrieves cumulative wallet data for an operator, including both active and inactive wallet accounts across multiple wallet types. The endpoint requires authentication via an API key passed in the request headers.

Endpoint Details

  • URL: (adjust based on your server configuration)

  • Method: GET

  • Content-Type: application/json

  • Authentication: API key required in the Api-Key header

Authentication

Header: Api-Key Value: A valid API key associated with an operator in the system. Description: The API key is verified against the operator table in the database. Only operators with delete_status = 0 are considered valid.

If the API key is missing or invalid, the endpoint returns a 401 Unauthorized response.

Request Format

Headers

Header
Required
Description
Example Value

Api-Key

Yes

The API key for authentication

abc123xyz789

Example Request

GET {BaseURL}/bot/api_v2/account_status.php HTTP/1.1
Host: your.api.domain
Api-Key: abc123xyz789

Response Format

The response is returned in JSON format with the following structure:

Success Response

Status Code: 200 OK

{
    "status": "success",
    "data": {
        "active": {
            "count": <integer>,
            "accounts": [
                {
                    "account_detail": "<string>",
                    "upi": "<string|null>",
                    "phone_number": "<string|null>",
                    "status": "<string>",
                    "account_no": "<string|null>",
                    "usage_enable": "<string>",
                    "usage_volum": "<string|null>",
                    "limit_volum": "<string|null>",
                    "rolling_balance": "<string|null>",
                    "available_limit": <integer|null>
                },
                ...
            ]
        },
        "inactive": {
            "count": <integer>,
            "accounts": [
                {
                    "account_detail": "<string>",
                    "upi": "<string|null>",
                    "phone_number": "<string|null>",
                    "status": "<string>",
                    "account_no": "<string|null>",
                    "usage_enable": "<string>",
                    "usage_volum": "<string|null>",
                    "limit_volum": "<string|null>",
                    "rolling_balance": "<string|null>",
                    "available_limit": <integer|null>
                },
                ...
            ]
        }
    }
}

Field Descriptions

Field
Type
Description

status

String

Indicates the status of the request (success or error)

data

Object

Contains the wallet data, grouped by active and inactive accounts

active.count

Integer

Number of active wallet accounts

active.accounts

Array

List of active wallet account details

inactive.count

Integer

Number of inactive wallet accounts

inactive.accounts

Array

List of inactive wallet account details

account_detail

String

Primary identifier for the wallet (e.g., UPI ID, account holder name)

upi

String|Null

UPI ID, if applicable

phone_number

String|Null

Phone number associated with the wallet, if applicable

status

String

Wallet status (e.g., Active, Inactive)

account_no

String|Null

Bank account number, if applicable

usage_enable

String

Indicates if usage tracking is enabled (Enabled or Not Enabled)

usage_volum

String|Null

Usage volume, if usage tracking is enabled

limit_volum

String|Null

Limit volume, if usage tracking is enabled

rolling_balance

String|Null

Rolling balance, if usage tracking is enabled

available_limit

Integer|Null

Available limit, calculated as limit_volum - usage_volum - rolling_balance

Empty Response

If no wallets are found for the operator:

Status Code: 200 OK

{
    "status": "success",
    "data": [],
    "message": "No wallets found for the operator"
}

Error Responses

Status Code
Structure
Description

401 Unauthorized

{"status": "error", "message": "Api-Key header missing"}

API key is not provided in the header

401 Unauthorized

{"status": "error", "message": "Invalid or unauthorized Api-Key"}

API key is invalid or unauthorized

500 Internal Server Error

{"status": "error", "message": "Database connection failed"}

Database connection issue

Example Success Response

{
    "status": "success",
    "data": {
        "active": {
            "count": 2,
            "accounts": [
                {
                    "account_detail": "user@upi",
                    "upi": "user@upi",
                    "phone_number": "1234567890",
                    "status": "Active",
                    "account_no": null,
                    "usage_enable": "Enabled",
                    "usage_volum": "100",
                    "limit_volum": "1000",
                    "rolling_balance": "200",
                    "available_limit": 700
                },
                {
                    "account_detail": "John Doe",
                    "upi": null,
                    "phone_number": null,
                    "status": "Active",
                    "account_no": "123456789",
                    "usage_enable": "Not Enabled",
                    "usage_volum": null,
                    "limit_volum": null,
                    "rolling_balance": null,
                    "available_limit": null
                }
            ]
        },
        "inactive": {
            "count": 1,
            "accounts": [
                {
                    "account_detail": "user2@upi",
                    "upi": "user2@upi",
                    "phone_number": "1122334455",
                    "status": "Inactive",
                    "account_no": null,
                    "usage_enable": "Not Enabled",
                    "usage_volum": null,
                    "limit_volum": null,
                    "rolling_balance": null,
                    "available_limit": null
                }
            ]
        }
    }
}

Notes

  • Wallet Types: The endpoint aggregates data from multiple wallet tables (e.g., wallet_upi, wallet_imps, wallet_bangladesh). The account_detail field varies by wallet type (e.g., UPI ID for wallet_upi, account holder name for wallet_imps).

  • Usage Tracking: Fields like usage_volum, limit_volum, rolling_balance, and available_limit are only included for wallets with usage_enable set to Enabled.

  • Security: Ensure the API key is transmitted over HTTPS to prevent interception.

  • Rate Limiting: Not implemented in the current version. Consider adding rate limiting to prevent abuse.

  • Error Handling: The endpoint assumes a valid database connection and schema. Ensure the database is properly configured.

PreviousWallet Transaction Summary

Last updated 1 month ago