# InvoicePaymentLinkInfoDto

A model the API reference uses in a request or a response. The operation pages link every field typed as this model here.

The operator-facing view of an invoice's pay-by-link state: the absolute hosted-payment-page
URL a payer can be handed, when it lapses, and the QR code that encodes it.

## Fields
- `invoiceId` (string(uuid)): The invoice the link pays.
- `hasPaymentLink` (boolean): Whether the invoice currently carries a payment link at all. When `false`, every other  link property is null and the invoice has no payable link to hand out.
- `paymentUrl` (string): Absolute, HTTPS hosted-payment-page URL for the payer. Null when  `hasPaymentLink` is `false`. (nullable)
- `expiresAt` (string(date-time)): When the link stops working. Null when the invoice carries no link. (nullable)
- `isExpired` (boolean): Whether `expiresAt` is already in the past. Computed server-side so the caller  never has to compare against a client clock. Always `false` when there is no link.
- `qrCodeUrl` (string): Public URL of the PNG QR code encoding `paymentUrl`. Null when the invoice has  no link, or when QR generation was skipped or failed: generation is best-effort and never  blocks a send, so a live link with no QR is a normal outcome rather than an error. (nullable)
- `hppSessionId` (string(uuid)): The hosted-payment-page session backing the link. Null for an invoice with no link, and for  a pre-cutover invoice still on the legacy opaque token. Safe to log and to quote in a  support conversation, unlike the URL. (nullable)
- `amountDue` (number(double)): Outstanding balance the link collects, in `currency`.
- `currency` (string): ISO 4217 currency code of `amountDue`. (nullable)
- `linkState` ([InvoicePaymentLinkState](https://devportal.demo.winkpg.io/docs/api/models/InvoicePaymentLinkState.md)): Whether the link still opens the payment page. `Spent`  and `Revoked` come from the payment session behind the  link; when that session cannot be read, the state falls back to  `Live` or `Expired`  from `expiresAt` alone. `None` exactly when  `hasPaymentLink` is `false`.
  Values:
  - `None`: The invoice carries no payment link.
  - `Live`: The link opens the payment page and accepts a payment.
  - `Expired`: The link's expiry has passed, so it no longer opens the payment page.
  - `Spent`: A payer's attempt used the link up. It no longer opens the payment page. A referral, a pending or submitted authorization and a partial approval always spend the link, because money may already have moved; a decline spends it once its retries run out, or at once when the link does not reopen after a decline.
  - `Revoked`: The link was withdrawn (revoked or cancelled) and no longer opens the payment page.
- `remainingDeclineRetries` (integer(int32)): How many more declined payment attempts the link can absorb and still reopen for the payer.  Null when the link does not reopen after a decline, or when the payment session could not be  read. (nullable)
- `lastAttemptAt` (string(date-time)): When a payer last attempted a payment on the link: the attempt that spent it, or the most  recent declined attempt the link reopened after. Null when no attempt is recorded, or when  the payment session could not be read. (nullable)

## See also

- [All documentation](https://devportal.demo.winkpg.io/llms.txt): the machine-readable index of every public page on this site.
