> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xpaycheckout.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Payment Links

> Create shareable payment links for one-time and subscription payments with xPay's flexible payment link solution.

## What are Payment Links?

Payment Links are standalone web pages that allow customers to make payments through shareable URLs. They provide a complete payment experience without requiring any technical integration, making them ideal for businesses that want to start accepting payments quickly.

## Types of Payment Links

<Tabs>
  <Tab title="One-Time Payment Links">
    <p>Perfect for individual transactions, one-time payment links are ideal for single purchases and immediate payments.</p>

    <Card title="Key Features">
      <ul>
        <li><strong>Unique Short URLs</strong> - Short URLs for easy sharing</li>
        <li><strong>Multiple Payment Methods</strong> - Support for cards, digital wallets, and more</li>
        <li><strong>Configurable Expiry</strong> - Set custom expiration dates for your links</li>
        <li><strong>Multi-Use Limits</strong> - Control how many times a link can be used</li>
        <li><strong>Product Page</strong> - Display product details and images</li>
        <li><strong>Email Notifications</strong> - Automatic notifications for payment events</li>
      </ul>
    </Card>

    #### Link Statuses

    <ul>
      <li style={{ fontSize: '0.875rem' }}><strong>ACTIVE</strong> - Link is available for payment</li>
      <li style={{ fontSize: '0.875rem' }}><strong>COMPLETED</strong> - Payment has been successfully processed</li>
      <li style={{ fontSize: '0.875rem' }}><strong>EXPIRED</strong> - Link has expired or been manually expired</li>
    </ul>
  </Tab>

  <Tab title="Subscription Payment Links">
    <p>Designed for recurring billing, subscription payment links create ongoing payment relationships with customers.</p>

    <Card title="Key Features">
      <ul>
        <li><strong>Flexible Billing Cycles</strong> - Daily, weekly, monthly, yearly intervals</li>
        <li><strong>Trial Periods</strong> - Support for free trials and promotional periods</li>
        <li><strong>Upfront Payments</strong> - Optional initial charges with subscription setup</li>
        <li><strong>Multi-Use Limits</strong> - Control how many subscriptions can be created</li>
        <li><strong>Automated Billing</strong> - Handles recurring charges automatically</li>
        <li><strong>Subscription Management</strong> - Complete lifecycle management</li>
      </ul>
    </Card>

    #### Link Statuses

    <ul>
      <li style={{ fontSize: '0.875rem' }}><strong>ACTIVE</strong> - Link is available for subscription creation</li>
      <li style={{ fontSize: '0.875rem' }}><strong>COMPLETED</strong> - Subscription has been successfully created</li>
      <li style={{ fontSize: '0.875rem' }}><strong>EXPIRED</strong> - Link has expired or been manually expired</li>
    </ul>
  </Tab>
</Tabs>

## Product Page

Enhance your payment links with rich product details to increase conversion rates and provide customers with comprehensive information about what they're purchasing. You can add product details both through the dashboard interface or programmatically via API.

### Add Product Details

<p>Include product information when generating payment links to create more engaging and informative payment pages:</p>

<Tabs>
  <Tab title="Dashboard Interface">
    <p>Use the xPay dashboard to easily add product details:</p>

    <ol>
      <li>Navigate to the Payment Links section in your <Link href="https://app.xpaycheckout.com/payments">dashboard</Link></li>
      <li>Click `New Payment Link` or `New Subscription Link`</li>
      <li>Enter your amount and currency and click on `Advanced Options`</li>
      <li>Click on `Create Product Page` checkbox and fill in the product details including name and description. You can also limit the number of times the link can be used.</li>
      <li>Configure other link settings and generate</li>
    </ol>
  </Tab>

  <Tab title="API Integration">
    <p>Add product details programmatically using the <code>productPage</code> object in your API request:</p>

    <CodeGroup>
      <CodeGroupItem title="One-Time Payment Link">
        ```json theme={null}
        {
          "productPage": {
            "name": "Premium Subscription",
            "description": "Access to premium features and content"
          }
        }
        ```
      </CodeGroupItem>

      <CodeGroupItem title="Subscription Payment Link">
        ```json theme={null}
        {
          "productPage": {
            "name": "Monthly Membership",
            "description": "Unlimited access to all premium content and features"
          }
        }
        ```
      </CodeGroupItem>
    </CodeGroup>

    <Card title="API Parameters">
      <ul>
        <li><strong>productPage.name</strong> (required) - Product name between 2-100 characters</li>
        <li><strong>productPage.description</strong> (optional) - Product description up to 500 characters</li>
      </ul>
    </Card>
  </Tab>
</Tabs>

## Email Notifications

<ul>
  <li><strong>Link Generation</strong> - Notify customers when links are created (if email provided)</li>
  <li><strong>Payment Success</strong> - Confirm successful payments to customers</li>
  <li><strong>Payment Failure</strong> - Alert customers about failed payments</li>
  <li><strong>Subscription Updates</strong> - Notify about subscription status changes</li>
  <li><strong>Merchant Notifications</strong> - Real-time updates for all payment events</li>
</ul>

***

## Getting Started

Ready to create your first payment link? Follow our step-by-step guide:

<Columns cols={2}>
  <Card title={<div><Icon icon="link" /> &nbsp; Generate One-Time Link </div>} href="/developer-resources/endpoints/payment-links/generate-link" />

  <Card title={<div><Icon icon="repeat" /> &nbsp; Generate Subscription Link </div>} href="/developer-resources/endpoints/payment-links/subscription-link" />
</Columns>
