Skip to content
On this page

InvoicePaymentLink

GET /api/v1/invoices/{id}/payment-link

Requires authentication (Bearer token) and the X-Organization-Id header.

API token scope: invoices.view

Returns the newest non-expired active payment link for the invoice, or 404 when none exists.

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"
POST /api/v1/invoices/{id}/payment-link

Requires authentication (Bearer token) and the X-Organization-Id header.

API token scope: invoices.create

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.

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
}'