canonical: https://jentic.com/apis/lyra.com/lyra

# Lyra Payment REST API

The Lyra Payment REST API processes card payments and manages their lifecycle. It creates payments, then captures, refunds, cancels, validates, or duplicates the resulting transactions. It also creates and manages payment tokens for recurring charges, handles subscriptions, and reads orders. Every operation is a POST call with a JSON body. An agent can charge a card, refund it, or set up a subscription without building its own payment stack.

## For AI agents

Create card payments, capture, refund, cancel, and validate transactions, and manage tokens and subscriptions.

## Scope

Processes payments and manages transactions, tokens, and subscriptions through Lyra's payment API; it does not configure your merchant account, gateways, or risk rules, which are set up in the Lyra back office.

## Capabilities

- Create a card payment
- Capture, refund, cancel, or validate a transaction
- Duplicate a transaction or read its detail
- Create and manage tokens for recurring payments
- Create, read, update, and cancel subscriptions
- Read order details

## Use cases

### Charge a card

Taking a payment is the core of checkout. The Lyra API creates a payment for an amount and returns the resulting transaction, so an application can complete a purchase. The transaction can then be captured, refunded, or cancelled as the order progresses.

Example prompt: Create a payment for the requested amount and return the transaction.

### Refund or capture a transaction

Orders change after the initial charge. The Lyra API captures a previously authorized transaction, refunds it in full or part, cancels it, or validates it, letting an application manage the money movement for an order. Each action returns the updated transaction state.

Example prompt: Refund the specified transaction and return its updated state.

### Set up recurring billing

Subscriptions and repeat charges need a stored payment method. The Lyra API creates a token from a transaction or card and uses it to create and manage subscriptions, so an application can bill a customer on a schedule. Tokens can be updated, cancelled, or reactivated as the customer relationship changes.

Example prompt: Create a payment token and use it to set up a subscription.

### Agent-driven payments

An AI agent can take or refund a payment for a user without a developer wiring each call. Through Jentic the agent matches an intent such as 'refund this order' to the Lyra refund operation, runs it, and returns the result. The credential stays in the user's Jentic One instance and never reaches the agent's prompt.

Example prompt: Refund the transaction for the order and confirm its new state.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/Charge/CreatePayment` | Create a card payment. |
| POST | `/Transaction/Get` | Retrieve a transaction. |
| POST | `/Transaction/Capture` | Capture a transaction. |
| POST | `/Transaction/Refund` | Refund a transaction. |
| POST | `/Token/Get` | Retrieve a payment token. |
| POST | `/Charge/CreateSubscription` | Create a subscription. |

## Key resources

- **Charge** — Create payments, tokens, and subscriptions.
- **Transaction** — Capture, refund, cancel, validate, and read transactions.
- **Token** — Manage stored payment tokens for recurring charges.
- **Subscription** — Create, read, update, and cancel subscriptions.

## Why Jentic

- **Setup:** Wiring Lyra yourself means managing Basic credentials, building resource/action POST calls, and tracking transaction states. With Jentic you install once, import Lyra from the API Directory, and store the credential a single time.
- **Permission scoping:** Jentic lets you grant your agent only the operations it needs, such as creating payments and refunds without token or subscription deletion, and enforces that on every call.
- **Credential handling:** Your Lyra credential is stored once, encrypted, by your own Jentic One instance. It is injected when a call runs and never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents find Lyra through Jentic's intent search, matching a request like 'refund this payment' to the right operation without hardcoded endpoints.

## Related APIs

- **Mollie** — European payment processing across methods.
- **Braintree** — Card and wallet payment processing.
- **Spreedly** — Payment orchestration across gateways.

## FAQ

### What can an AI agent do with the Lyra Payment API through Jentic?

An agent can create card payments, capture, refund, cancel, and validate transactions, and manage tokens and subscriptions. Through Jentic the agent matches an intent to the right operation and runs it with your credential injected at execution time.

### How do I authenticate with the Lyra Payment API?

Lyra authenticates requests with HTTP Basic authentication, using your shop ID as the username and a REST API key as the password. You store the credential once in your Jentic One instance, and it is added to each call at run time rather than exposed to the agent.

### Does Lyra support recurring payments and subscriptions?

Yes. The API creates payment tokens from a transaction or card and uses them to create and manage subscriptions, so you can bill customers on a schedule. Tokens can be updated, cancelled, or reactivated as needed.

### Does the Lyra Payment API document rate limits?

The OpenAPI specification does not state rate limits; request allowances depend on your Lyra agreement. Check the current limits for your account in Lyra's documentation.

### Can I control which Lyra operations my agent can call?

Yes. Jentic lets you allow only the operations your agent needs, for example creating payments and refunds while withholding token deletion. Your Jentic One instance enforces that boundary on every call and keeps the credential outside the agent's context.
