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

# Rebilly REST API

The Rebilly REST API runs subscription billing and payment processing for online businesses, from customer records and payment instruments to orders, invoices, and transactions. It issues, recalculates, reissues, and voids invoices, applies transactions to them, and refunds or queries individual transactions. Subscription orders can have their items changed, be cancelled or reactivated, and generate interim or upcoming invoices. The same surface covers coupons and redemptions, disputes, blocklists, KYC documents and requests, and screening against PEP, sanctions, and adverse media lists.

## For AI agents

Look up Rebilly customers, orders, invoices, and transactions, refund a transaction, issue or void an invoice, cancel or reactivate a subscription order, and review KYC documents.

## Scope

Does not file taxes, run payroll, or keep a general ledger. Use for Rebilly subscription billing, invoicing, payment transactions, and KYC records only.

## Capabilities

- Refund a transaction by id with a required amount, and query its status with the gateway
- Issue, recalculate, reissue, abandon, or void an invoice, and apply a transaction to it
- Change the items on a subscription order, cancel it with a churnTime, or reactivate it later
- Preview a customer's or order's upcoming invoices before the next billing run
- Accept, reject, or review a KYC document and track KYC requests for a customer
- Screen a person against PEP, sanctions, and adverse media lists by firstName, lastName, dob, and country
- Tag customers in bulk and record timeline comments on customers, invoices, orders, and transactions

## Use cases

### Billing support agent through Jentic

A support agent handling a billing ticket needs to find the customer's charge and refund it without a human logging into the Rebilly dashboard. Through Jentic the agent searches for 'refund a Rebilly transaction', loads the refund operation with its input schema, and sends the refund amount for the transaction id while the secret key is injected at call time. It can then add a timeline comment on the transaction recording why the refund was made.

Example prompt: Call GET `/transactions/{id}` to confirm the charge, POST `/transactions/{id}/refund` with amount 19.99, then POST `/transactions/{id}/timeline` with a comment noting the support ticket

### Invoice lifecycle control

Finance teams correcting invoices need to recalculate after an item change, reissue a corrected copy, or void one sent in error. The Rebilly invoice operations cover each step by invoice id, including adding invoice items, applying an outside payment as a transaction, and reading transaction allocations to see how payments were split. Creating an invoice requires currency, websiteId, and customerId.

Example prompt: Call POST `/invoices/{id}/items` to add a credit line, POST `/invoices/{id}/recalculate`, then POST `/invoices/{id}/reissue` for the corrected invoice

### Subscription change and cancellation

A subscription business lets customers upgrade, downgrade, or cancel. Rebilly changes an order's items through its change-items operation, records cancellations through subscription cancellations with a required subscriptionId and churnTime, and restores service through subscription reactivations. Upcoming invoice previews show the customer what the next bill will be before the change takes effect.

Example prompt: Call GET `/subscriptions/{id}/upcoming-invoices` to preview the next bill, then POST /subscription-cancellations with the subscriptionId and a churnTime at the period end

### KYC and AML screening

Merchants in regulated verticals verify customers before accepting payments. Rebilly stores KYC documents and requests, and exposes acceptance, rejection, review, and document-match operations so a compliance workflow can record each decision. The AML search checks a name, date of birth, and country against PEP, sanctions, and adverse media lists.

Example prompt: Call GET /aml with firstName 'Jane', lastName 'Doe', dob '1980-04-12', and country 'GB', then POST `/kyc-documents/{id}/review` for the customer's uploaded document

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/transactions/{id}/refund` | Refund a transaction |
| GET | `/transactions` | List transactions |
| POST | `/invoices/{id}/issue` | Issue an invoice |
| POST | `/invoices/{id}/void` | Void an invoice |
| POST | `/subscriptions` | Create a subscription order |
| POST | `/subscription-cancellations` | Cancel a subscription order |
| GET | `/customers/{id}` | Retrieve a customer |
| GET | `/aml` | Search PEP, sanctions, and adverse media lists |

## Key resources

- **Transactions** — Payments and credits created, queried, refunded, and status-updated, with timeline comments
- **Invoices** — Invoices issued, recalculated, reissued, abandoned, voided, itemised, and paid by applied transactions
- **Orders** — Subscription orders with item changes, interim and upcoming invoices, cancellations, and reactivations
- **Customers** — Customer records, lead sources, tags, and timeline events
- **Payment instruments** — Payment cards, bank accounts, PayPal accounts, and payment tokens
- **KYC and AML** — KYC documents and requests with review decisions, plus PEP, sanctions, and adverse media search
- **Coupons and disputes** — Coupons and redemptions, chargeback disputes, and blocklists

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 57 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 48 / 100
  - Developer Experience & Jentic Compatibility: 62 / 100
  - AI-Readiness & Agent Experience: 59 / 100
  - Agent Usability: 46 / 100
  - Security: 58 / 100
  - AI Discoverability: 100 / 100
- **View full report:** https://jentic.com/apis/rebilly.com/rebilly/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring Rebilly by hand means choosing between a secret key in the REB-APIKEY header and a JWT bearer token, switching between the sandbox and live hosts, and knowing which payment token calls need a publishable key instead. Through Jentic you install once, import Rebilly from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** Rebilly puts the record id in the URL path for transactions, invoices, orders, and customers (`/transactions/{id}/refund`, `/invoices/{id}/void`), so a rule can limit your agent to one record and the operations you pick. You choose the operations it may call, so destructive ones like voiding an invoice or merging and deleting a customer are not included unless you add them.
- **Credential handling:** Your Rebilly secret key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'refund a Rebilly transaction' or 'void an invoice', and Jentic returns the matching Rebilly operation with its input schema, including required body fields like amount or churnTime.

## Related APIs

- **Stripe API** — Payments and subscription billing platform with a broad developer ecosystem
- **Recurly API** — Subscription management and recurring billing
- **Paddle API** — Merchant-of-record billing for software sellers
- **Avalara API** — Sales tax calculation for invoices and transactions
- **Onfido API** — Identity document and biometric verification

## FAQ

### What authentication does the Rebilly REST API use?

Per its OpenAPI spec, most operations accept either a secret API key in the REB-APIKEY header or a JWT sent as an HTTP bearer token. A publishable API key, sent in the Authorization header, is accepted on the payment token operations, and GET `/tokens/{token}` and digital wallet validation use it alone. Through Jentic your key is stored by your own instance and attached at call time.

### Can I refund a payment with the Rebilly REST API?

Yes. POST `/transactions/{id}/refund` refunds a transaction and requires an amount in the body, so partial refunds are expressed by sending less than the original amount. GET `/transactions/{id}` returns the original transaction first, and POST `/transactions/{id}/query` asks the gateway for its latest status.

### What are the rate limits for the Rebilly REST API?

The OpenAPI spec does not specify rate limits. Check the Rebilly developer documentation at https://docs.rebilly.com/ for current limits.

### Is there a Rebilly MCP server?

You don't need an MCP server to give your agent Rebilly. Jentic connects it directly from the API Directory: import it, store your API key once, and your agent calls the billing operations it needs on demand without loading extra tool definitions into its context.

### How do I cancel a subscription order through Jentic?

Search Jentic for 'cancel a Rebilly subscription', load the POST /subscription-cancellations operation, and run it with the subscriptionId and a churnTime. Call GET `/subscriptions/{id}/upcoming-invoices` first if the customer wants to see their final bill. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Can I use the Rebilly sandbox?

Yes. The spec lists two servers: api-sandbox.rebilly.com for the sandbox and api.rebilly.com for live traffic. Point the agent at the sandbox host with a sandbox key while you test refunds and invoice changes.

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

Yes. For example, allow only GET `/transactions/{id}` and POST `/transactions/{id}/refund` for the transaction id named in a ticket, and the agent can check and refund that one charge but cannot void invoices, cancel orders, or touch KYC records, with every call logged.
