Skip to main content
Glama
Pletopay MCP Server

Pletopay MCP Server

Official
by pletopay

Create a hosted checkout session

create_checkout_session

Creates a hosted checkout session and returns a URL or token so customers can complete bank-transfer payments, with optional expiry, reference, and success or cancel URLs.

Instructions

Create a hosted checkout session.

Create a checkout session, then either redirect your customer to its url (hosted checkout) or hand its token to your front end and open it in the Pletopay popup with the browser SDK and your publishable key. Pletopay’s page shows the bank-transfer details (the payment is created when the customer opens it), waits for the transfer and sends the customer to success_url (hosted) or calls your onSuccess callback (popup). The session expires after expires_in seconds (default 1 hour, at most 3 hours: one-time bank accounts are limited to 3 hours) and completes when its payment succeeds (checkout.session.completed). reference is optional; when given it must be unique per mode (409 duplicate_reference), and the session can then be retrieved with GET /api/v1/checkout/sessions/reference/{reference}. Neither the redirect nor the callback is proof of payment: confirm with the webhook or by retrieving the session.

Input Schema

NameRequiredDescriptionDefault
splitNoSplit rule applied to the payment (spl_…)
amountYesAmount in kobo
currencyYes
customerNoExisting customer (cus_…)
metadataNo
referenceNoYour reference for this session, unique per mode (409 duplicate_reference if reused)
cancel_urlNoWhere the customer goes if they cancel
expires_inNoSeconds until the session expires (default 3600, at most 10800: one-time accounts last up to 3 hours)
descriptionNoShown to the customer
success_urlNoWhere the customer is sent after paying
customer_emailNo
idempotency_keyNoOptional. A unique key for this request; retrying with the same key returns the original result instead of acting twice. One is generated if omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare it is a non-read-only, non-destructive, non-idempotent, closed-world call. The description adds substantial behavior: the payment is created only when the customer opens the page, the session expires after `expires_in` (default 1h, max 3h, 3h cap for one-time bank accounts), completes on `checkout.session.completed`, and returns 409 duplicate_reference on reused references. It notably warns that redirect/callback is not proof of payment and must be confirmed via webhook or session retrieval — a genuinely useful caveat not implied by the annotations. It does not mention the idempotency_key retry semantics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action, then the two integration paths, then lifecycle, then the confirmation caveat — a sensible ordering. It is dense and slightly redundant (the first line restates the title, and the opening is then repeated as 'Create a checkout session'), and a few sentences pack multiple clauses that could be split for scanability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the return-value burden and does so by naming the `url` and `token` response fields and explaining what each is for. Combined with expiry rules, the completion event, the duplicate_reference error, and the payment-confirmation caveat, an agent has everything needed to create a session and tell the user how to finish the flow.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 75%, so most parameters are already documented. The description adds non-obvious semantics beyond the schema: why `expires_in` is capped (one-time bank accounts last up to 3 hours), the per-mode uniqueness constraint on `reference` and how to retrieve the session by it, and the fact that `amount` is the amount that will actually be charged at session open time. It says nothing about `split`, `metadata`, or `customer`, leaving those to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (create a checkout session) and immediately distinguishes it from adjacent resources by describing the two consumption modes (redirect to `url` vs `token` in the Pletopay popup). This separates it from siblings like create_payment and create_payment_link without requiring the schema to be opened.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete integration guidance: use `url` for hosted redirect, or hand `token` to the front end with the browser SDK and publishable key. Also states when to supply `reference` (uniqueness per mode, retrievable via a specific endpoint). It does not explicitly say when to prefer this over create_payment_link or create_payment, so it stops short of full alternative routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools