MetrePay Integration Pack
MCP Server, Postman, OpenAPI & Cube2 Configuration
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​
OpenAPI 3.0 specification with all discovered endpoints, schemas, and validation rules for Payment Links and Subscriptions.
Postman collection with sample requests for payment links, subscriptions, and billing modifications.
MCP / Cube2 Configuration​
MCP server configuration to connect Cube2 (MetrePay) to Claude Desktop, Cursor, or other LLM tools.
Semantic Model​
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, ordayOfMonthare needed for specific use cases
Business Scenarios Supported​
| Scenario | Description |
|---|---|
| Single Payment | One-time payment via shareable payment link |
| STATIC Subscription | Fixed-amount recurring payments (memberships, installments) |
| DYNAMIC Subscription | Variable-amount invoices (utilities, variable bills) |
| Subscription Management | Modify amounts, change billing dates, cancel installments |
| Payment Status | Track 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​
| Resource | Purpose |
|---|---|
| OpenAPI + Postman | Understand the MetrePay API and test calls |
| BankSemantic.yaml | Define canonical entities and field names |
| Use Cases XML | Map API attributes to semantic attributes |
| Cube2 MCP Server | Connect LLM tools with MetrePay context preloaded |
| Slack bot | Collaborate with Cube2 from your project channels |