Skip to main content

MetrePay Integration Pack

MCP Server, Postman, OpenAPI & Cube2 Configuration

About this Pack

This section is for teams integrating with MetrePay who want to:

  • Map their data models to MetrePay's Payment Links API
  • Use Cube2 as an MCP server to generate and maintain integrations
  • Interact with Cube2 via Slack or IDE during projects

All resources on this page are designed for sandbox / POC use and can be adapted for production environments.

Files & Downloads​

API Specification & Collections​

MetrePay OpenAPI Spec (YAML)

OpenAPI 3.0 specification with all discovered endpoints, schemas, and validation rules for Payment Links and Subscriptions.

MetrePay Postman Collection

Postman collection with sample requests for payment links, subscriptions, and billing modifications.

MCP / Cube2 Configuration​

Cube2 MetrePay MCP Config
cube2-metrepay.mcp.json

MCP server configuration to connect Cube2 (MetrePay) to Claude Desktop, Cursor, or other LLM tools.

Semantic Model​

Bank Semantic Schema
BankSemantic.yaml

Domain semantic model defining Payment and Subscription entities for Paraguay market (PYG currency).


What Cube2 Does​

Cube2 is your mapping assistant for MetrePay integrations:

  • Knows MetrePay's Payment Domain — Payment Links, Single Payments, STATIC and DYNAMIC Subscriptions
  • Maps Your Data to MetrePay — Interactive attribute mapping from your system to MetrePay's API
  • Generates Integration Code — Produces typed request/response models and mapping functions
  • Guides Configuration — Shows which attributes like recurrentPayment, recurrentPaymentType, or dayOfMonth are needed for specific use cases

Business Scenarios Supported​

ScenarioDescription
Single PaymentOne-time payment via shareable payment link
STATIC SubscriptionFixed-amount recurring payments (memberships, installments)
DYNAMIC SubscriptionVariable-amount invoices (utilities, variable bills)
Subscription ManagementModify amounts, change billing dates, cancel installments
Payment StatusTrack payment lifecycle (Pending → Paid → Completed)

Cube2 Configuration Steps​

To set up Cube2 for MetrePay, complete these steps:

Step 1: Copy bestAndUse.json from Cube0​

cp cube_0_metrepay/requests_logs/endpoint_guide/bestAndUse.json cube_2_metrepay/bestAndUse.json

Contains: API flows, endpoint documentation, error codes, and best practices.

Step 2: Copy BankSemantic.yaml from Cube1​

cp cube_1_metrepay/bankSemantic/BankSemantic_Generated.yaml cube_2_metrepay/bankSemantic/BankSemantic.yaml

Contains: Semantic entity definitions (Payment, Subscription)

Step 3: Copy Use Cases from Cube1​

cp cube_1_metrepay/use_cases/*UseCases.xml cube_2_metrepay/use_cases/

Contains: XML mappings between MetrePay API attributes and semantic entities.

Step 4: Update assistant.py Welcome Message​

Edit message_text in hi_cube2() function with MetrePay-specific business scenarios.

Step 5: Copy Spec and Postman to specAndPostman​

cp cube_0_metrepay/openapi/OpenAPI_RequiredFields_Generated.yaml ../specAndPostman/
cp cube_0_metrepay/postman_collections/PostmanCollection_Generated.json ../specAndPostman/

Contains: Final deliverables for API consumers.


How Everything Fits Together​

ResourcePurpose
OpenAPI + PostmanUnderstand the MetrePay API and test calls
BankSemantic.yamlDefine canonical entities and field names
Use Cases XMLMap API attributes to semantic attributes
Cube2 MCP ServerConnect LLM tools with MetrePay context preloaded
Slack botCollaborate with Cube2 from your project channels

Next Steps​