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

# Overview

> Create shareable payment URLs that accept multiple payments over time, across VA, QRIS, and E-Wallet — all tracked as individual Payment Link Histories.

Payment Link lets you generate a single reusable URL that customers can use to complete payments. Each payment made through the link is recorded separately as a **Payment Link History**, giving you a clean audit trail per transaction.

<CardGroup cols={3}>
  <Card title="Reusable URL" icon="link">
    One link can receive unlimited payments, each tracked independently.
  </Card>

  <Card title="Multi-method" icon="credit-card">
    Supports VA (BRI, BNI, BCA, Maybank, Danamon), QRIS, and E-Wallet.
  </Card>

  <Card title="Shareable" icon="share-nodes">
    Send via WhatsApp, email, or SMS — no redirect flow needed.
  </Card>
</CardGroup>

***

## Payment Link flow

```mermaid theme={null}
sequenceDiagram
  autonumber
  participant M as Merchant System
  participant S as SingaPay API
  participant C as Customer
  participant P as Payment Provider

  M->>S: POST /payment-link-manage/{account_id}
  Note over M,S: Create link with items & amount
  S-->>M: Payment URL (e.g. singapay.com/b2b/INV-001)

  M->>C: Share payment URL
  Note over M,C: WhatsApp, email, or SMS

  C->>S: Open payment page
  C->>S: Select payment method (VA / QRIS / E-Wallet)
  C->>P: Complete payment

  P->>S: Payment notification
  S->>S: Create Payment Link History (pending → paid)
  S-->>M: Webhook notification (optional)

  M->>S: GET /payment-link-histories/{account_id}
  Note over M,S: Track all payments
```

***

## Payment Link vs Payment Link History

Understanding the parent-child relationship is key to using this API correctly.

<CardGroup cols={2}>
  <Card title="Payment Link (Parent)" icon="file-invoice">
    **Reusable and configurable.** Defines what is being paid for.

    * Reusable payment URL
    * Contains items and pricing
    * Optional payment method whitelist
    * Configurable usage limit and expiration
  </Card>

  <Card title="Payment Link History (Child)" icon="clock-rotate-left">
    **Per-payment record.** Created every time a customer pays.

    * Individual payment records
    * Each has its own payment method
    * Tracks status and settlement
    * One link → multiple histories
  </Card>
</CardGroup>

<Info>
  **Example:** Payment Link `INV-001` receives 3 payments via VA BRI, QRIS, and GoPay → 3 separate Payment Link History records are created, each with its own status and settlement data.
</Info>

***

## Important notes

<AccordionGroup>
  <Accordion title="One link, multiple payments" icon="arrows-rotate">
    A single Payment Link can receive multiple payments over its lifetime. Each payment is independently tracked as a Payment Link History record — including its own payment method, status, and settlement info.
  </Accordion>

  <Accordion title="Payment method whitelist" icon="filter">
    You can restrict which payment methods are available per link. For example, allow only VA BRI and QRIS, and hide E-Wallet options entirely.
  </Accordion>

  <Accordion title="Customer detail collection" icon="address-card">
    Optionally require customers to submit their name, email, and phone number before proceeding to payment — useful for invoicing and event registrations.
  </Accordion>

  <Accordion title="Usage limit and expiration" icon="hourglass">
    Control how many times a link can be used with `max_usage`, and set an optional `expired_at` to prevent payments after a certain date.
  </Accordion>

  <Accordion title="Cannot delete a link with histories" icon="lock">
    Once a Payment Link has received at least one payment, it cannot be deleted. This preserves the integrity of your transaction history.
  </Accordion>

  <Accordion title="Item details" icon="list">
    Include an itemized breakdown (name, quantity, unit price) in each link for better customer experience and cleaner accounting records.
  </Accordion>
</AccordionGroup>

***

## Use cases

<CardGroup cols={2}>
  <Card title="Invoicing" icon="file-invoice-dollar">
    Send payment links to customers for invoice payments via email or WhatsApp — no checkout page needed.
  </Card>

  <Card title="E-Commerce checkout" icon="bag-shopping">
    Use as a lightweight checkout alternative without a complex frontend integration.
  </Card>

  <Card title="Donations & crowdfunding" icon="hand-holding-heart">
    Accept contributions from multiple donors using a single persistent link.
  </Card>

  <Card title="Event registration" icon="calendar-check">
    Collect payments for event tickets with usage limits to cap the number of attendees.
  </Card>
</CardGroup>

***

## Available endpoints

<CardGroup cols={2}>
  <Card title="List Payment Links" icon="list" href="./list">
    Paginated list of payment links for an account.
  </Card>

  <Card title="List Available Payment Methods" icon="credit-card" href="./list-payment-methods">
    Active methods that support payment links.
  </Card>

  <Card title="Create Payment Link" icon="plus" href="./create">
    Generate a new payment link with items and configuration.
  </Card>

  <Card title="Show Payment Link" icon="eye" href="./show">
    Retrieve a single payment link by ID.
  </Card>

  <Card title="Update Payment Link" icon="pen" href="./update">
    Update mutable fields on an existing link.
  </Card>

  <Card title="Delete Payment Link" icon="trash" href="./delete">
    Delete a link that has no payment history.
  </Card>
</CardGroup>

<Note>
  All endpoints require authentication. See [Authentication](/api-reference/authentication).
</Note>
