mcp-niubiz
v0.1.0MCP server for Niubiz — Peru card acquirer: security token, session, authorize, reverse
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_security_token
Fetch the Niubiz API bearer token (POST /api.security/v1/security, Basic auth). Other tools fetch and cache this automatically — call it explicitly only to verify credentials or force a refresh.
| Parameter | Type | Description |
|---|---|---|
force | boolean | Force a fresh token even if one is cached |
create_session_token
Create a checkout session (POST /api.ecommerce/v2/ecommerce/token/session/{merchantId}). Returns the sessionKey the Niubiz checkout form needs. Send the purchase amount and the customer's IP for antifraud scoring.
| Parameter | Type | Description |
|---|---|---|
amount * | number | Purchase amount (e.g. 100.00) |
clientIp * | string | Customer IP address (antifraud) |
channel | string | Sales channel: web (default) | mobile |
merchantDefineData | object | Optional MDD antifraud fields (MDD4 email, MDD21 frequent-flyer, etc.) |
authorize_transaction
Authorize a purchase (POST /api.authorization/v3/authorization/ecommerce/{merchantId}). Pass the transactionToken the Niubiz checkout form returned after the customer entered the card, plus your purchaseNumber and the amount.
| Parameter | Type | Description |
|---|---|---|
amount * | number | Amount to authorize (must match the session) |
purchaseNumber * | string | Your unique purchase number (numeric string, max 12 digits) |
transactionToken * | string | tokenId returned by the Niubiz checkout form |
captureType | string | manual | automatic (default automatic) |
channel | string | Sales channel: web (default) | mobile |
countable | boolean | true = sale (capture), false = preauth only |
currency | string | PEN (default) or USD |
reverse_transaction
Reverse (void) an authorization (POST /api.authorization/v3/reverse/ecommerce/{merchantId}). Same-day undo of an authorized transaction by transactionId or purchaseNumber.
| Parameter | Type | Description |
|---|---|---|
purchaseNumber | string | Your purchase number (alternative reference) |
transactionId | string | Niubiz transaction id to reverse |