InvoicePaymentLink
Get the invoice's active payment link
GET /api/v1/invoices/{id}/payment-link
Requires authentication (Bearer token) and the X-Organization-Id header.
Returns the newest non-expired active payment link for the invoice, or 404 when none exists. (#843)
Parameters
| Name |
In |
Type |
Required |
Description |
id |
path |
integer |
yes |
|
Responses
| Status |
Description |
| 200 |
For non-paginated data, return as before |
| 404 |
|
Example request
curl -X GET "https://kworia.com/api/v1/invoices/{id}/payment-link" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"
Create a shareable payment link for the invoice
POST /api/v1/invoices/{id}/payment-link
Requires authentication (Bearer token) and the X-Organization-Id header.
Creates an online payment link via the resolved payment provider (Stripe/FineoPay), or returns the existing active link. Pass regenerate: true to expire existing links and mint a new one; optional payment_method_id and expiry_days (1–365). 422 when the invoice is inbound, has nothing due, or no active online payment method supports its currency. (#843)
Parameters
| Name |
In |
Type |
Required |
Description |
id |
path |
integer |
yes |
|
Request body
| Field |
Type |
Required |
Description |
payment_method_id |
integer |
no |
|
expiry_days |
integer |
no |
|
regenerate |
boolean |
no |
|
Responses
| Status |
Description |
| 201 |
For non-paginated data, return as before |
| 422 |
|
Example request
curl -X POST "https://kworia.com/api/v1/invoices/{id}/payment-link" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"payment_method_id": 1,
"expiry_days": 1,
"regenerate": true
}'