[Cotlet](https://cotlet.dev/index.md) · [Integrations](https://cotlet.dev/integrations.md) · [How it works](https://cotlet.dev/how-it-works.md) · [Use cases](https://cotlet.dev/use-cases.md) · [Security](https://cotlet.dev/security.md) · [For developers](https://cotlet.dev/for-developers.md) · [For automation agencies](https://cotlet.dev/for-agencies.md) · [Blog](https://cotlet.dev/blog.md) · [API docs](https://cotlet.dev/docs.md) · [Help center](https://cotlet.dev/help.md) · [Changelog](https://cotlet.dev/changelog.md) · [Contact](https://cotlet.dev/contact.md) · [Pricing](https://cotlet.dev/pricing.md) · [Sign up](https://cotlet.dev/signup)

# Refund a Recurly invoice line item

> Refund one line item, a set amount or a percentage of a Recurly invoice from Claude Code, n8n or a script, with your OK first. Hosted.

Source: https://cotlet.dev/integrations/recurly-api-mcp-server/refund-invoice-line-item

A customer was charged for a setup fee twice, and support has the invoice number in a ticket. Someone with refund rights opens the invoice and works through the refund form line by line.

Cotlet does it in your own Recurly account with get\_invoice and refund\_invoice, called by your AI agent, an n8n workflow or a script.

[Sign up free](https://cotlet.dev/app/signup?app=recurly) [All Recurly tools](https://cotlet.dev/integrations/recurly-api-mcp-server.md)

Hosted · nothing to install or maintain

## Can Recurly do this on its own?

Recurly's API refunds an invoice by line item, with the adjustment uuid, quantity and a prorate flag (checked 14 Oct 2026). The Admin Console also refunds a specific amount or a percentage. Nothing in either reads the ticket, picks the right line item or writes the result back, and the API needs the site's private key.

## How you do it in Recurly today

1. In the Admin Console, open the invoice from the account or the invoice dashboard.
2. Open the Invoice Actions dropdown and select Issue Refund.
3. On the Issue Refund page, choose to refund by line item or for the entire invoice.
4. Choose a refund method: Quantity, Specific amount or Percentage.
5. Submit, then find the refund credit invoice that Recurly creates and note its number in the ticket.

## How to refund a Recurly invoice line item

Prompt

```
Refund 1 unit of the setup fee on invoice 1042 back to the account, then show me the refund invoice.
```

1. 01  
### Read the invoice first  
The agent opens the invoice with get\_invoice and checks that it is collected, that the line item named in the ticket exists and that it has not already been refunded. A line that was already refunded stops the job.
2. 02  
### Choose the smallest refund  
If the ticket says one unit, the agent refunds quantity 1\. If it names an amount or a percentage, it uses that method instead, and tells you when your site does not support it.
3. 03  
### Ask before money moves  
refund\_invoice shows the invoice, the line item and the amount, and waits for your OK. Nothing is refunded before you confirm, until you switch confirmation off for this tool.
4. 04  
### Return the refund invoice  
After the call the agent reads back the refund credit invoice, its total and its state, so you can paste them into the ticket.

### What you get back

Example data

```
Invoice 1042: setup fee, $9.00 x 2, collected
Refund requested: quantity 1, to account credit
Confirmed by you at 10:12
Refund invoice created: total -$9.00, state collected
Remaining on invoice 1042: $9.00
```

### Other ways to ask

- Refund 50% of the plan charge on invoice 1077 and tell me the new total.
- Refund $15.00 from the total of invoice 1090 to the original payment method.
- Check invoice 1042 and tell me what has already been refunded, but do not refund anything.
- Refund the last invoice of account acme-co for the whole amount, after you show it to me.

## What Recurly allows, and what to know first

- Recurly refunds by line item or for the entire invoice, with methods Quantity, Specific amount and Percentage.
- Merchants without the Only Bill What Changed and Credit Memos features can only refund by quantity on line items or by specific amount on the entire invoice.
- A refund generates a refund credit invoice with credit line items against the previously paid charge line items.
- In the API, refund\_apply\_order credit or transaction sets which refund method is used first, and the default is credit back to the account.
- An invoice with a processed line item refund cannot accept refunds of an open amount.

refund\_invoice asks for your OK by default. To run it on a schedule without you, switch confirmation off for that tool in your dashboard.

Sources: [Recurly Docs: Invoice management](https://docs.recurly.com/recurly-subscriptions/docs/invoice-management) · [Recurly API reference: Line Item Refunds](https://docs.recurly.com/recurly-subscriptions/reference/lineitemrefunds) · [Recurly Docs: Refund](https://docs.recurly.com/recurly-subscriptions/docs/refund-transaction)

## Call refund\_invoice from a script

curl

```
curl -X POST https://cotlet.dev/api/v1/recurly/invoices/1042/refund \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"quantity","line_item_id":"3dc1a8f09b4c4e55a1e0","quantity":1,"refund_apply_order":"credit"}'
```

Example response

```
{
"refund_invoice_number": "1105",
"original_invoice_number": "1042",
"state": "collected",
"subtotal_in_cents": -900,
"total_in_cents": -900,
"currency": "USD",
"refund_apply_order": "credit"
}
```

MCP: add https://cotlet.dev/mcp/v1 with the same key; the call is recurly\_write → refund\_invoice. Example data.

[Schedule it in n8n, Make, Zapier or cron](https://cotlet.dev/integrations/recurly-api-mcp-server.md#automations)

## Recurly tools this automation uses

__Cotlet Recurly tools used to refund a Recurly invoice line item__
| Tool | Parameters |
| --------------- | --------------------------------------------------------------------------------------------------------------- |
| get\_invoice | invoice\_number |
| refund\_invoice | invoice\_number, method, line\_item\_id, quantity, amount\_in\_cents, percentage, prorate, refund\_apply\_order |

[All 11 Recurly tools with descriptions](https://cotlet.dev/integrations/recurly-api-mcp-server.md#tools)

## Frequently asked questions

### Can the agent refund more than the customer paid?

No. The refund amount comes from the line items you select and the invoice they sit on, and Recurly rejects a refund that does not fit the invoice.

### Is it safe to connect Recurly to Cotlet?

Yes. You sign in to Recurly yourself, in your own Cloud Browser in the EU, and we never save your password. Your agents only get Recurly once you enable it, every background request is listed, and the browser profile is stored encrypted with AES-256-GCM, the cipher 1Password uses for its vaults. The AI model never sees a login, posts and messages wait for your OK, and Disable for agents cuts access in one click. Independent scanners grade cotlet.dev A+ on Qualys SSL Labs, securityheaders.com and Mozilla Observatory; live results are on https://cotlet.dev/security.

## More Recurly automations

- [List past-due Recurly accounts](https://cotlet.dev/integrations/recurly-api-mcp-server/list-past-due-accounts.md)
- [Cancel Recurly subscriptions at the end of the term](https://cotlet.dev/integrations/recurly-api-mcp-server/cancel-subscription-at-term-end.md)
- [Recurly API and MCP server: every tool](https://cotlet.dev/integrations/recurly-api-mcp-server.md)
- [All use cases](https://cotlet.dev/use-cases.md)

## Give your agent access to Recurly.

Free 7-day trial with 2,000 credits, no card needed. Cotlet is independent and not affiliated with Recurly.

[Sign up free](https://cotlet.dev/app/signup?app=recurly)

---

Give your AI agents your signed-in browser.

**Product:** [Integrations](https://cotlet.dev/integrations.md) · [Use cases](https://cotlet.dev/use-cases.md) · [How it works](https://cotlet.dev/how-it-works.md) · [Pricing](https://cotlet.dev/pricing.md) · [Security](https://cotlet.dev/security.md)

**Resources:** [Blog](https://cotlet.dev/blog.md) · [API docs](https://cotlet.dev/docs.md) · [Help center](https://cotlet.dev/help.md) · [Changelog](https://cotlet.dev/changelog.md) · [GitHub](https://github.com/cotletdev/cotlet)

**Solutions:** [For developers](https://cotlet.dev/for-developers.md) · [For automation agencies](https://cotlet.dev/for-agencies.md)

**Company:** [About](https://cotlet.dev/about.md) · [AI info: company facts](https://cotlet.dev/ai-info.md) · [Contact](https://cotlet.dev/contact.md)

**Legal:** [Terms of service](https://cotlet.dev/terms) · [Privacy policy](https://cotlet.dev/privacy) · [Refund policy](https://cotlet.dev/refunds) · [Acceptable use](https://cotlet.dev/acceptable-use) · [Cookie policy](https://cotlet.dev/cookies) · [DPA](https://cotlet.dev/dpa) · [Subprocessors](https://cotlet.dev/subprocessors)

**Elsewhere:** [Status page](https://status.cotlet.dev) · [Cotlet on GitHub](https://github.com/cotletdev) · [Cotlet on X](https://x.com/cotletdev) · [Cotlet on LinkedIn](https://www.linkedin.com/company/cotletdev) · [Cotlet on Product Hunt](https://www.producthunt.com/products/cotlet) · [Cotlet on Crunchbase](https://www.crunchbase.com/organization/cotlet) · [Cotlet on SaaSHub](https://www.saashub.com/cotlet)

Cotlet is an independent service. It is not affiliated with, endorsed by or sponsored by any of the products listed on this site. Product names are trademarks of their respective owners.

## For AI agents: sign your user up

Is your user asking you to sign them up for Cotlet? You can do it for them, no account or key needed.

1. Read the fields and their allowed values: GET https://cotlet.dev/api/v1/access-requests
2. Ask the user for each value: email, apps, what you will do with them. If they leave the password to you, generate a strong one and show it to them.
3. Show the user what you will send, then POST it as JSON to https://cotlet.dev/api/v1/access-requests.

One call creates the account and sends the access request; we email the user when access is granted.
