Finalise invoice
PATCH https://api.ecurring.com/invoices/{id}/finalise
Set the status of an invoice to open
. This can only be done when the invoice is in draft
state.
Finalising the invoice prevents the invoice from being edited or deleted, and will automatically email the invoice to the customer if the subscription plan has this feature enabled.
Parameters
Replace {id}
in the URL with the identifier of the invoice.
Finalising an invoice
Request
PATCH /invoices/637377985/finalise HTTP/1.1
Accept: application/vnd.api+json
Response
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"links": {
"self": "https://api.ecurring.com/invoices/637377985"
},
"data": {
"type": "invoice",
"id": "637377985",
"links": {
"self": "https://api.ecurring.com/invoices/637377985"
},
"attributes": {
"status": "open",
"reference": "ECUR-1",
"amount_excl": "10.00",
"amount_incl": "12.10",
"tax_amount": "2.10",
"invoice_date": "2019-10-04T00:00:00+02:00",
"transaction_date": "2019-10-10T00:00:00+02:00",
"hosted_invoice_url": "https://billing.ecurring.com/invoice/323a241a61ab4339c416fadf8f816e57?lang=nl",
"send_email": true,
"created_at": "2019-10-03T11:33:17+02:00",
"updated_at": "2019-10-04T09:57:41+02:00"
},
"relationships": {
"subscription": {
"links": {
"related": "https://api.ecurring.com/invoices/637377985/subscription"
},
"data": {
"type": "subscription",
"id": "739578262"
}
},
"customer": {
"links": {
"related": "https://api.ecurring.com/invoices/637377985/customer"
},
"data": {
"type": "customer",
"id": "149526343"
}
},
"invoice-lines": {
"links": {
"related": "https://api.ecurring.com/invoices/637377985/lines"
},
"data": []
},
"transaction": {
"data": {
"type": "transaction",
"id": "b91c9eb1-1331-476e-aed1-344ca19d229d"
}
}
}
}
}
Finalising an invoice without emailing a customer
Request
PATCH /invoices/637377985/finalise HTTP/1.1
Accept: application/vnd.api+json
{
"data": {
"type": "invoice",
"attributes": {
"send_email": false
}
}
}
Response
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"links": {
"self": "https://api.ecurring.com/invoices/637377985"
},
"data": {
"type": "invoice",
"id": "637377985",
"links": {
"self": "https://api.ecurring.com/invoices/637377985"
},
"attributes": {
"status": "open",
"reference": "ECUR-1",
"amount_excl": "10.00",
"amount_incl": "12.10",
"tax_amount": "2.10",
"invoice_date": "2019-10-04T00:00:00+02:00",
"transaction_date": "2019-10-10T00:00:00+02:00",
"hosted_invoice_url": "https://billing.ecurring.com/invoice/323a241a61ab4339c416fadf8f816e57?lang=nl",
"send_email": false,
"created_at": "2019-10-03T11:33:17+02:00",
"updated_at": "2019-10-04T09:57:41+02:00"
},
"relationships": {
"subscription": {
"links": {
"related": "https://api.ecurring.com/invoices/637377985/subscription"
},
"data": {
"type": "subscription",
"id": "739578262"
}
},
"customer": {
"links": {
"related": "https://api.ecurring.com/invoices/637377985/customer"
},
"data": {
"type": "customer",
"id": "149526343"
}
},
"invoice-lines": {
"links": {
"related": "https://api.ecurring.com/invoices/637377985/lines"
},
"data": []
},
"transaction": {
"data": {
"type": "transaction",
"id": "b91c9eb1-1331-476e-aed1-344ca19d229d"
}
}
}
}
}