Issue a self-billed invoice
With self-billing, you, the buyer, draw up the invoice in the name and on behalf of your supplier, under a self-billing mandate the supplier gave you. The invoice remains the seller's: it carries the seller's series number, it is declared to the PPF under the seller's SIREN and it is addressed to the seller on its platform, which can accept, refuse or reject it. You create it through the API in your purchases ledger, Scribee numbers it, deposits it and returns the seller's answer to you; when that answer freezes the invoice, you record your decision through the API; when the seller suspends it, you complete it through the API.
Self-billing is enabled per workspace: Scribee enables it, on request, for each workspace concerned. Until it is enabled, the self_billing object of every invoice is null and the decision endpoint answers 403.
What Scribee does for you
- The mandate check: at creation, Scribee checks that an active
self_billingmandate from the seller covers the issue date, and records that mandate on the invoice (self_billing.billing_mandate_id). - The numbering: the invoice number is drawn from the seller's series,
series_prefixfollowed by a 6-digit counter, for exampleACME-000001. - The mandatory mention: the generated
ubl,ciiandfacturxfiles carry an invoice-level noteAutofacturation, unless the invoice already carries it. - The regulatory flows: at deposit, the regulatory data extract (flow 1) goes to the PPF under the seller's SIREN, and the invoice (flow 2) goes to the electronic address the directory publishes for the seller. When waiting for the recipient platform's acknowledgement is enabled for your workspace, the flow 1 leaves after the seller's platform acknowledges, or failing that 20 hours after the deposit, or earlier as soon as the copy is refused for good or the seller is no longer addressable (The reason codes).
- Tracking the seller's answer: the seller's statuses are applied to the invoice, and its acceptance, express or tacit, is recorded in
self_billing.seller_acceptance.
The flow
Step by step
1. Check the seller's mandate
The self-billing mandate is created in the company settings of the Scribee interface; the API only reads it. List the company's mandates with GET /api/v1/companies/{company_id}/billing_mandates (reference) and pick the one whose kind is self_billing, whose counterparty.party_id designates your supplier, whose start_date - end_date period contains the issue date and which was not terminated (terminated_at) on that date. series_prefix gives the prefix of the numbers the invoice will receive.
curl https://app.scribee.tech/api/v1/companies/317/billing_mandates \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
"data": [
{
"id": 42,
"company_id": 317,
"kind": "self_billing",
"status": "active",
"start_date": "2026-09-01",
"end_date": null,
"terminated_at": null,
"series_prefix": "ACME",
"counterparty": {
"party_id": 88,
"name": "Fournisseur Mandant SAS",
"legal_registration_id": "123456789",
"legal_registration_scheme_id": "siren"
},
"material_issuer_country_code": null,
"comparable_mutual_assistance": null,
"written_mandate_required": false,
"has_written_mandate_proof": false
}
]
}
material_issuer_country_code and comparable_mutual_assistance carry the declaration of the material issuer of the invoices, made in the company settings of the Scribee interface: the ISO 3166-1 alpha-2 code of the country where the person who actually issues the invoices is established (the buyer or the third-party invoicer, or the provider or subcontractor they delegate issuance to, per BOI-TVA-DECLA-30-20-10-30 § 280), and whether that country offers mutual assistance comparable to that of Directive 2010/24/EU and Regulation 904/2010. Both are null until something is declared; the second is declared, never derived from the country. When comparable_mutual_assistance is false, written_mandate_required is true: the mandate must be a prior written mandate (article 242 nonies of annex II to the CGI). Its signed copy, a PDF, is attached to the mandate in the Scribee interface; once attached, it can no longer be replaced or removed. has_written_mandate_proof says whether it is attached, without ever exposing the file. Under such a mandate, no periodic invoice may be issued: this is an obligation of the issuer of the invoices, which the mandate form recalls as information in the Scribee interface. The deposit does not check it, because no invoice data marks a periodic invoice: an invoicing period filled in on the invoice (BG-14) or on its lines (BG-26) is not refused.
2. Create the draft
Create the invoice as a purchase (direction set to purchases), with one of the seven self-billed type_code values, for example self_billed_invoice (389) (The seven self-billed types). Designate the seller by its supplier record: a seller entry carrying its party_id. Do not send an invoice_number: Scribee draws it from the mandate's series. Without a buyer entry, the buyer is your company.
Creation sends nothing: the invoice is a draft (000), editable by PATCH. The number, however, is drawn at creation; a refused creation consumes none.
curl -X POST https://app.scribee.tech/api/v1/workspaces/YOUR_WORKSPACE_ID/invoices \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"company_id": 317,
"invoice": {
"direction": "purchases",
"type_code": "self_billed_invoice",
"issue_date": "2026-09-15",
"currency_code": "EUR",
"parties": [
{ "role": "seller", "party_id": 88 }
],
"lines": [
{
"line_id": "1",
"article_name": "Prestation de transport",
"quantity": 2.0,
"quantity_unit_code": "day",
"article_unit_price_excluding_taxes": 250.0,
"line_extension_amount": 500.0,
"tax_category_id": "S",
"vat_rate": 5.5
}
],
"tax_subtotals": [
{ "tax_category_id": "S", "vat_rate": 5.5, "vat_amount": 27.5, "amount_without_taxes": 500.0, "currency_code": "EUR" }
],
"total_amount_excluding_taxes": 500.0,
"total_tax_amount": 27.5,
"tax_inclusive_amount": 527.5,
"payable_amount": 527.5
}
}'
201 response, trimmed to the fields that matter here:
{
"data": {
"id": 12346,
"direction": "purchases",
"invoice_number": "ACME-000001",
"type_code": "self_billed_invoice",
"lifecycle_state": "draft",
"lifecycle_status_code": "000",
"self_billing": {
"billing_mandate_id": 42,
"seller_answer": null,
"buyer_decision": null,
"seller_acceptance": null
}
}
}
A PATCH on the draft checks the mandate again: it refuses another seller, a supplied invoice_number and an issue date the mandate does not cover, and detaches the mandate if the type_code leaves self-billing.
The seven self-billed types
The seven self-billed type_code values are issued through this journey, all numbered from the mandate's series:
type_code | BT-3 | What the invoice must carry |
|---|---|---|
self_billed_invoice | 389 | - |
self_billed_retainer_invoice | 500 | - |
self_billed_factored_invoice | 501 | The seller's factor as the payee party, the subrogation clause and, on a credit transfer, the factor's IBAN |
self_billed_credit_note | 261 | At least one preceding invoice, dated |
self_billed_factored_credit_note | 502 | At least one preceding invoice, dated, and the seller's factor as the payee party, with no subrogation clause and no factor's IBAN |
self_billed_corrected_invoice | 471 | Exactly one preceding invoice, dated |
self_billed_corrected_factored_invoice | 473 | Exactly one preceding invoice, dated, the seller's factor as the payee party, the subrogation clause and, on a credit transfer, the factor's IBAN |
The preceding invoice is cited in invoice_references, each entry with its issue date invoice_date (BT-26), under rules BR-FR-CO-05 (credit note) and BR-FR-CO-04 (corrective invoice). A credit note may cite it on its lines instead, as a sales invoice does (Issue a sales invoice). A missing date gets the deposit refused with 422, the invoice staying a draft; a corrective invoice that cites no preceding invoice, or cites several, is refused with 422 by the deposit's Schematron check.
The factor of a 501 or 473 invoice is designated on each invoice, not on the mandate: a parties entry with the payee role whose role_code, when supplied, is DL (a role_code on a payee party requires the EXTENDED-CTC-FR profile, see Issue a sales invoice). The invoice also carries the subrogation clause, a factor_assignment_clause note (subject code ACC) in item_notes, and, on each payment_means entry that is a credit transfer (type_code 30 or 58), the factor's account in payee_account_id (BT-84); with no credit-transfer payment means, no IBAN is required. Without a payee party, with another role_code, without the note or without the IBAN, the deposit is refused with 422 and the invoice stays a draft (Issue a sales invoice). A PATCH of the draft is judged in the same way on what it installs: one that leaves any of these elements out is refused with 422 validation_failed and the draft stays unchanged, so resend the payee party, item_notes, and payment_means together in every PATCH. Creation is not judged on these elements; the deposit is. The account and the clause are carried in the invoice sent to the seller. The factor of a 502 credit note is designated in the same way, as the payee party whose role_code, when supplied, is DL; nothing being paid on a credit note, neither the factor_assignment_clause note nor payee_account_id is required. Without a payee party or with another role_code, the credit note's deposit is refused with 422; a PATCH of the draft that leaves it without a payee party is refused with 422 validation_failed, the payee key of details naming the refusal, and the draft stays unchanged. Its creation is not judged on the payee party.
Depositing a 471 or 473 corrective invoice cancels the invoice it corrects when its invoice_references entry designates a self-billed invoice your company issued under the same mandate, and its date does not contradict that invoice's. The corrected invoice moves to cancelled and receives a 220 Cancelled status, visible in its lifecycle_events. That 220 is sent to the seller's platform, without a reason and after the corrective invoice, never to the PPF. When the reference designates no self-billed invoice of that mandate, or the corrective invoice is already refused (210) or rejected (213) when Scribee processes its deposit, nothing is cancelled. A credit note (261, 502) cancels nothing.
A 261 or 502 credit note on a refused or rejected invoice is not transmitted. When every invoice the credit note names, in invoice_references or, failing that, on its lines (invoice_reference_number), is a self-billed invoice of your company under the same mandate that the seller refused (210) or that its platform rejected (213) before the credit note's deposit, it is an internal accounting cancellation, like the sales credit note on a refused sale (Issue a sales invoice): the credit note is deposited (200 Deposited) but Scribee emits for it neither a flux 1 to the PPF nor a copy to the seller's platform. A refused invoice the parties decided to continue by mutual agreement, agreement recorded before the credit note's deposit, does not count as refused: the credit note citing it is transmitted normally, like the credit note of an approved invoice.
A credit note cannot cancel an invoice your cancel decision already cancelled. When an invoice the credit note names, in invoice_references or, failing that, on its lines, is a self-billed invoice of the same mandate, on which you recorded the cancel decision (step 6), and its date does not contradict that invoice's, the credit note's deposit is refused with 422, the credit note staying a draft: La facture autofacturée ACME-000001 est déjà annulée dans vos comptes après le refus de son vendeur ou son rejet : un avoir ne peut pas l'annuler une seconde fois. Retirez-la des factures antérieures de l'avoir. Remove that invoice from invoice_references or from the lines citing it, then deposit again. The refusal rests on the decision, not on the cancelled state: a credit note on an invoice cancelled by a 471 or 473 corrective invoice is not refused.
3. Deposit the invoice
The deposit is irreversible and leaves Scribee: flow 1 goes to the PPF under the seller's SIREN, and the invoice goes to the seller's platform. Review the draft before depositing.
The deposit goes through the deposit transition, as for a sales invoice (The invoice lifecycle).
curl -X PATCH https://app.scribee.tech/api/v1/invoices/12346/transition \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "invoice": { "event": "deposit" } }'
The deposit is refused with 422, the invoice staying a draft, when the directory publishes no active address for the seller, when the invoice's buyer is not your company, or when self-billing is no longer enabled for the workspace.
The deposit also requires your company, the buyer issuing the invoice, to hold on the day of the deposit a mandate that authorises the emission of its invoices: signed, Active and in effect that day, covering the send_invoices scope, and either a formal agreement designating the Approved Platform or a delegation mandate (Electronic invoicing mandates). It is not the seller's self_billing mandate. Without it, the deposit is refused with 422 and code: "operation_failed", the invoice staying a draft: Aucun mandat en vigueur aujourd'hui n'autorise l'émission des factures de cette société. Il faut un accord formel désignant la Plateforme Agréée, ou une délégation couvrant l'émission des factures, signé et en vigueur à la date du dépôt : faites signer ou renouveler ce mandat, puis déposez de nouveau la facture. Rien n'a été déposé.
The number is reserved at deposit under the seller's SIREN, for the year of the issue date (AIFE rule G1.45). This SIREN shares its numbers between the self-billed invoices issued in its name and the sales invoices issued on Scribee by any company carrying it, whatever its workspace: a number it already holds for that year is refused with 422, the invoice staying a draft, without the message saying anything about the invoice that holds it: Le numéro de facture ACME-000001 ne peut pas être utilisé pour ce vendeur en 2026 : un numéro de facture doit être unique par vendeur et par année (règle AIFE G1.45).
When the mandate requires a written mandate (written_mandate_required at true) and no signed written mandate is attached to it (has_written_mandate_proof at false), the deposit answers 422, leaving the invoice a draft: Le mandat d'autofacturation du vendeur Fournisseur Mandant SAS doit être un mandat écrit et préalable : la facture est émise depuis un pays déclaré sans assistance mutuelle comparable à celle de l'Union européenne. Joignez le mandat écrit signé au mandat de facturation avant de déposer la facture. Have the signed written mandate attached in the Scribee interface, then deposit again. An invoicing period is not refused under this mandate: the ban on periodic invoices remains an obligation of the issuer (see step 1).
4. Track the seller's answer
The invoice's self_billing object, returned by GET /api/v1/invoices/{id} (reference) and by the invoice list, sums up where the invoice stands:
| Field | Values | Meaning |
|---|---|---|
billing_mandate_id | integer | The mandate under which the invoice is issued |
seller_answer | "210", "213" or null | "210": the seller refused the invoice; "213": the seller's platform rejected it |
buyer_decision | cancelled, continued or null | Your decision on that answer (step 5) |
seller_acceptance | object or null | The seller's acceptance of the invoice |
The acceptance is express when the seller sends the status 205 Approved or 206 Partially approved: mode is express, source is status and source_status_code names that status. It is tacit when the objection period set in the mandate runs out from the deposit without the seller having sent 207 Disputed, 208 Suspended, 210 Refused, 213 Rejected or 220 Cancelled: mode is tacit, source is objection_period and source_status_code is null. An acceptance covers one deposit: Scribee records a single one per deposit, and seller_acceptance reports the one of the invoice's latest deposit (200), null until that deposit is accepted.
{
"data": {
"id": 12346,
"lifecycle_state": "deposited",
"self_billing": {
"billing_mandate_id": 42,
"seller_answer": null,
"buyer_decision": null,
"seller_acceptance": {
"mode": "express",
"recorded_at": "2026-09-18T10:12:00Z",
"source": "status",
"source_status_code": "205"
}
}
}
}
5. Complete the invoice after a suspension
The seller may suspend the invoice pending additional information: its 208 Suspended status puts the invoice in suspended. You answer it with the 209 Completed status, using the complete event of PATCH /api/v1/invoices/{id}/transition (reference), write scope. complete is then listed in lifecycle_available_transitions. reason, optional, carries the additional information, in 250 characters at most; reason_code is not accepted.
The 209 leaves Scribee: it is sent to the seller's platform, at the seller's electronic address carried by the invoice, and never to the PPF.
curl -X PATCH https://app.scribee.tech/api/v1/invoices/12346/transition \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"invoice": {"event": "complete", "reason": "Bon de livraison BL-2026-118 joint"}}'
200 response: the invoice, trimmed.
{
"data": {
"id": 12346,
"lifecycle_state": "completed",
"lifecycle_status_code": "209"
}
}
The invoice then awaits the seller's new decision: from completed, its statuses 204, 205, 206, 207, 208, and 210 apply as they did before the suspension. Status 209 exists only on a self-billed invoice: a 209 that the seller's platform addresses to this invoice is recorded in the history with applied set to false and does not change its state.
6. Decide after a refusal or a rejection
A 210 from the seller puts the invoice in refused and freezes it until your decision; a 213 from the seller's platform puts it in rejected and requires its cancellation. A 213 whose motives are all REJ_UNI or DOUBLON, received after a 202, 203 or 204 that arrived over the same channel, whichever platform sent it, for the current send of the invoice (recorded after the latest 213 whose applied is true or that a new send of the invoice under the same number answered and with an occurred_at in a later second than its own), whose occurred_at (the status date-time, MDT-78) falls no later than the second of the 213's, is the exception: recorded with applied set to false, it leaves the invoice in its state; when in doubt, check with the seller that this rejection targets a duplicate copy only, otherwise its accounting cancellation is still due (The invoice lifecycle); cancel is refused on it as on any invoice neither refused nor rejected. You record your decision with POST /api/v1/invoices/{invoice_id}/self_billed_seller_decision (reference), write scope:
cancelcancels the invoice in your books, after a210or a213. If an invoice is still owed, issue a new one: it will receive a new number from the seller's series.cancelis refused when a deposited, untransmitted credit note, the one on a refused or rejected invoice (step 2), already cancels it in your books: there is then nothing left to cancel.continuecarries on with the same invoice and the same number, by agreement with the seller, after a210only. The invoice stays refused: the tax administration counts it as such, and your pre-filled VAT return will differ by its VAT.continueis refused too when such a credit note already cancels the invoice in your books.
reason, required, states the grounds for the decision in at most 500 characters.
curl -X POST https://app.scribee.tech/api/v1/invoices/12346/self_billed_seller_decision \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "decision": "cancel", "reason": "Taux de TVA erroné, refacturation sous un nouveau numéro" }'
200 response: the invoice, trimmed.
{
"data": {
"id": 12346,
"lifecycle_state": "refused",
"lifecycle_status_code": "210",
"self_billing": {
"billing_mandate_id": 42,
"seller_answer": "210",
"buyer_decision": "cancelled",
"seller_acceptance": null
}
}
}
The decision is recorded once. The same decision sent again answers 200 and records nothing more; a different decision is refused.
What happens next
- Nothing leaves Scribee on the decision: no status is sent to the seller or to the PPF, no credit note is created, and
lifecycle_statedoes not change. Onlyself_billing.buyer_decisionchanges. - Cancellation removes the invoice from your books: its accounting entries not yet exported are removed; an entry already exported is kept, and its reversal is yours to post in your accounting software.
- The decision is attributed to your OAuth application in the invoice's history.
- Payment statuses are shared:
211Payment sent is yours, the buyer's;212Collected belongs to the seller. Scribee never poses212on your side on this invoice: a recorded payment does not move it to Collected, and the transition to212is refused. The212comes from the seller.
Errors and edge cases
At creation
Each refusal answers 422 and records nothing.
| Cause | What to do |
|---|---|
No active self_billing mandate from the seller covers the issue date | Have the mandate created in the Scribee interface, or correct issue_date |
invoice_number supplied | Remove it: the number comes from the mandate's series |
seller entry without party_id | Designate the seller by its supplier record |
seller entry changing the record's name, legal identifiers or VAT number | Send only the party_id, or values identical to the record |
direction set to sales | A self-billed invoice is issued on the purchases ledger |
lifecycle_state requested as available | Create a draft, then deposit it |
Line price or quantity outside the accepted precision (code: validation_failed, details keyed by lines[i][field]) | Send at most 6 decimals on prices, 4 on quantities; see The precision of line prices and quantities |
At completion
Each refusal answers 422 and the invoice does not change state.
message | Cause |
|---|---|
| Le statut Complétée (209) n'est disponible que sur une facture autofacturée : il répond au statut Suspendue (208) du vendeur sur une facture que vous avez émise en son nom. | complete on an invoice that is not self-billed |
| Impossible de passer de deposited à complete. L'état actuel ne permet pas cette transition. | Self-billed invoice that is not at 208 Suspended |
| La transition complete ne peut pas être déclenchée manuellement. | Suspended self-billed invoice you did not issue, or self-billing not enabled for the workspace |
At decision
| Status | Cause |
|---|---|
401 | Missing or invalid token |
403 | Token without the write scope, self-billing not enabled for the invoice's workspace, or an invoice that is not a purchase invoice |
404 | Invoice that does not exist or belongs to a workspace outside your application |
422 invalid_argument | decision missing or other than cancel and continue |
422 operation_failed | reason missing or too long, invoice neither refused (210) nor rejected (213) by the seller side, continue after a 213, a different decision already recorded, or an invoice a deposited, untransmitted credit note already cancels in your books |
{
"error": "unprocessable_entity",
"code": "operation_failed",
"message": "Une autre décision a déjà été enregistrée sur la réponse du vendeur à cette facture."
}
Related pages
- The invoice lifecycle - the statuses and the
deposittransition - Issue a sales invoice - creating an invoice and billing mandates
- API reference: decide on the seller's answer
- API reference: get an invoice
- API reference: list a company's billing mandates