> ## 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.

# Payment Link Webhook

> Real-time notifications when a payment is completed through a payment link. Includes transaction details, customer information, and payment method used.

<Note>
  **Money In Operation** — This webhook fires when a customer completes a payment via a Payment Link, transferring funds into your SingaPay account.
</Note>

## Information

<div className="overflow-x-auto">
  | Method                                                                                                              | Path                                | Format | Authentication        |
  | ------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------ | --------------------- |
  | <span className="inline-flex items-center px-2 py-0.5 rounded text-xs font-bold bg-blue-500 text-white">POST</span> | `https://your-webhook-url/callback` | json   | HMAC SHA512 Signature |
</div>

SingaPay sends a `POST` request to your configured `transaction_notif_url` when a Payment Link transaction is successfully completed.

For optional view and expiry notifications (when someone opens a link), see [Payment Link Inquiry](/api-reference/webhooks/payment-link-inquiry).

<Info>
  This webhook may share a callback URL with other event types. See [Shared webhook endpoints](/api-reference/webhooks/shared-endpoints) for routing by `event` value.
</Info>

***

## Request Details

### Headers

| Field          | Value              | Type         | Mandatory | Description                                                                               |
| -------------- | ------------------ | ------------ | :-------: | ----------------------------------------------------------------------------------------- |
| `Content-Type` | `application/json` | Alphabetic   |    Yes    | Specifies JSON format for the request body                                                |
| `X-PARTNER-ID` | —                  | Alphanumeric |    Yes    | Your API Key from the merchant dashboard. Example: `b3ed7d4b-a96c-6c08-b3c7-12c3124242d9` |

***

### Body Parameters

<ParamField body="status" type="number" required>
  HTTP Status Code. Example: `200`
</ParamField>

<ParamField body="success" type="boolean" required>
  `true` for 2xx responses, `false` for 4xx–5xx.
</ParamField>

<ParamField body="data" type="object" required>
  Container for transaction, customer, and payment details.

  <Expandable title="data fields">
    <ParamField body="transaction" type="object" required>
      Transaction details.

      <Expandable title="transaction fields">
        <ParamField body="reff_no" type="string" required>
          Unique transaction reference number (26 chars). Example: `"18917720251110094037705"`
        </ParamField>

        <ParamField body="type" type="string" required>
          Transaction type. Always `"pl"` for Payment Link.
        </ParamField>

        <ParamField body="status" type="string" required>
          Transaction status. See [Transaction Status Codes](#transaction-status-codes). Example: `"paid"`
        </ParamField>

        <ParamField body="amount" type="object" required>
          Transaction amount details.

          <Expandable title="amount fields">
            <ParamField body="value" type="string" required>Transaction amount. Example: `"10000.00"`</ParamField>
            <ParamField body="currency" type="string" required>ISO 4217 currency code. Example: `"IDR"`</ParamField>
          </Expandable>
        </ParamField>

        <ParamField body="tip" type="mixed">
          Tip amount if any. `null` if no tip was added.
        </ParamField>

        <ParamField body="post_timestamp" type="string" required>
          Transaction post time. Example: `"10 Nov 2025 09:46:38"`
        </ParamField>

        <ParamField body="processed_timestamp" type="string" required>
          Transaction processed time. Example: `"10 Nov 2025 09:46:38"`
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="customer" type="object" required>
      Customer details.

      <Expandable title="customer fields">
        <ParamField body="id" type="mixed">
          Customer unique ID. `null` if the customer is not registered.
        </ParamField>

        <ParamField body="name" type="string" required>Customer full name. Example: `"Mohammad Zulkifli Katili"`</ParamField>
        <ParamField body="email" type="string" required>Customer email address. Example: `"mohzulkilfikatili@gmail.com"`</ParamField>
        <ParamField body="phone" type="string" required>Customer phone number. Example: `"082291501085"`</ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="payment" type="object" required>
      Payment method details.

      <Expandable title="payment fields">
        <ParamField body="method" type="string" required>
          Payment method. Always `"payment_link"`.
        </ParamField>

        <ParamField body="additional_info" type="object" required>
          Payment Link-specific information.

          <Expandable title="additional_info fields">
            <ParamField body="payment_link" type="object" required>
              Payment link metadata.

              <Expandable title="payment_link fields">
                <ParamField body="id" type="number" required>Payment link ID. Example: `189`</ParamField>
                <ParamField body="reff_no" type="string" required>Payment link reference number. Example: `"PL20251105160923690b1443a67e9"`</ParamField>
                <ParamField body="title" type="string" required>Payment link title. Example: `"tes"`</ParamField>
                <ParamField body="payment_date" type="string" required>Payment completion datetime (ISO 8601). Example: `"2025-11-05T09:09:49.000000Z"`</ParamField>
                <ParamField body="payment_url" type="string" required>Full payment link URL.</ParamField>
                <ParamField body="status" type="string" required>Payment link status. Example: `"open"`</ParamField>
                <ParamField body="required_customer_detail" type="boolean" required>Whether customer details are required at checkout. Example: `true`</ParamField>
                <ParamField body="max_usage" type="number" required>Maximum number of times the link can be used. Example: `1000`</ParamField>
                <ParamField body="current_usage" type="number" required>Current number of times the link has been used. Example: `4`</ParamField>
                <ParamField body="expired_at" type="string">Payment link expiration datetime. `null` if no expiry is set.</ParamField>
                <ParamField body="total_amount" type="string" required>Payment link total amount. Example: `"10000.00"`</ParamField>
                <ParamField body="account_id" type="number" required>Account ID associated with the payment link. Example: `35`</ParamField>
                <ParamField body="created_at" type="string" required>Creation datetime (ISO 8601). Example: `"2025-11-05T09:09:49.000000Z"`</ParamField>
                <ParamField body="updated_at" type="string" required>Last updated datetime (ISO 8601). Example: `"2025-11-10T02:46:38.000000Z"`</ParamField>
              </Expandable>
            </ParamField>
          </Expandable>
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

***

### Payload Examples

<CodeGroup>
  ```json Success theme={null}
  {
      "status": 200,
      "success": true,
      "data": {
          "transaction": {
              "reff_no": "18917720251110094037705",
              "type": "pl",
              "status": "paid",
              "amount": {
                  "value": "10000.00",
                  "currency": "IDR"
              },
              "tip": null,
              "post_timestamp": "10 Nov 2025 09:46:38",
              "processed_timestamp": "10 Nov 2025 09:46:38"
          },
          "customer": {
              "id": null,
              "name": "Mohammad Zulkifli Katili",
              "email": "mohzulkilfikatili@gmail.com",
              "phone": "082291501085"
          },
          "payment": {
              "method": "payment_link",
              "additional_info": {
                  "payment_link": {
                      "id": 189,
                      "reff_no": "PL20251105160923690b1443a67e9",
                      "title": "tes",
                      "payment_date": "2025-11-05T09:09:49.000000Z",
                      "payment_url": "https://sandbox-paymentlink.singapay.id/b2b/PL20251105160923690b1443a67e9",
                      "status": "open",
                      "required_customer_detail": true,
                      "max_usage": 1000,
                      "current_usage": 4,
                      "expired_at": null,
                      "total_amount": "10000.00",
                      "account_id": 35,
                      "created_at": "2025-11-05T09:09:49.000000Z",
                      "updated_at": "2025-11-10T02:46:38.000000Z"
                  }
              }
          }
      }
  }
  ```

  ```json Unauthorized (401) theme={null}
  {
      "status": 401,
      "success": false,
      "error": {
          "code": 401,
          "message": "Unauthorized partner, please sign in"
      }
  }
  ```
</CodeGroup>

***

## Transaction Status Codes

|   Status  | Description                    |
| :-------: | ------------------------------ |
|   `paid`  | Payment completed successfully |
| `pending` | Payment is pending             |
| `expired` | Payment link has expired       |
|  `failed` | Payment has failed             |

***

## Event Description

This webhook fires when a payment is successfully completed through a payment link. The payload covers:

<CardGroup cols={2}>
  <Card title="Transaction Details" icon="receipt">
    Reference number, type, status, amount, and timestamps.
  </Card>

  <Card title="Customer Info" icon="user">
    Name, email, and phone number of the paying customer.
  </Card>

  <Card title="Payment Link Metadata" icon="link">
    Usage count, expiry, status, URL, and creation timestamps.
  </Card>

  <Card title="Payment Method" icon="credit-card">
    Method used (`payment_link`) and all associated additional info.
  </Card>
</CardGroup>

***

***

## Security and responses

Return HTTP `200` promptly after validating the request. For retry behavior, see [Webhook retry mechanism](/api-reference/webhooks/retry-mechanism).

Verify every webhook using [Security and signature validation](/api-reference/webhooks/security-and-signature). Use your configured callback path when building `StringToSign`.

Handle duplicate deliveries idempotently using stable identifiers from the payload (for example `transaction_id` or `reff_no`).
