Stable Pro

Stable Pro API · v1

Documents from connected software

Record issued invoices and notes, link amounts, and report cancellations or rejections.

The documented operations are available for the real stable and for its test environment, at the same address. Use the key for the environment you are working in.Availability and changes · 2026-12-03

Stable Pro records the centre's charges, payments and credits, but does not issue invoices. Your software issues the document under the applicable tax rules and sends its references back to Stable Pro. Stable Pro neither receives nor stores the PDF or XML.

The examples on this page use fictional data and a test environment key (sp_test_…). With the real stable the address is the same: only the key changes, sp_live_….

Before recording a document

The owner creates a connection in Settings → API & integrations, enables external-documents:write, and gives you a key. To send a link that opens documents in your software, the owner must approve its domain. Read the approved domains with GET /connection.

Record issued documents only, never drafts or pro formas. Your software remains responsible for numbering, issuing, delivery to the customer, and tax obligations. Stable Pro records the references and the amounts they represent.

Before requesting issuance, reserve the amounts with POST /external-documents/reservations and move the reservation to sending. This prevents two connector executions from issuing invoices for the same charge. Follow Connect invoicing software for the full path or Document reservations for every case.

Record invoices and notes

After issuing the document, send POST /external-documents with Idempotency-Key and reservation_id. external_id is the stable document identifier in your software; number is the number printed on the document. kind accepts invoice, credit_note, debit_note, and other. currency must match the centre's currency.

curl https://app.stable-pro.com/api/v1/external-documents \
  -H "Authorization: Bearer $STABLE_PRO_API_KEY" \
  -H "Idempotency-Key: 22222222-2222-4222-8222-222222222222" \
  -H "Content-Type: application/json" \
  -d '{"external_id":"invoice-demo-001","kind":"invoice","number":"FT-2026-001","issue_date":"2026-11-20","currency":"EUR","reservation_id":"33333333-3333-4333-8333-333333333333","covers":[{"object":"charge","id":"11111111-1111-4111-8111-111111111111","amount":3500}]}'

The identifiers are invented; replace them with IDs read from the API. Amounts are integers in the currency's minor unit: 3500 means €35.00 with EUR. A new record returns 201. The same request with the same Idempotency-Key returns 201 again; a new key with the same external_id and identical data returns 200. Neither creates a duplicate.

covers lists the charges, adjustments or advances represented by the document. Each entry has object (charge, adjustment or credit_entry), id, and amount. You can cover part of an amount and complete it later. All entries in a document must belong to the same customer. If covers is empty, provide customer_id.

For a charge, an invoice covers a positive amount. For an adjustment that lowers the price, credit_note covers a negative amount; for one that increases it, debit_note covers a positive amount. A credit loss is not a new amount to invoice.

When a note directly corrects an invoice already recorded, identify that invoice in corrects.id. Only then can a credit_note reverse a charge coverage with a negative amount, without exceeding the share covered by the corrected invoice. If the corrected document is not recorded in Stable Pro, use corrects.number to retain its reference; this does not permit a direct reversal of a coverage.

Advances

If your software invoices an advance, the invoice covers the credit entry created by the advance, with object: "credit_entry" and a positive amount. Only entries with invoiceable: true can be covered: an advance, an overpayment, a payment moved to credit; for the others the response is 422 credit_entry_not_invoiceable.

  • The final invoice that deducts the advance covers the service with a positive amount and the advance with a negative amount, in the same document.
  • The credit note that corrects an advance invoice covers the advance with a negative amount and identifies the invoice in corrects.id.
  • The net invoiced amount of an advance stays between zero and its amount, counting the documents of all connections: a second advance invoice on the same money receives 422 coverage_exceeds_fact, a reduction larger than the invoiced amount 422 exceeds_invoiced_advance.
  • An advance invoice already deducted by a final invoice cannot be cancelled: 409 advance_reduced_by_issued_document.

When the credit of an invoiced advance pays for a service, the charge shows that part in amount_invoiced_through_advance and does not ask for it again in amount_to_invoice. Stable Pro does not decide whether and when to invoice an advance. The fields are described in Payments, credit and advances.

Add coverages to a document still issued with POST /external-documents/{id}/coverages. Existing coverages cannot be removed, so check them before sending. Charges and adjustments expose billed and remaining amounts in invoiced_by, amount_invoiced, and amount_to_invoice; advances in invoiced_by, amount_invoiced, and invoiced_breakdown.

Cancellation, rejection, and replacement

If the external software cancels or rejects a document, send POST /external-documents/{id}/status-changes with cancelled or rejected and a new Idempotency-Key. These states are final: the document stays in the history but no longer counts toward invoiced amounts. An invoice already corrected by an issued note cannot be cancelled with this operation.

When issuing a replacement, record it with a new external_id and identify the old one in replaces_id. Only a cancelled or rejected document managed by your connection can be replaced. A rejected document's number can be reused; a cancelled document's number remains reserved.

The optional link opens the document in the external software, subject to that software's login and permissions. It must use https on a domain approved by the owner, without credentials or access parameters. Do not send public, shared, temporary, or signed links. Stable Pro shows the document number and references even without a link.

GET /external-documents lists documents reported by connections, with customer and external_id filters. GET /external-documents/{id} returns coverages and status history. Updating a document requires the connection that manages it, normally the connection that recorded it. The owner can entrust document management to another connection in Settings → API & integrations. Rotating keys within one connection preserves access. Another connection can read the document, but cannot update it until management is transferred.

Authorized staff can see the number, status, and linked charges in the management app. Members continue to see their payments in the portal, but external invoices are not published there. The centre can hide Stable Pro receipts from members while using connected software. Customer delivery remains the external software's responsibility.

For synchronization and retries, continue with Integration workflow. All fields and responses are in the Reference.