hotmart_subscription_due_day_update
Updates the payment due day for a subscription. Use the subscriber code and set a new due day between 1 and 31.
Instructions
Change Due Day. Example: hotmart_subscription_due_day_update(subscriber_code='ABC123XY').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| subscriber_code | Yes | Subscriber code. Format: alphanumeric Hotmart code (ex: `H123A4B5`, not UUID, not int) | |
| due_day | Yes | Novo dia de vencimento (1-31) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- The async function that implements the tool logic: takes subscriber_code and due_day, sends a PATCH to /payments/api/v1/subscriptions/{subscriber_code} with the due_day in the JSON body, and returns the JSON result.
async def hotmart_subscription_due_day_update( subscriber_code: str, due_day: int, ) -> str: """Change Due Day. Example: hotmart_subscription_due_day_update(subscriber_code='ABC123XY'). Args: subscriber_code: Subscriber code. Format: alphanumeric Hotmart code (ex: `H123A4B5`, not UUID, not int) due_day: Novo dia de vencimento (1-31)""" endpoint = f"/payments/api/v1/subscriptions/{subscriber_code}" body = {} body["due_day"] = due_day result = await get_client().patch(endpoint, json=body) return json.dumps(result, indent=2) - Docstring defines the input schema: subscriber_code (str, alphanumeric Hotmart code) and due_day (int, 1-31). No formal Pydantic model; the parameters serve as the schema.
"""Change Due Day. Example: hotmart_subscription_due_day_update(subscriber_code='ABC123XY'). Args: subscriber_code: Subscriber code. Format: alphanumeric Hotmart code (ex: `H123A4B5`, not UUID, not int) due_day: Novo dia de vencimento (1-31)""" - src/hotmart_mcp/tools/subscriptions.py:8-8 (registration)The function is listed in __all__ in subscriptions.py, which is re-exported via tools/__init__.py, making it available as a registered MCP tool.
__all__ = ["hotmart_subscriptions_list", "hotmart_subscriptions_summary_list", "hotmart_subscription_transactions_list", "hotmart_subscriber_purchases_list", "hotmart_subscription_cancel", "hotmart_batch_subscriptions_cancel", "hotmart_subscription_reactivate", "hotmart_batch_subscriptions_reactivate", "hotmart_subscription_due_day_update"] - src/hotmart_mcp/_shared.py:10-14 (helper)The get_client() helper function that provides the HotmartClient singleton used to make the PATCH request.
def get_client() -> HotmartClient: global _client if _client is None: _client = HotmartClient() return _client