Payment Link
Payment Link is a hosted payment link product. Merchants create a shareable payment link through the API and send it to buyers or embed it in their own business flow. Buyers open the link and complete payment on the Onerway hosted checkout page.
Use Payment Link when you need to:
- Generate a payment link without building a full checkout page.
- Send a payment entry through email, customer service, social channels, or an order detail page.
- Query Payment Link visits, successful payment count, and successful payment amount.
- Disable a Payment Link that should no longer be used.
API List
| Action | Endpoint | Description |
|---|---|---|
| Create Payment Link | POST /v1/txn/paymentLink/add | Create a payment link and return id and linkUrl. |
| Query Payment Links | POST /v1/txn/paymentLink/list | Query payment links by status, keyword, or creation time with pagination. |
| Update Payment Link Status | POST /v1/txn/paymentLink/updateStatus | Enable or disable a Payment Link. |
Create Payment Link
Use this API to create a Payment Link. When creation succeeds, the response returns the Payment Link ID and the checkout URL that buyers can open.
Request Parameters
Note
- All
JSONfields must be stringified before submission - Nested objects must be serialized to
JSONstring format JSONfields must not contain unescaped special characters- Arrays in
JSONshould be properly formatted - Example of
JSONstring field:
{
"object": "{\"obj-key1\":\"v1\",\"obj-key2\":\"v2\"}",
"complex": "{\"k1\":\"v1\",\"array\":\"[{\\\"obj-key3\\\":\\\"v3\\\",\\\"obj-key4\\\":\\\"v4\\\"}]\"}"
}2
3
4
| Parameter | Type | Length | Required | Signed | Description |
|---|---|---|---|---|---|
merchantNo | String | 20 | Yes | Yes | Merchant number assigned by |
linkName | String | / | No | Yes | Display name of the Payment Link. Use a clear name that helps identify the link in list queries and merchant operations. |
amount | BigDecimal | / | Yes | Yes | Payment amount in the specified currency. |
currency | String | 8 | Yes | Yes | |
defaultCountry | String | / | Yes | Yes | Default country or region code used by the Payment Link checkout page. |
itemName | String | / | Yes | Yes | Product or service name shown to the buyer on the Payment Link checkout page. |
description | String | / | No | Yes | Product or service description shown with the Payment Link. Keep it concise and buyer-facing. |
collectEmail | Boolean | / | No | Yes | Whether the Payment Link checkout page should collect the buyer email address. |
collectName | Boolean | / | No | Yes | Whether the Payment Link checkout page should collect the buyer name. |
sign | String | / | Yes | No | Digital signature string for request verification and security. Please refer to Signature for signature generation method. |
Response
| Name | Type | Description |
|---|---|---|
respCode | String | Response code from |
respMsg | String | Response message from |
data | Object | Response data. Refer to object data |
data
| Name | Type | Description |
|---|---|---|
id | String | Payment Link ID. |
linkUrl | String | Payment Link checkout URL. |
API Usage Examples
{
"merchantNo": "800209",
"linkName": "Membership Renewal",
"amount": 99.99,
"currency": "USD",
"defaultCountry": "US",
"itemName": "Membership",
"description": "Annual membership renewal",
"collectEmail": true,
"collectName": true,
"sign": "a1b2c3d4e5f6..."
}2
3
4
5
6
7
8
9
10
11
12
{
"respCode": "20000",
"respMsg": "Success",
"data": {
"id": "100",
"linkUrl": "https://pay.example.com/payment-link/pl_100"
}
}2
3
4
5
6
7
8
Query Payment Links
Use this API to query Payment Links with pagination. You can filter by status, keyword, and creation time.
Request Parameters
Note
- All
JSONfields must be stringified before submission - Nested objects must be serialized to
JSONstring format JSONfields must not contain unescaped special characters- Arrays in
JSONshould be properly formatted - Example of
JSONstring field:
{
"object": "{\"obj-key1\":\"v1\",\"obj-key2\":\"v2\"}",
"complex": "{\"k1\":\"v1\",\"array\":\"[{\\\"obj-key3\\\":\\\"v3\\\",\\\"obj-key4\\\":\\\"v4\\\"}]\"}"
}2
3
4
| Parameter | Type | Length | Required | Signed | Description |
|---|---|---|---|---|---|
merchantNo | String | 20 | Yes | Yes | Merchant number assigned by |
linkStatus | Integer | / | No | Yes | Payment Link status filter. |
keywords | String | / | No | Yes | Keyword filter. Supports fuzzy matching by Payment Link ID or item name. |
startTime | String | / | No | Yes | Start time for filtering Payment Links by creation time. |
endTime | String | / | No | Yes | End time for filtering Payment Links by creation time. |
current | Long | / | No | Yes | Page number for list queries. |
size | Long | / | No | Yes | Page size for list queries. |
sign | String | / | Yes | No | Digital signature string for request verification and security. Please refer to Signature for signature generation method. |
Response
| Name | Type | Description |
|---|---|---|
respCode | String | Response code from |
respMsg | String | Response message from |
data | Object | Response data. Refer to object data |
data
| Name | Type | Description |
|---|---|---|
records | Array | Payment Link records on the current page. See records for field details. |
total | String | Total number of records. |
size | String | Page size returned by the query. |
current | String | Current page number returned by the query. |
records
| Name | Type | Description |
|---|---|---|
id | String | Payment Link ID. |
linkUrl | String | Payment Link checkout URL. |
merchantNo | String | Merchant number assigned by Onerway. |
linkName | String | Display name of the Payment Link. |
amount | String | Payment Link amount. |
currency | String | Payment Link currency. See ISO 4217. |
defaultCountry | String | Default country or region code configured for the Payment Link. |
itemName | String | Product or service name. |
description | String | Product or service description. |
linkStatus | Integer | Payment Link status. |
createTime | String | Creation time. Format: |
visitCount | String | Number of visits to the Payment Link. |
payCount | String | Number of successful payments completed through the Payment Link. |
successAmount | String | Total successful payment amount collected through the Payment Link. |
API Usage Examples
{
"merchantNo": "800209",
"linkStatus": 1,
"keywords": "Membership",
"startTime": "2026-05-01 00:00:00",
"endTime": "2026-05-25 23:59:59",
"current": 1,
"size": 10,
"sign": "a1b2c3d4e5f6..."
}2
3
4
5
6
7
8
9
10
{
"respCode": "20000",
"respMsg": "Success",
"data": {
"records": [
{
"id": "100",
"linkUrl": "https://pay.example.com/payment-link/pl_100",
"merchantNo": "800209",
"linkName": "Membership Renewal",
"amount": "99.99",
"currency": "USD",
"defaultCountry": "US",
"itemName": "Membership",
"description": "Annual membership renewal",
"linkStatus": 1,
"createTime": "2026-05-25 10:00:00",
"visitCount": "20",
"payCount": "5",
"successAmount": "499.95"
}
],
"total": "1",
"size": "10",
"current": "1"
}
}2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Update Payment Link Status
Use this API to enable or disable a Payment Link. After a link is disabled, buyers should no longer use it to complete payment.
Request Parameters
Note
- All
JSONfields must be stringified before submission - Nested objects must be serialized to
JSONstring format JSONfields must not contain unescaped special characters- Arrays in
JSONshould be properly formatted - Example of
JSONstring field:
{
"object": "{\"obj-key1\":\"v1\",\"obj-key2\":\"v2\"}",
"complex": "{\"k1\":\"v1\",\"array\":\"[{\\\"obj-key3\\\":\\\"v3\\\",\\\"obj-key4\\\":\\\"v4\\\"}]\"}"
}2
3
4
| Parameter | Type | Length | Required | Signed | Description |
|---|---|---|---|---|---|
id | Long | / | Yes | Yes | Payment Link ID returned by the create or list API. |
linkStatus | Boolean | / | Yes | Yes | Target Payment Link status. |
merchantNo | String | 20 | Yes | Yes | Merchant number assigned by |
sign | String | / | Yes | No | Digital signature string for request verification and security. Please refer to Signature for signature generation method. |
Response
| Name | Type | Description |
|---|---|---|
respCode | String | Response code from |
respMsg | String | Response message from |
data | Object | Response data. Refer to object data |
When the update succeeds, data is usually null.
API Usage Examples
{
"id": 100,
"linkStatus": false,
"merchantNo": "800209",
"sign": "a1b2c3d4e5f6..."
}2
3
4
5
6
{
"respCode": "20000",
"respMsg": "Success",
"data": null
}2
3
4
5
Common Response Codes
| Response Code | Response Message | Scenario |
|---|---|---|
20000 | Success | Request succeeded. |
50134 | Too many requests | The create or list API hit a rate limit. |
55058 | Payment link not found. | The specified Payment Link does not exist when updating status. |
55059 | Payment link does not belong to this merchant. | The specified Payment Link does not belong to the current merchant when updating status. |
Other errors may be returned for signature verification, IP allowlist, permission validation, or downstream system mappings. Use the actual API response as the source of truth.
Best Practices
- Store the returned
idafter creating a Payment Link for later query and status management. - Before sharing
linkUrlwith buyers, confirm that the amount, currency, and item information are correct. - Use
linkStatus=falseto disable links that are no longer used or have expired. - Do not rely only on page visits to determine payment results. Reconcile using Payment Link payment statistics, transaction queries, or webhook results.