For Developers
Pay Invoice
POST https://ed.link/api/v2/teams/:team_id/invoices/:invoice_id/pay
Collects payment for the invoice and returns the updated invoice plus payment rows.
Permissions
Requires either the invoices.create or invoices.update system permission.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
:team_id | UUID | Yes | The ID of the team. |
:invoice_id | UUID | Yes | The ID of the invoice to pay. |
Sample Request
const response = await axios.post(
`https://ed.link/api/v2/teams/${team_id}/invoices/${invoice_id}/pay`,
{},
{
headers: {
authorization: `Bearer ${user_session_token}`
}
}
);
Sample Response
{
"$data": {
"invoice": {
"id": "2a90184b-4819-4712-9912-391820491820",
"state": "paid",
"number": "1042"
},
"payments": [
{
"id": "90184b23-9041-4712-8819-102938475819",
"amount": 450,
"currency": "USD",
"invoice_id": "2a90184b-4819-4712-9912-391820491820"
}
]
}
}
