Skip to content
Coritan Docs

Pay an invoice

Find your unpaid invoices, pay one with credit, a saved method or a new one, and read an invoice's lines and status.

View as Markdown

In the dashboard

Coritan raises an invoice for every order, every renewal and every plan upgrade. Invoices are in US dollars. Pay one to start a new service, to keep a service running past its renewal date, or to lift a suspension.

  • Sign in to the dashboard.
  • To pay with credit, have credit on your balance. Add credit to your balance explains how.
  • To pay with a saved card or PayPal account, save it first on the Payment methods tab (Manage payment methods). You can also enter a new card or use PayPal while you pay.
  1. In the sidebar, select Billing, then the Invoices tab.
  2. Choose a filter:
    • Unpaid lists every invoice you still owe on: unpaid and overdue ones, however old.
    • Paid lists the invoices you have paid.
    • All lists everything, newest first.
  3. Select View beside an invoice to read it.

The table shows each invoice's number, Status, Total, the date it was Issued and the date it is Due. Choose how many rows a page shows at the bottom of the table, and move between pages with Previous and Next.

  1. Select Pay beside the invoice. The same button is on the Overview tab of Billing, in Waiting for payment. The dialog opens with the Amount due: the invoice total less anything already paid.
  2. Choose how to pay:
    • Account credit takes the amount from your balance. It is greyed out when your balance is empty.
    • A saved card or PayPal account pays with that method. Your default method is marked Default.
    • Card opens a card form. It reads New card when you already have a saved method.
    • PayPal shows PayPal's buttons in the dialog. Approve the payment in the PayPal window that opens; you stay on the page.
    • Any other provider opens that provider's checkout page, then brings you back to the Invoices tab.
  3. Select the button at the bottom of the dialog. It says what happens next:
    • Pay with credit when your credit covers the whole amount.
    • Apply credit when it covers part. The rest stays due, and you pay it the same way.
    • Pay $12.99 (with the amount due) for a saved method or a new card.
    • Continue to and the provider's name for a checkout page.
  4. If a card form opens (Pay by card, or Confirm with your bank when your bank asks for a check), complete it and select Pay now. You enter card details with Coritan's card processor; Coritan does not store them.

A message confirms the payment, for example Invoice INV-20260925-48213 paid. The invoice moves to the Paid filter and Coritan emails you a receipt. Paying in full also does what the invoice was for:

  • A new service starts setting up.
  • A renewal moves the service's next renewal date on by one billing period.
  • An upgrade applies the new plan (Change a service's plan).
  • A service suspended over this invoice is resumed.

When a payment is accepted but not yet settled, you see Payment submitted. The invoice updates once your bank settles it. The invoice stays unpaid until the payment clears. Every payment also appears on the Transactions tab (Transactions and payment attempts).

Select View to open an invoice. It shows:

  • Issued, Due and Paid (the date and time it was paid, or Not yet).
  • Notes, when the invoice has any.
  • One line per charge, with the Item, Qty, Unit price and Amount.
  • The Subtotal, Tax and Total. When part of the invoice is paid, Already paid and Left to pay follow.

An unpaid invoice has a pay button at the bottom of the dialog, beside Close.

Each invoice has one of these statuses:

Status Meaning
unpaid Issued and waiting for payment.
overdue Its due date has passed and it is still unpaid. The services on it are suspended soon after; Failed payments and suspended services has the timeline.
paid Paid in full.
cancelled Voided. You owe nothing on it. Coritan cancels an invoice when you cancel its service, or when a newer upgrade replaces an unpaid one.
refunded Paid, then refunded.
draft Not issued yet.
No way to pay is available right now
Nothing is set up to take a payment for this invoice. Contact support.
Could not load the ways to pay
The dialog could not read the payment options. Select Try again.
Could not take the payment
The payment did not start. The message under it gives the reason, for example Payment method 812 not found or inactive when the saved method has been removed.
Could not start the payment
The card form or the provider's checkout page could not be created. The message under it gives the reason. Try again, or choose another way to pay.
The payment was declined.
Your bank or PayPal refused the charge. The message may give the bank's reason instead. Pay another way, or see Failed payments and suspended services.
The bank did not approve the payment.
The check your bank asked for failed or was abandoned. Nothing was charged. Try again, or pay another way.
Payment cancelled; the invoice is still due.
You left the provider's checkout page before paying. Nothing was charged.
Back from checkout. The invoice updates once the payment clears.
You came back from a checkout page before the provider confirmed the payment. Check the invoice again later; do not pay twice.
Could not open PayPal
PayPal did not load in the dialog. Select Try again. If the message says PayPal is not available in this browser. Choose another way to pay., use a card or another method.
Could not open the card form
The card form did not load. Select Try again.
Could not apply your credit
The message gives the reason, for example No credit balance available.
The Pay button is missing
Only unpaid and overdue invoices can be paid. The invoice is already paid, cancelled or refunded.

GET /billing/invoices lists your invoices, newest first. It takes:

status_filter
open (unpaid or overdue, what the Unpaid filter shows), or one status: draft, unpaid, paid, cancelled, refunded or overdue. Leave it out for every invoice.
page and limit
The page to return (from 1) and how many invoices a page holds (default 50, at most 200).
with_total
true wraps the page in an object with the total and the count per status. Without it, the answer is a bare array of invoices.
Shell
curl "https://api.coritan.com/api/v1/billing/invoices?status_filter=open&with_total=true" \
  -H "Authorization: Bearer $CORITAN_TOKEN"
JSON
{
  "items": [
    {
      "id": 5011,
      "invoice_number": "INV-20260925-48213",
      "user_id": 4821,
      "subtotal": 12.99,
      "tax": 0.0,
      "total": 12.99,
      "amount_paid": 0.0,
      "currency": "USD",
      "status": "unpaid",
      "due_date": "2026-09-28T00:00:00",
      "paid_at": null,
      "notes": null,
      "items": [
        {
          "id": 9120,
          "service_id": 311,
          "description": "Service renewal - survival-smp",
          "item_type": "recurring",
          "quantity": 1.0,
          "unit_price": 12.99,
          "total": 12.99
        }
      ],
      "created_at": "2026-09-25T02:00:00"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 50,
  "counts": {"all": 14, "open": 1, "draft": 0, "unpaid": 1, "paid": 13, "cancelled": 0, "refunded": 0, "overdue": 0}
}

total counts the invoices that match the filter. counts holds every status whatever the filter, with all and open added.

In each invoice:

id and invoice_number
The number the API uses in paths, and the number printed on the invoice.
subtotal, tax and total
The amounts in US dollars.
amount_paid
What credit and earlier payments have covered. What is left to pay is total minus amount_paid.
currency
USD.
status
One of the statuses in the table above.
due_date, paid_at and created_at
When the invoice falls due, when it was paid (or null) and when it was issued.
items
The lines. service_id is the service a line bills, and item_type is recurring, one_time, proration, addon, discount or manual.

GET /billing/invoices/{invoice_id} returns one invoice in the same shape. It answers 404 with Invoice not found, or 403 with Access denied for an invoice on another account.

POST /billing/invoices/{invoice_id}/apply-credit takes as much of the amount due as your balance covers:

Shell
curl -X POST https://api.coritan.com/api/v1/billing/invoices/5011/apply-credit \
  -H "Authorization: Bearer $CORITAN_TOKEN"
JSON
{
  "invoice_id": 5011,
  "applied": "12.99",
  "fully_paid": true,
  "credit_balance": "12.01",
  "message": "Invoice paid with credit"
}

When credit covers only part, fully_paid is false and message is Partial credit applied. When nothing can be applied, the answer is 400 with the reason, such as No credit balance available.

POST /payments/invoices/{invoice_id}/charge charges a saved method. Find its id with GET /payments/methods (Manage payment methods).

Shell
curl -X POST https://api.coritan.com/api/v1/payments/invoices/5011/charge \
  -H "Authorization: Bearer $CORITAN_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: pay-inv-5011-1" \
  -d '{"payment_method_id": 812}'

The body takes:

payment_method_id
The saved method to charge. Required.
amount_usd
Pay part of the invoice: this many US dollars, at most what is left. Leave it out to pay the rest in full.
currency
The currency to charge the method in. Leave it out to use your account's currency (Currencies and countries).

Send an Idempotency-Key header so that retrying a request whose answer you did not receive does not charge twice (Idempotency).

The answer is the payment attempt:

JSON
{
  "id": 7730,
  "invoice_id": 5011,
  "user_id": 4821,
  "user_email": "alex@example.com",
  "gateway_name": "stripe",
  "gateway_config_id": 3,
  "payment_method_id": 812,
  "amount": 1299,
  "currency": "USD",
  "base_amount": "12.99",
  "fx_rate": "1",
  "status": "succeeded",
  "gateway_reference": "pi_3Qexample",
  "error_message": null,
  "decline_type": null,
  "decline_code": null,
  "is_auto_charge": false,
  "charge_schedule_id": null,
  "idempotency_key": "pay-inv-5011-1",
  "refunded_amount": null,
  "created_at": "2026-09-25T09:12:40",
  "completed_at": "2026-09-25T09:12:42",
  "gateway_response": {"id": "pi_3Qexample", "status": "succeeded"},
  "client_secret": null
}

amount is in the charged currency's smallest unit (cents here). base_amount is the US dollar amount it pays and fx_rate the exchange rate used, both as decimal strings. gateway_reference is the provider's id for the payment, and gateway_response holds the provider's own answer. status is one of:

succeeded
Paid.
processing
Accepted but not settled. The invoice updates when it settles.
requires_action
The bank wants the cardholder to confirm. client_secret lets a browser page finish it with Stripe.js; then call confirm-payment as below. A script alone cannot complete this step.
failed
Declined. error_message gives the reason, and decline_type says whether retrying can work (soft) or not (hard).

POST /payments/invoices/{invoice_id}/pay is the older path for the same charge, with the same body and answer.

Pay with a new card, PayPal or a checkout page

Section titled Pay with a new card, PayPal or a checkout page

These flows need a browser for the cardholder's part; the API creates and finishes each payment.

  1. List what can take this invoice with GET /payments/invoices/{invoice_id}/gateways. Each entry has a name to send as gateway_name, and adapter says what it is (stripe for cards, paypal, or another provider).
  2. For a card, create a payment with POST /payments/invoices/{invoice_id}/pay-intent. The answer's client_secret is for Stripe.js in the browser. Asking again for the same invoice and amount returns the same payment. After the card is confirmed, call POST /payments/invoices/{invoice_id}/confirm-payment with the query parameters gateway_name and payment_intent_id. It answers succeeded, pending or requires_action, or 402 with Payment not completed.
  3. For PayPal or another provider, call POST /payments/invoices/{invoice_id}/checkout with gateway_name, return_url and cancel_url. Both must be absolute http or https URLs on a real host: the API answers 400 for a placeholder host such as example.com or localhost. Send the payer to checkout_url. For PayPal, session_id is the PayPal order; once the payer approves it, call POST /payments/invoices/{invoice_id}/paypal-capture with the query parameters order_id and gateway_name.
Shell
curl -X POST https://api.coritan.com/api/v1/payments/invoices/5011/checkout \
  -H "Authorization: Bearer $CORITAN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"gateway_name": "paypal", "return_url": "https://www.coritan.com/dashboard/billing/invoices", "cancel_url": "https://www.coritan.com/dashboard/billing/invoices"}'

A checkout that is still open for the invoice is returned again instead of a new one, with reused set to true. The checkout answers 400 when the invoice is already paid or cancelled.

API operations on this page

MethodPathWhat it does
GET/api/v1/billing/invoicesNewest first, ties by id so a page boundary never repeats or skips a row
GET/api/v1/billing/invoices/{invoice_id}Get invoice
POST/api/v1/billing/invoices/{invoice_id}/apply-creditApply account credit to an unpaid invoice (unlocks provision / plan change when paid)
GET/api/v1/payments/invoices/{invoice_id}/gatewaysList invoice gateways
POST/api/v1/payments/invoices/{invoice_id}/chargeCanonical saved-method charge for an invoice (alias of /pay)
POST/api/v1/payments/invoices/{invoice_id}/payCharge a saved payment method for an invoice (legacy path; prefer /charge)
POST/api/v1/payments/invoices/{invoice_id}/checkoutCreate invoice checkout
POST/api/v1/payments/invoices/{invoice_id}/pay-intentCreate an in-page Stripe Payment Element intent for an invoice
POST/api/v1/payments/invoices/{invoice_id}/confirm-paymentFinalize a platform invoice charge after customer completes SCA
POST/api/v1/payments/invoices/{invoice_id}/paypal-captureCapture an approved PayPal order for a platform invoice