# Invoices and payments

| Page | Path | What it is for |
|---|---|---|
| **Invoices** | `/invoices` | Invoices and payments |
| **Quotes** | `/quotes` | Quotes awaiting your answer |
| **Credit & payment methods** | `/billing` | Credit, payment methods, gift cards |

## Pay an invoice

**Invoices** (`/invoices`) lists your invoices. Open one to see the lines, download the PDF (or a UBL e-invoice for accounting software), and choose **Pay**: you pick one of the payment methods your provider offers (card, PayPal, bank transfer and so on). Some methods send you to the payment provider and back.

- **Pay several at once**: select unpaid invoices and pay them together, or merge them into one invoice.
- **Use your credit**: apply account credit to an invoice.
- **Refunds** on an invoice are shown on it.

## Credit, saved cards and gift cards

**Credit & payment methods** (`/billing`):

- Add funds to your account credit; credit is used to pay invoices.
- Save a payment method and make one the default. If your provider uses automatic payments, due invoices are charged to the default method; you get an email when a charge fails.
- Redeem gift cards.

## If you do not pay

Your provider sends payment reminders before and after the due date. Services of overdue invoices can be suspended, and are unsuspended when the invoice is paid.

| Method | Path | Summary |
|---|---|---|
| PUT | `/api/v1/client/billing/auto-pay` |  |
| GET | `/api/v1/client/billing/payment-methods` |  |
| POST | `/api/v1/client/billing/payment-methods` |  |
| DELETE | `/api/v1/client/billing/payment-methods/{id}` |  |
| POST | `/api/v1/client/billing/payment-methods/{id}/default` |  |
| GET | `/api/v1/client/credit` |  |
| GET | `/api/v1/client/credit/add-funds` |  |
| POST | `/api/v1/client/credit/add-funds` | Create a deposit invoice; once paid (any gateway) the amount is credited. |
| GET | `/api/v1/client/invoices` |  |
| POST | `/api/v1/client/invoices/mass-pay` | Pay several of my unpaid invoices from account credit, oldest due first. |
| POST | `/api/v1/client/invoices/merge` | Client-side merge (WHMCS "mass payment"): combine own unpaid invoices into |
| GET | `/api/v1/client/invoices/{id}` |  |
| POST | `/api/v1/client/invoices/{id}/apply-credit` |  |
| GET | `/api/v1/client/invoices/{id}/gateways` | Gateways usable for this invoice (currency + amount limits). Ids/names only. |
| POST | `/api/v1/client/invoices/{id}/pay` | Start paying an invoice with a gateway: redirect (Stripe) or manual |
| GET | `/api/v1/client/invoices/{id}/pdf` |  |
| GET | `/api/v1/client/invoices/{id}/refunds` |  |
| GET | `/api/v1/client/invoices/{id}/ubl` | UBL 2.1 (Peppol BIS 3.0 / CIUS-RO) XML of one of the caller's issued invoices. |

Full request and response details: [HTTP API](developers/api.md).

