# Get Payment Link by Payment Link ID

**Method:** `GET`

**Path:** `/api/pay/v1/paymentlink/{payment_link_id}`

**Category:** Payment Links

**Authentication:** Required

## Description

Retrieve payment link details using the Pine Labs payment link identifier.


## Path Parameters

- `payment_link_id` (`string`) **required** — Unique Pine Labs payment link identifier.

## Responses

- `200` — Payment link retrieved successfully.
- `500` — 

### Response Schema

- `payment_link` (`string`) — The payment link URL.
- `payment_link_id` (`string`) — Unique identifier of the payment link in the Pine Labs Online database.
- `status` (`CREATED | CLICKED | PAYMENT_INITIATED | PROCESSED | PARTIAL_PROCESSED | EXPIRED | CANCELLED`) — Payment link status.
- `amount` (`object`) — Monetary amount with currency.
  - `value` (`integer`) **required** — Amount in the smallest currency unit (e.g., paisa for INR).
  - `currency` (`string`) **required** — Three-letter ISO 4217 currency code.

- `amount_due` (`object`) — Monetary amount with currency.
  - `value` (`integer`) **required** — Amount in the smallest currency unit (e.g., paisa for INR).
  - `currency` (`string`) **required** — Three-letter ISO 4217 currency code.

- `order_id` (`string`) — Unique identifier of the order in the Pine Labs Online database.
- `merchant_payment_link_reference` (`string`) — Unique identifier entered while creating a payment link.
- `description` (`string`) — Description message against the payment link.
- `expire_by` (`string`) — Timestamp when the payment link expires.
- `allowed_payment_methods` (`string[]`) — Payment methods offered to the customer.
- `pre_auth` (`boolean`) — The pre-authorization type. true: When pre-authorization is needed. false (default): When pre-authorization is not required. 
- `failure_callback_url` (`string,null`) — URL to redirect customers to a failure page.
- `is_mcc_transaction` (`boolean`) — Identifies the Payment Link type. true: Processed for a MCC transaction. false (default): Processed for a regular transaction. 
- `customer` (`object`) — Customer information for payment link.
  - `email_id` (`string`) — Customer's email address.
  - `first_name` (`string`) — Customer's first name.
  - `last_name` (`string`) — Customer's last name.
  - `customer_id` (`string`) — Unique identifier of the customer in the Pine Labs Online database.
  - `mobile_number` (`string`) — Customer's mobile number.
  - `country_code` (`string`) — Country code of the mobile number.
  - `billing_address` (`object`) — Address details for payment link.
    - `address1` (`string`) — Address line 1.
    - `address2` (`string`) — Address line 2.
    - `address3` (`string`) — Address line 3.
    - `pincode` (`string`) — Pincode of the address.
    - `city` (`string`) — City of the address.
    - `state` (`string`) — State of the address.
    - `country` (`string`) — Country of the address.

  - `shipping_address` (`object`) — Address details for payment link.
    - `address1` (`string`) — Address line 1.
    - `address2` (`string`) — Address line 2.
    - `address3` (`string`) — Address line 3.
    - `pincode` (`string`) — Pincode of the address.
    - `city` (`string`) — City of the address.
    - `state` (`string`) — State of the address.
    - `country` (`string`) — Country of the address.

  - `merchant_customer_reference` (`string`) — Unique identifier of the customer for the request.
  - `gstin` (`string`) — Customer's GSTIN.

- `product_details` (`PaymentLinkProductDetail[]`) — List of products associated with the payment.
  - `product_code` (`string`) — Unique product identifier.
  - `product_amount` (`object`) — Monetary amount with currency.
    - `value` (`integer`) **required** — Amount in the smallest currency unit (e.g., paisa for INR).
    - `currency` (`string`) **required** — Three-letter ISO 4217 currency code.

  - `product_coupon_discount_amount` (`object`) — Monetary amount with currency.
    - `value` (`integer`) **required** — Amount in the smallest currency unit (e.g., paisa for INR).
    - `currency` (`string`) **required** — Three-letter ISO 4217 currency code.


- `split_info` (`object`) — Split settlement information.
  - `split_type` (`string`) — Type of split.
  - `split_details` (`PaymentLinkSplitDetail[]`) — An array of objects that contains the split details.
    - `split_merchant_id` (`string`) — Unique identifier of your partner merchant in the Pine Labs Online database.
    - `merchant_settlement_reference` (`string`) — Unique identifier entered while creating an order in split.
    - `split_settlement_id` (`string`) — Unique identifier of the split settlement in the Pine Labs Online database.
    - `amount` (`object`) — Monetary amount with currency.
      - `value` (`integer`) **required** — Amount in the smallest currency unit (e.g., paisa for INR).
      - `currency` (`string`) **required** — Three-letter ISO 4217 currency code.

    - `on_hold` (`boolean`) — Indicate whether the settlement is on hold for future release. true: The settlement is placed on hold. false: The settlement is processed immediately. 
    - `status` (`RELEASED | HOLD`) — Split Settlement status.
    - `updated_at` (`string`) — ISO 8601 UTC Timestamp when the split order was created.


- `account_details` (`object`) — Customer's bank account details.
  - `bank_details` (`object`) — Bank details for the customer.
    - `account_number` (`string`) — Customer's bank account number.
    - `ifsc_code` (`string`) — Customer's bank IFSC code.
    - `bank_name` (`string`) — Customer's account holding bank name.


- `cart_coupon_discount_amount` (`object`) — Monetary amount with currency.
  - `value` (`integer`) **required** — Amount in the smallest currency unit (e.g., paisa for INR).
  - `currency` (`string`) **required** — Three-letter ISO 4217 currency code.

- `merchant_metadata` (`object`) — Arbitrary key-value pairs for merchant use. Maximum 10 pairs, 256 characters each.
- `created_at` (`string`) — ISO 8601 UTC Timestamp when the payment link was created.
- `updated_at` (`string`) — ISO 8601 UTC Timestamp when the payment link was last updated.

### Example Response

```json
{
  "payment_link": "https://shortener.v2.pinepg.in/PLUTUS/3rh4jtd",
  "payment_link_id": "pl-v1-250306082755-aa-uT0noy",
  "status": "CREATED",
  "amount": {
    "value": 50000,
    "currency": "INR"
  },
  "amount_due": {
    "value": 50000,
    "currency": "INR"
  },
  "order_id": "v1-250131113650-aa-TUzeRY",
  "merchant_payment_link_reference": "link_ref",
  "description": "Order Payment Link",
  "expire_by": "2024-04-30T08:01:32Z",
  "allowed_payment_methods": [
    "NETBANKING"
  ],
  "pre_auth": false,
  "failure_callback_url": null,
  "is_mcc_transaction": true,
  "customer": {
    "email_id": "kevin.bob@example.com",
    "first_name": "Kevin",
    "last_name": "Bob",
    "customer_id": "123456",
    "mobile_number": "9876543210",
    "country_code": "91",
    "billing_address": {
      "address1": "10 Downing Street Westminster London",
      "address2": "Oxford Street Westminster London",
      "address3": "Baker Street Westminster London",
      "pincode": "51524036",
      "city": "Westminster",
      "state": "Westminster",
      "country": "London"
    },
    "shipping_address": {
      "address1": "10 Downing Street Westminster London",
      "address2": "Oxford Street Westminster London",
      "address3": "Baker Street Westminster London",
      "pincode": "51524036",
      "city": "Westminster",
      "state": "Westminster",
      "country": "London"
    },
    "merchant_customer_reference": "customer_reference",
    "gstin": "27AAEPM1234C1Z5"
  },
  "product_details": [
    {
      "product_code": "redmi_10",
      "product_amount": {
        "value": 50000,
        "currency": "INR"
      },
      "product_coupon_discount_amount": {
        "value": 50000,
        "currency": "INR"
      }
    }
  ],
  "split_info": {
    "split_type": "AMOUNT",
    "split_details": [
      {
        "split_merchant_id": "111302",
        "merchant_settlement_reference": "5206071124-aa-mpLhF3-cc-l",
        "split_settlement_id": "71124-aa-mpLhF3-cc-l",
        "amount": {
          "value": 50000,
          "currency": "INR"
        },
        "on_hold": true,
        "status": "RELEASED",
        "updated_at": "2024-07-09T07:57:08.022Z"
      }
    ]
  },
  "account_details": {
    "bank_details": {
      "account_number": "500000004545",
      "ifsc_code": "BANK0000123",
      "bank_name": "Example Bank"
    }
  },
  "cart_coupon_discount_amount": {
    "value": 50000,
    "currency": "INR"
  },
  "merchant_metadata": {
    "clientId": "DD",
    "transactionReferenceNo": "pine-1223",
    "merchantId": "1234",
    "tid": "9000990",
    "acquirerName": "HDFC_FSS",
    "isOfferDisplayRequired": "true",
    "OfferData": "UHJvZHVjdF9Db2RlPSIgIiZQcm9kdWN0X05hbWU9IiImUGF5bWVudF9Nb2RlPUJhbmsgRU1JJkNhcmRfVHlwZT1EZWJpdCBDYXJkJkJhbmtfTmFtZT1IREZDIERlYml0JkVNSV9UZW51cmU9NiZJbnRlcmVzdF9SYXRlPTkuMCZJbnRlcmVzdF9BbW91bnQ9MTM4MTQwJk1vbnRobHlfSW5zdGFsbG1lbnQ9ODk0NjkwJkF1dGhvcml6YXRpb25fQW1vdW50PTEwMCZMb2FuX2Jvb2tpbmdfQW1vdW50PTUyMzAwMDAmSW50ZXJlc3RfQ2FzaGJhY2tfQW1vdW50PTAmSW50ZXJlc3RfQ2FzaGJhY2tfVHlwZT1EZWZlcnJlZCZBZGRpdGlvbmFsX0Nhc2hiYWNrPSIiJkFkZGl0aW9uYWxfQ2FzaGJhY2tfVHlwZT0iIiZEZXNjcmlwdGlvbj1CYW5rIEVNSSZQcm9kdWN0X1ZhbHVlPTUyMzAwMDA",
    "tenant_id": "PGATPOS",
    "is_offer_validation_required": "true"
  },
  "created_at": "2024-07-09T07:57:08.022Z",
  "updated_at": "2024-07-09T07:57:08.022Z"
}
```

---

Reference: https://localhost:3000/api/payment-links/get-payment-link-by-id
