POST /v1/invoices/{id}/send-for-payment
const url = 'https://api.asap.cool/v1/invoices/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/send-for-payment';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"email":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.asap.cool/v1/invoices/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/send-for-payment \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "email": "example" }'Email a finalized, payable invoice/deposit to the client with an online
payment link: the same transactional invoice email as /send, plus a
primary “Pay online” call to action pointing at the public /pay/{token}
page. Mints (or recovers) the durable payment-link token server-side and
injects its URL into the email; the client can pay by card / SEPA without an
account. Like /send, it flips the document to sent and arms the reminder
ladder.
Same recipient/finalized guards as /send, plus the online-collection gate:
Stripe must be configured (503 stripe_disabled) and the org must have a
charges-enabled connected account (409 stripe_account_required /
stripe_account_not_ready); a non-payable document is 409 not_payable.
Authorizations
Section intitulée « Authorizations »Parameters
Section intitulée « Parameters »Path Parameters
Section intitulée « Path Parameters »Document identifier.
Request Body required
Section intitulée « Request Body required »Optional recipient override.
Optional body for POST /v1/invoices/{id}/send.
object
Override the recipient email for this send only. When omitted (or blank), the document’s contact email is used. Does not mutate the contact — it just retargets delivery, e.g. to correct a wrong or missing address.
Example generated
{ "email": "example"}Responses
Section intitulée « Responses »Invoice emailed with a payment link; document marked sent.
Body of a successful send: the updated document plus a sent flag.
object
The document after the sent transition.
object
Deposit share as a percentage of the parent quote.
Invoice this credit note offsets (1 max per invoice).
Frozen billable client snapshot (set at finalization).
Logical reference to a contact.
Displayable contact name (R5): the frozen client snapshot for a
finalized document, or a live join on the contact for a draft. None
when the contact no longer exists.
NF203 content hash (hex), set only at finalization.
Source quote when this invoice was converted from one.
RFC3339 creation timestamp.
Structured reason code for a credit note (avoir); None when absent.
Free-text detail accompanying the credit-note reason.
Delivery address (JSONB).
Deposit requested at order time, percentage (decimal token). Quote-oriented mention.
Long description.
Early-settlement discount mention (art. L441-9).
Due date (YYYY-MM-DD).
Delivery / execution timeline (free-form). Quote-oriented mention.
Finalization timestamp; non-null means the document is immutable.
Stable identifier.
Issue date (YYYY-MM-DD).
Line items (present on get/create/finalize, omitted on list).
Public projection of a [DocumentItem].
object
Line description.
Long description printed under the label. None when the line has none.
Stable identifier.
Ordering position within the document.
Quantity (decimal token).
Line total excluding VAT, in cents.
Line total including VAT, in cents.
Unit-of-measure code (UN/ECE Rec 20, e.g. C62). None for legacy
rows.
Unit price excluding VAT, in cents.
VAT rate as a percentage token.
RFC3339 timestamp of the last lifecycle update.
Human-readable reason for a negative lifecycle status.
Last observed regulatory lifecycle token.
Free-form notes.
Sequential number, set only at finalization.
Operation nature.
Parent quote for a deposit invoice.
Payment method.
Payment-plan JSON payload ({"percentage":"30"}/{"count":3}), null
for the none plan.
Quote payment-plan discriminant (none/deposit_then_balance/
installments) driving post-signature auto-billing.
Payment terms.
NF203 previous-link hash (hex).
Factur-X render lifecycle (pending/rendering/ready/failed).
The PDF is downloadable via GET /v1/invoices/{id}/pdf only when
this is ready (R8).
RFC3339 timestamp of the effective transition to sent, read-only;
None before any send.
Service/delivery date (YYYY-MM-DD).
Lifecycle status.
Title.
Total excluding VAT, in cents.
Total including VAT, in cents.
Total VAT, in cents.
PA-assigned transmission id, set once the invoice is transmitted.
E-invoicing transmission status toward the recipient’s PA
(not_required/pending/sending/sent/failed).
Document kind (devis/facture/avoir/acompte).
RFC3339 last-update timestamp.
Validity date (YYYY-MM-DD).
VAT chargeability basis.
Number of reminders armed by this send (the future ladder occurrences
persisted): payment reminders for a billing document, or quote-expiry
reminders for a quote. 0 for documents that are not chased (credit
notes, no anchor date, or a fully-past ladder) or when scheduling was
skipped because reminders already existed.
Always true on a 200 response.
Example generated
{ "document": { "acompte_percentage": "example", "avoir_for_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "client_snapshot": "example", "contact_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "contact_name": "example", "content_hash": "example", "converted_from_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "created_at": "example", "credit_reason_code": "example", "credit_reason_text": "example", "delivery_address": "example", "deposit_request_percentage": "example", "description": "example", "discount_terms": "example", "due_date": "example", "execution_timeline": "example", "finalized_at": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "issue_date": "example", "items": [ { "description": "example", "details": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "position": 1, "quantity": "example", "total_ht": 1, "total_ttc": 1, "unit": "example", "unit_price": 1, "vat_rate": "example" } ], "lifecycle_at": "example", "lifecycle_reason": "example", "lifecycle_status": "example", "notes": "example", "number": "example", "operation_nature": "example", "parent_devis_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "payment_method": "example", "payment_plan_config": "example", "payment_plan_kind": "example", "payment_terms": "example", "prev_hash": "example", "render_status": "example", "sent_at": "example", "service_date": "example", "status": "example", "title": "example", "total_ht": 1, "total_ttc": 1, "total_tva": 1, "transmission_id": "example", "transmission_status": "example", "type": "example", "updated_at": "example", "validity_date": "example", "vat_exigibility": "example" }, "scheduled_reminders": 1, "sent": true}No active org.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}Missing invoice:write scope.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}Not found or cross-org.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}Not finalized, not payable, or no charges-enabled connected account.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}No usable recipient email (no_recipient).
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}Stripe is not configured on this instance.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}