canonical: https://jentic.com/apis/openpay.mx/openpay-mx

# Openpay Mx Openpay API

Jentic publishes the only available OpenAPI specification for Openpay API, keeping it validated and agent-ready. Openpay is a Mexican payment gateway that lets merchants accept credit-card and alternative payment methods, manage charges, and store customer profiles for repeat billing. The API exposes the core charges and customers resources needed to build a checkout flow targeted at the Mexican market, where local tender support is essential.

## For AI agents

Process credit-card and alternative payment charges in Mexico and manage Openpay customer profiles for repeat billing.

## Scope

Does not handle payouts, refunds, or fraud rules in this spec surface - use for charge creation and customer profile management only.

## Capabilities

- Create a charge against a card or alternative payment method on a merchant account
- Retrieve the status of an existing charge by its ID
- Create a customer profile that stores cards and contact details for repeat billing
- Retrieve a stored customer profile by ID
- Authenticate every request with an API key passed in the Authorization header

## Use cases

### Mexican-market e-commerce checkout

An online store serving Mexico routes card payments through Openpay so customers can pay with locally issued credit cards and alternative methods. The /charges endpoint accepts the order amount and payment source, and the merchant retrieves status before fulfilling the order. Setup typically takes a few days including risk and merchant onboarding.

Example prompt: POST to /charges with amount=499.00, currency=MXN, source_id=card_token, and verify the response status is completed.

### Stored customer profiles for subscription billing

A SaaS business operating in Mexico creates an Openpay customer for each subscriber, attaches a card token, and reuses the profile for monthly charges. The /customers endpoint stores the profile and the /charges endpoint references the customer ID for each subsequent debit.

Example prompt: Create a customer via POST /customers with name and email, then create a charge referencing the customer_id for the monthly subscription amount.

### Order fulfilment based on charge status

A back-office workflow polls the `/charges/{chargeId}` endpoint to confirm a payment landed before triggering shipment. This avoids fulfilling against pending or failed authorisations and makes the source of truth the charge record itself rather than a webhook race condition.

Example prompt: GET `/charges/{chargeId}` for the most recent order and only mark the order paid when status is completed.

### Agent-driven Mexican payment flows through Jentic

An AI agent that handles checkout for a Mexican retailer calls Openpay via Jentic to create charges and manage customers without embedding API keys in the agent's prompts. Jentic handles credential isolation and exposes the four core operations as discoverable tools.

Example prompt: Search Jentic for 'process a credit card payment in Mexico', load the /charges operation, and execute a 250 MXN charge against a stored customer.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/charges` | Create a new charge |
| GET | `/charges/{chargeId}` | Retrieve a charge by ID |
| POST | `/customers` | Create a new customer profile |
| GET | `/customers/{customerId}` | Retrieve a customer profile by ID |

## Key resources

- **Charges** — Create and retrieve card and alternative-method payment charges
- **Customers** — Create and retrieve stored customer profiles for repeat billing

## Why Jentic

- **Setup:** Wiring the Openpay API by hand means sending your key in the Authorization header and shaping charge and customer request bodies with the right amount, currency, and source fields. Through Jentic you install once, import the Openpay API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Openpay puts the customer id in the URL path (`/customers/{customerId}`), so a rule can pin your agent to reads for one customer. You choose the operations it may call, so charge creation is not included unless you add it.
- **Credential handling:** Your Openpay API key is stored once, encrypted, by your own Jentic One instance and injected into the Authorization header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a card charge in Mexico' or 'look up a customer profile', and Jentic returns the matching Openpay operation with its request schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Stripe API** — Global card processing covering Mexico alongside many other markets
- **Adyen Account Service** — Enterprise-grade processor with Mexican acquiring
- **PayPal Orders API** — Wallet-based checkout that complements card processing

## FAQ

### Why is there no official OpenAPI spec for Openpay API?

Openpay does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Openpay API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Openpay API use?

Openpay uses an API key passed in the Authorization header. Through Jentic the key sits in the encrypted vault, and Jentic injects the header at execution time so the secret never appears in agent context.

### Can I store cards for recurring billing with the Openpay API?

Yes. Create a customer profile with POST /customers and attach a tokenised card to it; subsequent /charges calls reference the customer_id so the agent does not have to handle raw card data on every billing cycle.

### What are the rate limits for the Openpay API?

Openpay applies merchant-level rate limits that are not encoded in the OpenAPI spec. Treat sustained traffic above a few requests per second per merchant as the boundary worth checking with Openpay support before launch.

### How do I create a charge through Jentic?

Run pip install jentic, search 'process a credit card payment in Mexico', load the /charges operation, and execute it with the amount, currency, and a card source_id. Jentic supplies the Authorization header and returns the structured charge response.

### Does the Openpay API cover payouts or refunds?

The current spec exposes only charges and customers. Refund and payout flows are not part of this four-endpoint surface; for those, an agent would need additional Openpay endpoints not currently described in this spec.

### Can I limit what my agent is allowed to do with the Openpay API?

Yes. Because you run Jentic One yourself, your own rules decide which Openpay operations and credentials the agent may use, so you can allow only the calls a task needs. For example, you can let the agent read a stored profile with GET `/customers/{customerId}` while withholding POST /charges, so it cannot create a payment unless you explicitly permit it. Since the customer id sits in the URL path, a rule can even pin the agent to reads for a single customer rather than the whole account.
