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

# Clearpay API

The Clearpay API creates buy-now-pay-later checkouts and authorizes, captures, refunds, and voids the resulting payments. It retrieves individual payments and lists them, updates order shipping details, and reads the merchant configuration. Agents can drive the full Clearpay payment lifecycle for an order without building against the dashboard.

## For AI agents

Create Clearpay checkouts and authorize, capture, refund, and void payments, retrieve or list payments, and update order shipping. Returns checkout and payment records for an agent to act on.

## Scope

Does not handle card payments, settlement reporting, or dispute management. Use for Clearpay checkouts and payment authorization, capture, refund, and void only.

## Capabilities

- Create a checkout for a Clearpay order
- Authorize and capture payments
- Refund or void a payment
- Retrieve a single payment or list payments
- Update the shipping details on an order
- Read the merchant configuration

## Use cases

### Agent-Managed Checkout and Payment

An AI agent takes an approved order through Clearpay by creating a checkout, then authorizing and capturing the payment once the customer confirms. It reads the checkout by token and follows the payment through to capture. This lets an agent run the pay-later flow end to end as part of an order workflow.

Example prompt: Create a checkout for an approved order, then authorize and capture the payment once the customer confirms

### Refunds and Payment Adjustments

Teams handle post-sale changes by refunding or voiding a payment and updating an order's shipping details. The API exposes refund, void, and shipping-update operations addressed by the order identifier. This lets an agent process a return or correct an order without manual dashboard work.

Example prompt: Refund a payment for a returned order and update the order's shipping details where they changed

### Payment Status Reconciliation

An agent reconciles orders by retrieving a payment by order identifier or listing payments and comparing their status with an internal system. The API returns individual payments and a payment list for this purpose. This suits a scheduled reconciliation that flags mismatches between Clearpay and the order system.

Example prompt: List recent payments, retrieve each by order identifier, and flag any whose status differs from the internal record

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/v2/configuration` | Read the merchant configuration |
| POST | `/v2/checkouts` | Create a checkout |
| GET | `/v2/checkouts/{token}` | Retrieve a checkout by token |
| POST | `/v2/payments/auth` | Authorize a payment |
| POST | `/v2/payments/capture` | Capture a payment |
| POST | `/v2/payments/{orderId}/refund` | Refund a payment |
| GET | `/v2/payments/{orderId}` | Retrieve a payment by order |
| GET | `/v2/payments` | List payments |

## Key resources

- **Checkouts** — Create a checkout and retrieve it by token
- **Payments** — Authorize, capture, refund, void, retrieve, and list payments
- **Orders** — Update the shipping details on an order
- **Configuration** — Read the merchant configuration

## Why Jentic

- **Setup:** Wiring the Clearpay API by hand means handling HTTP Basic auth with a Merchant ID and Secret Key and sequencing checkout, authorization, and capture yourself. Through Jentic you install once, import Clearpay from the API Directory, store the keys once, and your agent creates checkouts and captures payments.
- **Permission scoping:** Clearpay puts the order identifier in the URL path, so a rule can bound your agent to a single order. You can also scope by operation, allowing reads and captures while withholding refunds and voids, and every call the agent makes is logged.
- **Credential handling:** Your Clearpay Merchant ID and Secret Key are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a checkout' or 'refund a payment', and Jentic returns the matching Clearpay operation with its input schema so the agent calls the right endpoint without reading the reference docs.

## Related APIs

- **Afterpay** — Buy-now-pay-later checkout and payments API for the Afterpay brand
- **Stripe** — Full payments API for cards, wallets, and many payment methods
- **PayPal Orders API** — Order and payment capture API for PayPal checkout

## FAQ

### What authentication does the Clearpay API use?

The Clearpay API uses HTTP Basic authentication per its OpenAPI spec, with your Merchant ID as the username and your Secret Key as the password. Through Jentic those values are held encrypted by your own Jentic One instance and attached at call time, so they never reach the agent's context.

### Can I refund a payment with the Clearpay API?

Yes. The API exposes refund and void operations addressed by the order identifier, alongside capture and authorization. An agent can process a return by refunding the payment on the order.

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

The OpenAPI spec does not specify rate limits. Check the Clearpay and Afterpay developer documentation at https://developers.afterpay.com for current limits and usage guidance.

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

Yes. Because the order identifier sits in the URL path, a rule can bound your agent to a single order, and you can scope by operation to allow reads and captures while withholding refunds and voids. Every call the agent makes is logged.

### How do I run a Clearpay checkout through Jentic?

Search Jentic for 'create a checkout' or 'capture a payment', add the Clearpay API from the directory, and store your Merchant ID and Secret Key once. Your agent then creates the checkout and captures the payment. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Is there a Clearpay MCP server?

You don't need an MCP server to give your agent the Clearpay API. Jentic connects it directly from the API Directory: import it, store your keys once, and your agent creates checkouts and captures payments. Operations are discovered on demand, so no extra server's tool definitions sit in the agent's context.
