# Kueski Pay MCP MCP

> Kueski Pay manages Buy Now, Pay Later (BNPL) functionality for e-commerce checkout. Connect your merchant account using this MCP to programmatically create BNPL orders, check customer eligibility, simulate installment plans, and manage the full order lifecycle—including captures, refunds, and settlement reconciliation from any AI agent.

## Overview
- **Category:** money-moves
- **Price:** Free
- **Tags:** buy-now-pay-later, bnpl, installment-plans, checkout-automation, order-lifecycle, fintech

## Description

This connector links your merchant account directly to Mexico's leading Buy Now, Pay Later platform. You can manage every stage of a customer’s credit transaction without ever logging into the Kueski dashboard. For example, you can first simulate how an item price breaks down over 4 or 8 bi-weekly payments using `simulate_installments`. Once the checkout is complete, your agent handles order creation and payment tracking via `create_order` and `get_order`. If shipment occurs, a single call to `capture_order` finalizes the funds. The system also supports full control over financial reconciliation—from querying daily settlement batches with `list_settlements` to issuing partial refunds with `refund_order`. This gives your AI client deep operational oversight, allowing you to build sophisticated payment flows directly within Vinkius and your preferred agent.

## Tools

### cancel_order
Releases any credit hold placed on the customer's Kueski account for an authorized order.

### capture_order
Finalizes a payment amount for an authorized order, which must be called when goods are shipped or services delivered.

### check_eligibility
Verifies if a given phone number qualifies for Buy Now, Pay Later financing.

### create_order
Generates the required checkout link where a customer can apply for and place a BNPL order in installments.

### create_webhook
Subscribes your system to real-time notifications about key events like refunds or successful orders.

### get_customer_limits
Retrieves the current available credit limits for a specific customer account.

### get_merchant_profile
Displays and updates your business's profile settings within Kueski Pay.

### get_order
Retrieves the detailed status and information for one specific BNPL order ID.

### get_settlement
Fetches complete details about a single merchant payout settlement event.

### list_orders
Lists multiple recent Kueski Pay orders, allowing you to filter results by status.

### list_settlements
Retrieves a list of all past merchant payout settlement records.

### list_webhooks
Shows you which real-time event subscriptions are currently active and running.

### refund_order
Processes a refund for an already captured order, adjusting the customer's remaining payment schedule accordingly.

### simulate_installments
Calculates and returns sample bi-weekly installment plans, interest rates, and estimated payments for any purchase amount.

## Prompt Examples

**Prompt:** 
```
Simulate payment plans for a $3,500 MXN jacket on Kueski Pay.
```

**Response:** 
```
For a $3,500 MXN purchase, Kueski Pay offers the following plans: 4 quincenas (0% interest) = $875 MXN / fortnight. 6 quincenas = $625 MXN / fortnight. 8 quincenas = $510 MXN / fortnight. (Standard Kueski fees apply to plans over 4 quincenas).
```

**Prompt:** 
```
Capture order K-ABC-123. The items have been shipped.
```

**Response:** 
```
Order K-ABC-123 has been successfully captured. The full amount of $2,100 MXN is now in the settlement queue. The customer's first quincena payment will be due in 15 days.
```

**Prompt:** 
```
Check eligibility for phone 55-1234-5678 for a $5,000 cart.
```

**Response:** 
```
Phone 55-1234-5678 is PRE-APPROVED for a BNPL loan of $5,000 MXN. They have an active Kueski Pay account with good standing. Would you like to generate a checkout session for them?
```

## Capabilities

### Check Credit Eligibility
Determine if a customer's phone number is pre-approved for BNPL credit using `check_eligibility`.

### Simulate Installment Pricing
Calculate and display various payment plans, including estimated bi-weekly amounts and interest rates, before checkout using `simulate_installments`.

### Manage Order Creation
Generate the required checkout URL for a customer to complete their BNPL credit application and order placement via `create_order`.

### Process Payments and Refunds
Finalize payment amounts upon shipment using `capture_order`, or adjust scheduled payments by issuing partial refunds with `refund_order`.

### Reconcile Financial Data
Query detailed records of merchant payouts and settlement fees using `list_settlements` and `get_settlement`.

## Use Cases

### Handling Returns and Refunds
A product was returned, but the payment was already captured. Instead of emailing support with a refund request, the agent simply calls `refund_order` on the original order ID. The system automatically recalculates the customer's bi-weekly schedule, ensuring accurate accounting.

### Onboarding New Clients
A new merchant needs to integrate BNPL but isn't sure of their current payout status. They can use `list_settlements` and then verify their specific account settings with `get_merchant_profile`, getting the necessary data in minutes instead of days.

### Pre-Qualification for High Value Items
A customer is looking at a $10,000 item. The agent runs `check_eligibility` first using the phone number. If pre-approved, they immediately proceed to use `simulate_installments` to show the client exactly how affordable it is.

### Tracking Fulfillment Status
The inventory system signals that 50 units are ready to ship for Order XYZ. The agent calls `capture_order(OrderXYZ)` immediately, securing the funds and moving the order from 'pending' to 'fulfilled' status without human intervention.

## Benefits

- Automate checkout flow: Instead of manually guiding a user to an external payment page, your agent can use `create_order` to generate a direct BNPL checkout link and manage the resulting transaction status immediately.
- Financial visibility: Access deep payout data by listing payouts with `list_settlements`. You don't have to wait for end-of-day reports; you get settlement details on demand via `get_settlement`.
- Proactive customer service: Give support agents the power to check credit limits using `get_customer_limits`, or instantly verify an order status with `get_order`, resolving issues without internal handoffs.
- Pre-sale confidence: Developers can build out dynamic pricing modules that show customers exact payment terms by calling `simulate_installments` directly from product pages, improving conversion rates before checkout.
- Complete lifecycle control: You maintain full command over the order status. If a customer cancels or an item is damaged, you use `cancel_order` or `refund_order` to adjust payments correctly.

## How It Works

The bottom line is that your AI client executes complex financial workflows through sequential function calls, mimicking a full payment gateway integration without manual dashboard interaction.

1. Subscribe to this MCP on Vinkius and supply your Kueski Pay API credentials.
2. Your AI agent calls a function like `check_eligibility` first. This validates the customer's account status and sets up the necessary payment context.
3. The system responds with an order URL or data payload. You then pass this structured information to subsequent tools, such as `create_order` or `capture_order`, to complete the transaction.

## Frequently Asked Questions

**How do I simulate payment plans using simulate_installments?**
You pass the purchase amount to `simulate_installments`. The tool returns a structured list detailing various bi-weekly payment options, including interest rates and estimated payments for different quincena counts.

**What is the difference between get_order and list_orders?**
`get_order` retrieves all details about one specific order ID. `list_orders`, conversely, returns a paginated list of multiple recent orders, allowing you to filter by status like 'pending' or 'approved'.

**When should I use capture_order?**
You must call `capture_order` only after the customer has received the goods. It finalizes the transaction amount that was authorized during checkout and moves funds into the settlement queue.

**Is there a way to track payment events automatically? (create_webhook)**
Yes, you use `create_webhook`. This subscribes your system to real-time notifications. You'll get instant alerts for key status changes like 'order.approved' or 'refund.completed,' so you never miss an update.

**Before initiating checkout, how do I verify if a customer qualifies using the `check_eligibility` tool?**
The `check_eligibility` tool instantly determines if a phone number is pre-approved for BNPL. It runs a soft check against Kueski's system to confirm loan status and potential amounts, saving you time before generating an order URL.

**If I need to review my bank payouts, how do I use `list_settlements`?**
Use `list_settlements` to pull a history of all your merchant payout batches. This lets you reconcile and audit the funds received from Kueski over time, helping track total revenue minus fees.

**What steps do I take if a customer changes their mind using the `cancel_order` tool?**
`cancel_order` releases any temporary credit holds placed on the customer's account. This is the proper mechanism to reverse an authorized order that was never fulfilled, preventing unnecessary charges.

**How can I quickly check a buyer's available balance using `get_customer_limits`?**
`get_customer_limits` provides real-time data on the customer's current credit standing. You use this to advise support staff or verify if they have enough remaining credit for a new purchase.

**How do I simulate the installment plan (quincenas) pricing for a product?**
Use the `simulate_installments` tool and pass the product's price in MXN. It will return all available payment plans (e.g., 4, 6, 8 quincenas), showing the exact amount the customer would pay every two weeks.

**Can I process a partial refund for an order that has already been captured?**
Yes! Use the `refund_order` tool with the order ID and the desired refund amount. Kueski will automatically adjust the customer's remaining installment payments to reflect the new, lower balance.

**What does capture_order do in BNPL?**
When a customer finishes checkout, the order is authorized (funds are held). You must call `capture_order` when you actually ship or fulfill the items. If you don't capture within the expiration window (usually 14 days), the temporary authorization is released.