# Payment links concept

A **Payment Link** is a Txn-hosted page that lets your end user select the cryptocurrency and network they want to use before a transaction is created. You create the link via API, send your end user to the `hostedPageUrl`, and Txn handles the rest — creating the child invoice or payout once the user makes their selection.

Payment links work with both invoices and payouts:

* **Invoice payment links** — the end user picks a cryptocurrency to pay with. Txn creates a child invoice and redirects them to the invoice payment page.
* **Payout payment links** — the end user picks a cryptocurrency and submits their wallet address. Txn creates a child payout and sends funds to that address.

## Invoice payment links

<figure><img src="/files/E82QYpykVqh3GwXEBlKZ" alt=""><figcaption></figcaption></figure>

See [Invoices concept](/invoices/invoices-concept.md) and [Invoice status flow](/invoices/invoice-status-flow.md) for details on the child invoice lifecycle.

## Payout payment links

<figure><img src="/files/FQFRudDLbz17dqBVPjli" alt=""><figcaption></figcaption></figure>

See [Payouts concept](/payouts/payouts-concept.md) and [Payout status flow](/payouts/payout-status-flow.md) for details on the child payout lifecycle.

## Payment link status

Payment link status is independent of its child invoice or payout status.

| Status    | Final? | Description                                                                                                                                                                        |
| --------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| created   | No     | The link has been created. The end user has not yet interacted with the hosted page.                                                                                               |
| pending   | No     | The end user has selected a cryptocurrency and triggered a child invoice or payout. Transitions to `completed` on success, or `expired` if the child transaction is not completed. |
| completed | Yes    | The end user successfully initiated a child invoice or payout through the payment link.                                                                                            |
| expired   | Yes    | The payment link expired before the end user completed the flow, or was manually expired via the [Expire Payment Link](/payment-links/expiring-payment-link.md) endpoint.          |

{% hint style="info" %}
**Payment link expiry is independent of child invoice and payout expiry.** A payment link and the invoice or payout it triggers each have their own expiry windows, configured separately.

For example: a payment link is set to expire in 20 minutes, and invoices on your account are configured to expire in 60 minutes. An end user opens the hosted page, selects a cryptocurrency at minute 15 (triggering an invoice with a fresh 60-minute window), and completes payment at minute 25. The payment link will show `expired` — it passed its 20-minute window — while the invoice will show `completed`. This is expected behaviour.

**Always use the child invoice or payout status to determine payment outcome**, not the payment link status. Subscribe to [invoice webhooks](/api-basics/webhooks.md) and [payout webhooks](/payouts/payout-webhooks.md) to receive real-time status updates on the actual transactions.
{% endhint %}

For child invoice and payout statuses:

* [Invoice status flow](/invoices/invoice-status-flow.md)
* [Payout status flow](/payouts/payout-status-flow.md)

## Hosted page examples

### Invoice payment link

The end user selects their preferred cryptocurrency and network:

<figure><img src="/files/C49TX3f5M877aRjDbQUY" alt=""><figcaption></figcaption></figure>

After clicking **Continue**, Txn creates an invoice and redirects the end user to the invoice payment page:

<figure><img src="/files/YaOD9cW1qB6zTtpH8Bcj" alt=""><figcaption></figcaption></figure>

### Payout payment link

The end user selects a cryptocurrency, network, and submits their wallet address:

<figure><img src="/files/AiuEUqyVPpKF6myV5P7m" alt=""><figcaption></figcaption></figure>

After clicking **Continue**, the end user reviews the payout details:

<figure><img src="/files/atvP5eQgB2trqIzOzeql" alt=""><figcaption></figcaption></figure>

After clicking **Confirm**, Txn initiates the cryptocurrency transfer to their wallet:

<figure><img src="/files/8xp1TwaggrguxzhyajaJ" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.txn.io/payment-links/payment-links-concept.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
