The Mercado Pago payment endpoints provide the same hotspot-provisioning experience as the Conekta flow, but using Mercado Pago as the payment processor. The frontend tokenizes card data using the Mercado Pago JS SDK and submits the resulting token along with card metadata to this endpoint. The server creates the MikroTik hotspot user first, then charges the card — rolling back the user if the charge fails. On success, optional Telegram notifications can be sent to the operator’s configured chat.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sistemashm24/pagos_hotspot_api/llms.txt
Use this file to discover all available pages before exploring further.
Endpoints
| Method | Path | Description |
|---|---|---|
POST | /api/v1/payments/pagar-mercado-pago | Process a Mercado Pago card payment and provision hotspot access |
GET | /api/v1/payments/estado-pago/{payment_id} | Check the current status of a Mercado Pago payment by its ID |
POST /api/v1/payments/pagar-mercado-pago
Headers
Router API Key in the format
jwt_<token>. Identifies the company (which must have a configured Mercado Pago access token) and the target MikroTik router.Body
The request body accepts both canonical field names and their Spanish aliases. Both forms are valid.ID of the product to purchase. Obtain from
GET /api/v1/catalogo_perfiles_venta. Also accepted as product_id.Card token generated by the Mercado Pago JS SDK (
mp.createCardToken). Single-use; expires shortly after creation.Mercado Pago payment method identifier returned by the SDK when the card is detected. Examples:
"visa", "master", "amex".Transaction amount in the product’s currency. Also accepted as
transaction_amount.Customer’s email address. Passed to Mercado Pago as the payer email. Must be a valid email format. Also accepted as
customer_email.Full name of the customer. Stored in the transaction record and included in Telegram notifications. Also accepted as
customer_name.Card issuer (bank) ID returned by the Mercado Pago SDK. Optional but recommended for improved approval rates.
Number of installments for the payment. Pass
1 for a single full charge. Also accepted as installments.Customer phone number. Optional. Also accepted as
customer_phone.Mercado Pago device fingerprint ID, obtained from
mp.getIdentificationTypes() or the MP_DEVICE_SESSION_ID cookie. Helps reduce fraud rejections.Additional payer information object to pass directly to the Mercado Pago API. If not provided, the server constructs a minimal payer with
{"email": customer_email}. Useful for supplying identification type/number when required by the country’s regulations.Type of hotspot credentials to generate. Also accepted as
user_type."usuario_contrasena"— (default) Username + password pair."pin"— Single 6-digit numeric PIN (empty password).
MAC address of the client device. Required for auto-connection. Also accepted as
mac_address.Current IP of the client device. Used during auto-connection. Also accepted as
ip_address.When
true, attempts to auto-authenticate the device on MikroTik after a successful payment. Requires mac_cliente. Also accepted as auto_connect.Response
On success the endpoint returnsHTTP 200.
Always
true on success.Mercado Pago payment ID (numeric, stored as string). Use this for
GET /api/v1/payments/estado-pago/{payment_id}.Mercado Pago payment status.
"approved" for successful instant payments. May be "pending" in some cases (see advertencia field).The user type used to generate credentials:
"usuario_contrasena" or "pin".WiFi credentials to display to the customer.
Purchased product summary.
Customer information from the request.
Mercado Pago-specific payment details.
ISO 8601 UTC datetime of transaction completion.
Auto-connection result. Same structure as the Conekta endpoint.
Only present when
estado_pago is "pending". Contains a human-readable warning message explaining that the payment is awaiting confirmation.Examples
cURL
Success Response 200 OK
GET /api/v1/payments/estado-pago/
Check the current status of a Mercado Pago payment. Useful for polling pending payments or verifying a completed transaction.Headers
Router API Key. The company associated with the key must have Mercado Pago configured.
Path Parameters
The numeric Mercado Pago payment ID returned in
mercado_pago.payment_id from the payment response.Response
Error Codes
| Status | Trigger |
|---|---|
400 Bad Request | Mercado Pago not configured for this company, or transaction_amount does not match the product price (±0.01 tolerance). |
402 Payment Required | Payment was rejected by Mercado Pago (e.g., insufficient funds, declined by issuer). MikroTik user is rolled back. |
404 Not Found | producto_id does not exist or does not belong to the authenticated company. |
500 Internal Server Error | Failed to create MikroTik user, unexpected error from Mercado Pago, or internal server fault. |
When the company has Telegram notifications enabled (
notificaciones_telegram = true), this endpoint sends a background notification to the configured telegram_chat_id on both successful payments and rejected ones (HTTP 402). These notifications are sent asynchronously and do not affect the API response time.