# 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.signapay-sbx.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)
- `paymentLinkNotIssuedReason` ([InvoicePaymentLinkNotIssuedReason](https://devportal.signapay-sbx.winkpg.io/docs/api/models/InvoicePaymentLinkNotIssuedReason.md)): Why the invoice holds no payment link: the reason its latest send went out without one, or the reason a later payment withdrew it. Null whenever `hasPaymentLink` is `true`, for an invoice that is not in a sent-and-open status, and when no reason was recorded (an invoice never sent, or a host that could not create links at all). Reason codes are stable and only ever appended; treat one you do not recognize as a generic "no payment link" reason. (nullable)
  Values:
  - `NothingPayable`: The invoice has nothing left to pay.
  - `BillerNotMerchant`: The invoice is not billed by a merchant, so hosted-page ownership cannot be confirmed.
  - `NoDefaultHostedPage`: The invoice names no hosted page and the merchant has no active payment page to default to.
  - `AmbiguousDefaultHostedPage`: The invoice names no hosted page and the merchant has more than one active payment page.
  - `NoPermittedPaymentMethod`: Every payment method the invoice allows is turned off for the merchant.
  - `HostedPageNotFound`: The hosted page the invoice targets was not found for the invoice's merchant. Covers a deleted page and a page that belongs to another merchant alike, by design.
  - `HostedPageInactive`: The hosted page the invoice targets is inactive.
  - `SessionRejected`: The hosted page refused the payment session for another reason; the metadata carries the stable error code.

## See also

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