canonical: https://jentic.com/apis/billie.io/billie

# Billie Direct API

Jentic publishes the only available OpenAPI specification for Billie Direct API, keeping it validated and agent-ready. Billie is a German buy-now-pay-later provider focused on B2B transactions, and the Direct API runs the full BNPL flow: OAuth bearer auth, order creation and updates, invoicing with capture-style payment, credit notes, dunning controls, and a hosted checkout session option. Agents can create an order, capture an invoice, extend the payment duration, pause dunning if a buyer disputes, and issue credit notes against past invoices.

## For AI agents

Run a B2B buy-now-pay-later flow end-to-end: create orders, capture invoices, extend due dates, issue credit notes, and host checkout sessions through Billie.

## Scope

Does not handle consumer BNPL, card processing, or accounting reconciliation - use for B2B buy-now-pay-later orders, invoice capture, and dunning control only.

## Capabilities

- Authenticate via OAuth 2.0 bearer tokens with revocation and validation endpoints
- Create and update B2B orders, then cancel them before fulfillment
- Capture invoices against orders, confirm payment, and extend the payment due date
- Issue credit notes and pause dunning on disputed invoices to protect the buyer relationship
- Spin up hosted checkout sessions or in-line authorization flows for embedded BNPL

## Use cases

### B2B buy-now-pay-later checkout

Offer Billie BNPL as a checkout option on a B2B storefront. The agent calls POST /orders to create the order, POST /invoices to capture payment terms, and uses POST `/checkout/session/hpp` for the hosted page when the buyer prefers Billie's UX. Buyers get net-payment terms and the merchant gets paid up front by Billie.

Example prompt: Call POST /orders for a buyer at €1,200 net-30, then call POST /invoices to capture the invoice and return the resulting captureId

### Dispute and credit-note handling

Pause dunning when a buyer raises a dispute and issue a credit note when goods are returned or the invoice was incorrect. POST `/invoice/{captureId}/pause-dunning` halts collections, POST `/invoices/{captureId}/credit-notes` issues the credit, and DELETE `/invoices/{captureId}` cancels the invoice as a refund. This keeps the buyer relationship intact while finance reconciles.

Example prompt: Call POST `/invoice/{captureId}/pause-dunning` for a disputed invoice, then issue a €200 credit note via POST `/invoices/{captureId}/credit-notes`

### Payment-term extension for cash-strapped buyers

Extend the due date on an invoice when a buyer needs more time, without writing the receivable off. POST `/invoices/{captureId}/extend-duration` extends the term and POST `/invoices/{captureId}/update-details` lets the agent update the metadata. Useful for finance ops automating extension requests that would otherwise sit in a support queue.

Example prompt: Call POST `/invoices/{captureId}/extend-duration` for an invoice nearing due date, extending the payment window by 14 days

### Order lifecycle management

Manage the full order lifecycle from creation to capture or cancellation. POST /orders creates, POST `/orders/{id}` updates, GET `/orders/{id}` reads detail, and POST `/orders/{id}/cancel` cancels before the invoice is captured. POST `/invoices/{captureId}/confirm-payment` closes the loop once funds arrive.

Example prompt: Call POST /orders to create an order, then GET `/orders/{id}` to read its status, and POST `/orders/{id}/cancel` if the buyer abandons checkout

### Agent-driven BNPL flow via Jentic

An AI agent uses Jentic to discover Billie operations from intents like 'create a b2b bnpl order' or 'pause dunning on an invoice'. Jentic returns the matching operation, loads its schema, and executes with the OAuth bearer token from the vault. The agent can run the full BNPL lifecycle without ever holding the raw token.

Example prompt: Search Jentic for 'create a b2b bnpl order in billie', load the POST /orders schema, and execute it for a buyer with €1,200 net-30 terms

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/oauth/token` | Request an OAuth token |
| POST | `/orders` | Create a B2B order |
| POST | `/orders/{id}/cancel` | Cancel an order |
| POST | `/invoices` | Capture an invoice (payment) |
| POST | `/invoices/{captureId}/confirm-payment` | Confirm invoice payment |
| POST | `/invoices/{captureId}/credit-notes` | Issue a credit note |
| POST | `/invoices/{captureId}/extend-duration` | Extend invoice payment duration |
| POST | `/checkout/session/hpp` | Create a hosted payment page session |

## Key resources

- **Authentication** — OAuth token request, validation, and revocation
- **Orders** — Create, read, update, and cancel B2B orders
- **Invoices** — Capture invoices, confirm payment, extend duration, and update details
- **CreditNotes** — Issue credit notes against captured invoices
- **Checkout** — Create checkout sessions including hosted payment pages
- **ReferenceData** — Read legal forms reference data for buyer onboarding

## Why Jentic

- **Setup:** Wiring the Billie Direct API by hand means exchanging OAuth client credentials at `/oauth/token`, refreshing the access token, and shaping each B2B order and invoice-capture body yourself. Through Jentic you install once, import Billie from the API Directory, store the client credentials once, and your agent calls it.
- **Permission scoping:** Billie puts the order and capture id in the URL path (`/orders/{id}/cancel`, `/invoices/{captureId}/confirm-payment`), so a rule can pin your agent to one order or one capture. You choose the operations it may call, so cancelling an order or issuing a credit note is not included unless you add them.
- **Credential handling:** Your Billie OAuth client credentials and access token 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 B2B BNPL order' or 'confirm payment on an invoice', and Jentic returns the matching Billie operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **PayPal Invoicing** — PayPal Invoicing offers invoice-based receivables for businesses without dedicated B2B BNPL.
- **Afterpay** — Afterpay is a consumer-focused BNPL provider strong in APAC and US.
- **Stripe** — Stripe handles card and instant payments alongside Billie's BNPL terms.

## FAQ

### Why is there no official OpenAPI spec for Billie Direct API?

Billie does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Billie Direct 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 Billie Direct API use?

Billie uses OAuth 2.0 with JWT bearer tokens. Call POST `/oauth/token` to mint a token and pass it as Authorization: Bearer on every subsequent call. POST `/oauth/token/revoke` revokes a token and GET `/oauth/authorization` validates one. Through Jentic the OAuth client and tokens sit encrypted in the vault.

### Can I issue credit notes with this API?

Yes. Call POST `/invoices/{captureId}/credit-notes` against a captured invoice to issue a credit note for the disputed or returned amount. Pair with DELETE `/invoices/{captureId}` when the entire invoice needs to be cancelled, or POST `/invoice/{captureId}/pause-dunning` when the buyer is in dispute and you want to halt collections.

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

Search Jentic for 'create a billie hosted checkout session'. Jentic returns the POST `/checkout/session/hpp` operation, loads its schema, and your agent calls it with the order detail. Use POST `/checkout/session` for an in-line flow or PUT `/checkout/session/{id}/confirm` to confirm a session.

### What rate limits apply to the Billie Direct API?

The published spec does not document specific rate limits. As a payment provider Billie throttles per merchant to prevent abuse, so cache OAuth tokens (rather than minting one per request via POST `/oauth/token`) and back off if HTTP 429 is returned.

### Is the Billie Direct API free?

API access is part of Billie's merchant offering rather than a separate paid tier; Billie earns revenue on the BNPL transactions themselves. You need an active Billie merchant account and OAuth credentials to use the Direct API. Jentic does not add usage charges on top.

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

Yes. Because you run Jentic One yourself, your own rules decide which Billie operations the agent may call and which OAuth credentials it may use. Billie puts the order and capture id in the URL path, as in `/orders/{id}/cancel` and `/invoices/{captureId}/confirm-payment`, so you can pin the agent to a single order or invoice. You also pick the exact operations it can reach, so destructive calls like cancelling an order or issuing a credit note via POST `/invoices/{captureId}/credit-notes` stay off limits until you explicitly add them.
