Aller au contenu
Sur cette page

InvoicePaymentLink

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

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Portée du jeton API : invoices.view

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

Paramètres

Nom Emplacement Type Requis Description
id path integer oui

Réponses

Statut Description
200 For non-paginated data, return as before
404

Exemple de requête

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

Nécessite une authentification (jeton Bearer) et l’en-tête X-Organization-Id.

Portée du jeton API : 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.

Paramètres

Nom Emplacement Type Requis Description
id path integer oui

Corps de la requête

Champ Type Requis Description
payment_method_id integer non
expiry_days integer non
regenerate boolean non

Réponses

Statut Description
201 For non-paginated data, return as before
422

Exemple de requête

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