# API create PaymentLink

Endpoint URL for UAT:<https://uat-pms.galaxypay.vn/api-ex/payment-link/create>

#### Request Message

```

curl --location 'https://uat-pms.galaxypay.vn/api-ex/qrpayment/create' \
--header 'X-Caller: YOUR_CALLER_ID' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'X-Signature: c9656c694bba19c50df209d74686cc19d4f3569709e6e7d65452a8b5cd62d90a' \
--header 'Content-Type: application/json' \
--header 'Cookie: SESSION=ZGJhNjEwODYtZTE5Mi00NTg0LTlhY2MtZGU5ODBjMzkxZWQw' \
--data '{
  "amount": 112000,
  "linkName":"Thanh toán hoá đơn ORDER123",
  "requestId":"cd80bae6-3d24-44a8-9760-71b3e17fe27c",
  "description": "Thanh toán hoá đơn",
  "expiryDuration": 3,
  "paymentMethod": [
    "GPAY",
    "MPGS",
    "QRPAY",
    "MOMO",
    "ZALOPAY",
    "NAPAS"
  ],
  "customerField": [
    "email",
    "fullname",
    "phone",
    "shippingAddress"
  ],
    "orderReference": "TS1909",
    "ipnUrl":"https://abc.com/api/ipn/123"
}'

```

#### Body

<table><thead><tr><th width="92">Level</th><th>Field Name</th><th>Data Type</th><th>Description</th></tr></thead><tbody><tr><td>1</td><td>amount</td><td>Numeric(16)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Transaction amount</td></tr><tr><td>1</td><td>linkName</td><td>Alphanumeric<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Name of payment link, it show in portal</td></tr><tr><td>1</td><td>requestId</td><td>Alphanumeric(50)<br><em><mark style="color:blue;">mandatory</mark></em></td><td><p>Unique ID for each transaction request</p><p><strong>Recommend</strong>: GUID</p></td></tr><tr><td>1</td><td>description</td><td>Alphanumeric(250)<br><em><mark style="color:blue;">mandatory</mark></em></td><td>A brief description of the Payment Link</td></tr><tr><td>1</td><td>expiryDuration</td><td>Numeric<br><em><mark style="color:blue;">mandatory</mark></em></td><td>Number of days at which the Payment Link expired.</td></tr><tr><td>1</td><td>paymentMethod</td><td>Alphanumeric<br><em><mark style="color:blue;">mandatory</mark></em></td><td>List of payment method:<br>"GPAY", "MPGS", "QRPAY", "MOMO", "ZALOPAY", "NAPAS"</td></tr><tr><td>1</td><td>customerField</td><td>Alphanumeric<br><em><mark style="color:blue;">optional</mark></em></td><td>Collect additional information from your customer using custom fields. Up to 4 fields are supported.</td></tr><tr><td>1</td><td>orderReference</td><td>Alphanumeric<br><em><mark style="color:blue;">optional</mark></em></td><td>Reference number tagged to a Payment Link</td></tr><tr><td>1</td><td>ipnUrl</td><td>Alphanumeric<br><em><mark style="color:blue;">optional</mark></em></td><td>IPN URL</td></tr></tbody></table>

#### Body

#### Response Message

```
{
    "requestId": "cd80bae6-3d24-44a8-9760-71b3e17fe27c",
    "responseDateTime": "20230227231841",
    "responseCode": "200",
    "responseData": {
          "shortLink": "https://uat-s.galaxypay.vn/PFwP2YsLoyuwoXeF7",
          "orderNo": "9354202307051688550745270"
    }
}
```


---

# 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.galaxypay.vn/upc/archive/api-create-paymentlink.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.
