Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PERLY_PAY_APINoPerly Pay API base URL. Default `https://pay.perly.io`. Plain `http` only for `localhost`.https://pay.perly.io
PERLY_PAY_SECRET_KEYYesYour Perly Pay API secret key. Use `sk_test_…` while you build. `sk_live_…` works too, with the limits below.
PERLY_PAY_WEBHOOK_SECRETNoOptional `whsec_…`, the default for `verify_webhook_signature`.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_invoicesC

List invoices.

Newest first; pass next_cursor back as cursor for the next page.

create_invoiceA

Create an invoice.

Lines are prices ({ price, quantity }) or your own ({ description, amount, quantity }), in one currency. For a single amount, amount + description is short for one line. customer is an id or { email }. A price line may carry its own description ("Seat #12"), and discount takes an amount off this invoice alone. The buyer pays at url, choosing bitcoin or a stablecoin there. Live mode: a new invoice is refused with 403 bill_overdue while a Perly Pay bill is unpaid past its 14 days, until it is paid in the dashboard's Billing; invoices already made are still paid.

Test keys only: refused with a live key.

retrieve_invoiceC

Retrieve an invoice.

cancel_invoiceA

Cancel an invoice.

Only while nothing has arrived. Money that arrives later is still seen (the address stays watched) and lands in review.

Test keys only: refused with a live key.

Cannot be undone — Cancels the invoice: its buyer can no longer pay it. Ask the person first, then call with confirm: true.

simulate_paymentA

Simulate a payment (test mode only).

Test keys only. full pays the amount due: the invoice turns paid and is fulfilled — entitlements, license keys, a receipt, and the events your webhooks get. short sends half (underpaid), over a tenth more (overpaid); those two need the buyer's chain and asset chosen first. For full, an invoice with no chain yet gets one: chain and asset if given, else the first stablecoin offered (refund terms count as accepted).

Pass the invoice's id, or a payment_link id: then a test invoice is made for the link's price (as a buyer opening the link would) and paid.

Test keys only: refused with a live key.

create_checkout_sessionA

Create a checkout session.

A cart of 1–20 prices in one currency. Send the buyer to url, or open it in an overlay with pay.js (data-session="cs_…"). The buyer comes back to return_url after paying, cancel_url if they leave. Live mode: a new session is refused with 403 bill_overdue while a Perly Pay bill is unpaid past its 14 days.

Test keys only: refused with a live key.

retrieve_checkout_sessionC

Retrieve a checkout session.

list_productsB

List products.

Newest first; pass next_cursor back as cursor for the next page.

create_productB

Create a product.

Test keys only: refused with a live key.

update_productA

Update a product.

Set active: false to stop selling it; products are never deleted (invoices point at them).

Test keys only: refused with a live key.

list_pricesC

List prices.

Newest first; pass next_cursor back as cursor for the next page.

create_priceA

Create a price.

Every model: one_time, pay_what_you_want (with a minimum), fixed_term (N days of access), subscription (interval, trial, grace, prepay), lifetime (optional cap and cohort tiers), credit_pack. Amounts are immutable; make a new price to change one.

Body is one of: model = one_time: needs product, model, unit_amount; model = pay_what_you_want: needs product, model, custom_amount; model = fixed_term: needs product, model, unit_amount, term_days; model = subscription: needs product, model, unit_amount, recurring; model = lifetime: needs product, model; model = credit_pack: needs product, model, unit_amount, credits.

Test keys only: refused with a live key.

update_priceA

Update a price.

Nickname, active, refund terms (refunds replaces them whole; what you leave out takes its default) and metadata. Amounts and the model never change.

Test keys only: refused with a live key.

list_customersC

List customers.

Newest first; pass next_cursor back as cursor for the next page.

create_customerC

Create a customer.

Test keys only: refused with a live key.

retrieve_customerC

Retrieve a customer.

list_subscriptionsB

List subscriptions.

Newest first; pass next_cursor back as cursor for the next page.

create_subscriptionB

Create a subscription.

Renewed by invoice: the customer pays each period themselves. Without a trial the first invoice opens now (latest_invoice); the subscription turns active when it is paid.

Test keys only: refused with a live key.

retrieve_subscriptionC

Retrieve a subscription.

list_payment_linksA

List payment links.

Newest first; pass next_cursor back as cursor for the next page.

create_payment_linkB

Create a payment link.

A page at /l/ that sells one price. Share it anywhere, or open it with pay.js.

Test keys only: refused with a live key.

update_payment_linkC

Update a payment link.

Test keys only: refused with a live key.

check_entitlementB

Check access.

One call: may this customer use this product now? Name the customer by customer, customer_email or customer_external_id, and the product by product (or price).

list_entitlementsC

List entitlements.

Newest first; pass next_cursor back as cursor for the next page.

consume_entitlement_creditsA

Spend credits.

Spends credits from one credit pack, atomically. Refused when fewer are left. action labels the spend for your reports; with an Idempotency-Key a retry never spends twice. To spend from a customer's packs together, use POST /credits/consume.

Test keys only: refused with a live key.

list_credit_usageA

List credit spends.

Newest first; pass next_cursor back as cursor for the next page.

list_paymentsA

List payments.

Transfers seen on chain into addresses we handed out, newest first.

Newest first; pass next_cursor back as cursor for the next page.

retrieve_paymentC

Retrieve a payment.

list_refundsB

List refunds.

Newest first; pass next_cursor back as cursor for the next page.

create_refundA

Open a refund.

Starts a refund in the asset that was paid. We email the buyer a link to give an address; the link is never returned, since whoever holds it decides where the money goes. With no email on the invoice, the owner makes one in the dashboard. When the address is checked, the refund is ready_to_send with amount_to_send. Refused with sanctioned_sender when money on the invoice came from an address on a sanctions list, or one the coin's issuer froze: sending it back may itself be prohibited, so nothing refunds it — leave it and talk to a lawyer.

Test keys only: refused with a live key.

Cannot be undone — Opens a refund to the buyer. Ask the person first, then call with confirm: true.

list_receiptsB

List receipts.

One for every fulfilled payment and every confirmed refund, newest first.

Newest first; pass next_cursor back as cursor for the next page.

retrieve_receiptC

Retrieve a receipt.

list_eventsA

List events.

What happened in the last 30 days, newest first. type filters (invoice.paid, or invoice.*).

Newest first; pass next_cursor back as cursor for the next page.

list_webhook_endpointsA

List webhook endpoints.

Newest first; pass next_cursor back as cursor for the next page.

create_webhook_endpointA

Create a webhook endpoint.

The response carries secret — the only time you see it. Keep it to verify Perly-Signature.

Test keys only: refused with a live key.

delete_webhook_endpointA

Delete a webhook endpoint.

Test keys only: refused with a live key.

Cannot be undone — Deletes the webhook endpoint: its events stop. Ask the person first, then call with confirm: true.

verify_webhook_signatureA

Checks a Perly Pay webhook on this machine: the HMAC-SHA256 in its Perly-Signature header against the raw body and the endpoint's signing secret, and that it is under five minutes old. Nothing is sent anywhere. Use it to debug a webhook handler that rejects real events.

Pass the body exactly as received (the raw text, before JSON parsing). secret defaults to PERLY_PAY_WEBHOOK_SECRET.

pay_linksA

The Perly Pay dashboard pages for steps no API key can take: pay a Perly Pay bill, connect a wallet (public key only), go live, set up two-factor sign-in, manage API keys and live webhooks, send live refunds, and the go-live checklist.

Give the person the link and say what to do there; do not try these through other tools.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.1/5.0

Scored across 38 tools

Disambiguation4/5

Most tools map to a distinct resource and action, and the descriptions clarify differences. However, create_invoice, create_checkout_session, create_payment_link, and create_subscription all represent ways to charge a buyer, so an agent may still need to reason carefully about which flow to use.

Naming Consistency5/5

Names consistently use snake_case with a verb-first pattern such as list_invoices, create_product, retrieve_receipt, and delete_webhook_endpoint. The one meta tool, pay_links, is slightly unusual semantically but still fits the snake_case convention.

Tool Count2/5

With 38 tools, the surface is well past the 25-tool threshold and feels heavy for an agent to navigate, even for a broad payments platform. Many resources have separate list/create/retrieve/update tools that could potentially be consolidated.

Completeness3/5

Core resources generally have create/list/retrieve coverage, and refunds, receipts, events, and webhooks are represented. But there are notable gaps: subscriptions lack update/cancel operations, customers lack update, and several resources such as products, prices, payment links, and refunds lack a retrieve operation.