Skip to main content
Glama

get_subscription_transactions

Retrieve subscription transactions with filters for product, subscriber, status, and date range. Data is delayed by up to 24 hours and defaults to the past 30 days.

Instructions

Subscription Transactions

Retorna as transações de assinatura. Dados com atraso de 24h. Por padrão retorna os últimos 30 dias.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_resultsNoNúmero máximo de resultados por página
page_tokenNoToken de paginação para a próxima página
product_idNoID do produto
transactionNoCódigo da transação
subscriber_nameNoNome do assinante
subscriber_emailNoE-mail do assinante
billing_typeNoTipo de cobrança. Values: SUBSCRIPTION, SMART_INSTALLMENT, SMART_RECOVERY
subscription_statusNoStatus da assinatura. Values: STARTED, INACTIVE, ACTIVE, DELAYED, CANCELLED, CANCELLED_BY_ADMIN, CANCELLED_BY_CUSTOMER, CANCELLED_BY_SELLER, OVERDUE
recurrency_statusNoStatus da recorrência. Values: PAID, NOT_PAID, CLAIMED, REFUNDED, CHARGEBACK
purchase_statusNoStatus da compra
transaction_dateNoData da transação inicial (timestamp em milissegundos)
end_transaction_dateNoData da transação final (timestamp em milissegundos)
offer_codeNoCódigo da oferta
purchase_payment_typeNoTipo de pagamento da compra. Values: BILLET, CASH_PAYMENT, CREDIT_CARD, DIRECT_BANK_TRANSFER, DIRECT_DEBIT, FINANCED_BILLET, FINANCED_INSTALLMENT, GOOGLE_PAY, HOTCARD, HYBRID, MANUAL_TRANSFER, PAYPAL, PAYPAL_INTERNACIONAL, PICPAY, PIX, SAMSUNG_PAY, WALLET
subscriber_codeNoCódigo do assinante
selectNoSeleção de campos customizados na resposta

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for 'get_subscription_transactions'. It makes a GET request to /payments/api/v1/subscriptions/transactions with optional filter parameters and returns JSON.
    async def get_subscription_transactions(
        max_results: Optional[int] = None,
        page_token: Optional[str] = None,
        product_id: Optional[int] = None,
        transaction: Optional[str] = None,
        subscriber_name: Optional[str] = None,
        subscriber_email: Optional[str] = None,
        billing_type: Optional[str] = None,
        subscription_status: Optional[str] = None,
        recurrency_status: Optional[str] = None,
        purchase_status: Optional[str] = None,
        transaction_date: Optional[int] = None,
        end_transaction_date: Optional[int] = None,
        offer_code: Optional[str] = None,
        purchase_payment_type: Optional[str] = None,
        subscriber_code: Optional[str] = None,
        select: Optional[str] = None,
    ) -> str:
        """Subscription Transactions
        
        Retorna as transações de assinatura. Dados com atraso de 24h. Por padrão retorna os últimos 30 dias.
        
        Args:
            max_results: Número máximo de resultados por página
            page_token: Token de paginação para a próxima página
            product_id: ID do produto
            transaction: Código da transação
            subscriber_name: Nome do assinante
            subscriber_email: E-mail do assinante
            billing_type: Tipo de cobrança. Values: SUBSCRIPTION, SMART_INSTALLMENT, SMART_RECOVERY
            subscription_status: Status da assinatura. Values: STARTED, INACTIVE, ACTIVE, DELAYED, CANCELLED, CANCELLED_BY_ADMIN, CANCELLED_BY_CUSTOMER, CANCELLED_BY_SELLER, OVERDUE
            recurrency_status: Status da recorrência. Values: PAID, NOT_PAID, CLAIMED, REFUNDED, CHARGEBACK
            purchase_status: Status da compra
            transaction_date: Data da transação inicial (timestamp em milissegundos)
            end_transaction_date: Data da transação final (timestamp em milissegundos)
            offer_code: Código da oferta
            purchase_payment_type: Tipo de pagamento da compra. Values: BILLET, CASH_PAYMENT, CREDIT_CARD, DIRECT_BANK_TRANSFER, DIRECT_DEBIT, FINANCED_BILLET, FINANCED_INSTALLMENT, GOOGLE_PAY, HOTCARD, HYBRID, MANUAL_TRANSFER, PAYPAL, PAYPAL_INTERNACIONAL, PICPAY, PIX, SAMSUNG_PAY, WALLET
            subscriber_code: Código do assinante
            select: Seleção de campos customizados na resposta"""
        endpoint = "/payments/api/v1/subscriptions/transactions"
        params = {}
        if max_results is not None:
            params["max_results"] = max_results
        if page_token is not None:
            params["page_token"] = page_token
        if product_id is not None:
            params["product_id"] = product_id
        if transaction is not None:
            params["transaction"] = transaction
        if subscriber_name is not None:
            params["subscriber_name"] = subscriber_name
        if subscriber_email is not None:
            params["subscriber_email"] = subscriber_email
        if billing_type is not None:
            params["billing_type"] = billing_type
        if subscription_status is not None:
            params["subscription_status"] = subscription_status
        if recurrency_status is not None:
            params["recurrency_status"] = recurrency_status
        if purchase_status is not None:
            params["purchase_status"] = purchase_status
        if transaction_date is not None:
            params["transaction_date"] = transaction_date
        if end_transaction_date is not None:
            params["end_transaction_date"] = end_transaction_date
        if offer_code is not None:
            params["offer_code"] = offer_code
        if purchase_payment_type is not None:
            params["purchase_payment_type"] = purchase_payment_type
        if subscriber_code is not None:
            params["subscriber_code"] = subscriber_code
        if select is not None:
            params["select"] = select
        result = await get_client().get(endpoint, params=params)
        return json.dumps(result, indent=2)
  • Auto-registration mechanism: any async function in hotmart_mcp.tools.* modules (including get_subscription_transactions) is discovered and registered as an MCP tool.
    def _discover_and_register_tools() -> int:
        """Import all modules under hotmart_mcp.tools and register async functions."""
        registered = 0
    
        for module_info in pkgutil.iter_modules(tools_pkg.__path__, prefix=f"{tools_pkg.__name__}."):
            if module_info.name.endswith("__init__"):
                continue
    
            module = importlib.import_module(module_info.name)
    
            for name, obj in inspect.getmembers(module, iscoroutinefunction):
                if name.startswith("_"):
                    continue
                mcp.tool()(obj)
                registered += 1
    
        return registered
  • Singleton helper that provides the HTTP client instance used by get_subscription_transactions to make API calls.
    def get_client() -> HotmartClient:
        global _client
        if _client is None:
            _client = HotmartClient()
        return _client
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description provides useful behavioral context: 24h data delay and default 30-day window. However, it does not disclose pagination behavior, rate limits, or whether the operation is read-only.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and front-loaded with the main purpose. It efficiently conveys key constraints but could be more structured (e.g., bullet points for delays and defaults).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 16 parameters and an output schema, the description is minimal. It does not explain pagination, output structure, or how parameters filter results. The complexity warrants more detail.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and each parameter already has a description. The tool description adds no extra meaning to parameters, so baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns subscription transactions, specifies a 24-hour data delay, and a default 30-day window. However, it does not differentiate from sibling tools like get_subscribers or get_subscriptions_summary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives. No mention of prerequisites or when not to use it. The description only implies use for fetching transactions with recent data.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thaleslaray/hotmart-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server