curl --request PATCH \
--url https://api.sbx.moduluslabs.io/ecom/v1/payment-links/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"description": "Updated order description",
"order_reference": "ORD-2026-0618-002",
"redirect_urls": {
"success": "https://merchant.com/v2/success"
},
"max_uses": 20,
"expires_at": "2026-08-18T00:00:00Z",
"metadata": {
"campaign_id": "winter-2026"
}
}
'import requests
url = "https://api.sbx.moduluslabs.io/ecom/v1/payment-links/{id}"
payload = {
"description": "Updated order description",
"order_reference": "ORD-2026-0618-002",
"redirect_urls": { "success": "https://merchant.com/v2/success" },
"max_uses": 20,
"expires_at": "2026-08-18T00:00:00Z",
"metadata": { "campaign_id": "winter-2026" }
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Updated order description',
order_reference: 'ORD-2026-0618-002',
redirect_urls: {success: 'https://merchant.com/v2/success'},
max_uses: 20,
expires_at: '2026-08-18T00:00:00Z',
metadata: {campaign_id: 'winter-2026'}
})
};
fetch('https://api.sbx.moduluslabs.io/ecom/v1/payment-links/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sbx.moduluslabs.io/ecom/v1/payment-links/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Updated order description',
'order_reference' => 'ORD-2026-0618-002',
'redirect_urls' => [
'success' => 'https://merchant.com/v2/success'
],
'max_uses' => 20,
'expires_at' => '2026-08-18T00:00:00Z',
'metadata' => [
'campaign_id' => 'winter-2026'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sbx.moduluslabs.io/ecom/v1/payment-links/{id}"
payload := strings.NewReader("{\n \"description\": \"Updated order description\",\n \"order_reference\": \"ORD-2026-0618-002\",\n \"redirect_urls\": {\n \"success\": \"https://merchant.com/v2/success\"\n },\n \"max_uses\": 20,\n \"expires_at\": \"2026-08-18T00:00:00Z\",\n \"metadata\": {\n \"campaign_id\": \"winter-2026\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.sbx.moduluslabs.io/ecom/v1/payment-links/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Updated order description\",\n \"order_reference\": \"ORD-2026-0618-002\",\n \"redirect_urls\": {\n \"success\": \"https://merchant.com/v2/success\"\n },\n \"max_uses\": 20,\n \"expires_at\": \"2026-08-18T00:00:00Z\",\n \"metadata\": {\n \"campaign_id\": \"winter-2026\"\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.sbx.moduluslabs.io/ecom/v1/payment-links/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-Key", "<api-key>");
request.AddJsonBody("{\n \"description\": \"Updated order description\",\n \"order_reference\": \"ORD-2026-0618-002\",\n \"redirect_urls\": {\n \"success\": \"https://merchant.com/v2/success\"\n },\n \"max_uses\": 20,\n \"expires_at\": \"2026-08-18T00:00:00Z\",\n \"metadata\": {\n \"campaign_id\": \"winter-2026\"\n }\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"type": "ONE_TIME",
"merchant_branch_reference_number": "SH-ANG-001",
"currency": "PHP",
"amount": 150000,
"line_items": [
{
"sku": "PROD-001",
"name": "Wireless Earbuds",
"unit_price": 75000,
"quantity": 2,
"metadata": {}
}
],
"description": "Order for wireless earbuds",
"status": "ACTIVE",
"expires_at": "2026-07-18T00:00:00Z",
"url": "https://pay.sbx.moduluslabs.io/550e8400-e29b-41d4-a716-446655440000",
"max_uses": 10,
"successful_payment_count": 3,
"metadata": {},
"created_at": "2026-06-18T10:30:00Z",
"updated_at": "2026-06-18T14:22:00Z",
"cancelled_at": "2023-11-07T05:31:56Z",
"cancellation_reason": "<string>",
"order_reference": "ORD-2026-0618-001",
"redirect_urls": {
"success": "https://merchant.com/payment/success",
"declined": "https://merchant.com/payment/declined",
"expired": "https://merchant.com/payment/expired"
}
}Update Payment Link
Update an active payment link by ID
curl --request PATCH \
--url https://api.sbx.moduluslabs.io/ecom/v1/payment-links/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"description": "Updated order description",
"order_reference": "ORD-2026-0618-002",
"redirect_urls": {
"success": "https://merchant.com/v2/success"
},
"max_uses": 20,
"expires_at": "2026-08-18T00:00:00Z",
"metadata": {
"campaign_id": "winter-2026"
}
}
'import requests
url = "https://api.sbx.moduluslabs.io/ecom/v1/payment-links/{id}"
payload = {
"description": "Updated order description",
"order_reference": "ORD-2026-0618-002",
"redirect_urls": { "success": "https://merchant.com/v2/success" },
"max_uses": 20,
"expires_at": "2026-08-18T00:00:00Z",
"metadata": { "campaign_id": "winter-2026" }
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: 'Updated order description',
order_reference: 'ORD-2026-0618-002',
redirect_urls: {success: 'https://merchant.com/v2/success'},
max_uses: 20,
expires_at: '2026-08-18T00:00:00Z',
metadata: {campaign_id: 'winter-2026'}
})
};
fetch('https://api.sbx.moduluslabs.io/ecom/v1/payment-links/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sbx.moduluslabs.io/ecom/v1/payment-links/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => 'Updated order description',
'order_reference' => 'ORD-2026-0618-002',
'redirect_urls' => [
'success' => 'https://merchant.com/v2/success'
],
'max_uses' => 20,
'expires_at' => '2026-08-18T00:00:00Z',
'metadata' => [
'campaign_id' => 'winter-2026'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sbx.moduluslabs.io/ecom/v1/payment-links/{id}"
payload := strings.NewReader("{\n \"description\": \"Updated order description\",\n \"order_reference\": \"ORD-2026-0618-002\",\n \"redirect_urls\": {\n \"success\": \"https://merchant.com/v2/success\"\n },\n \"max_uses\": 20,\n \"expires_at\": \"2026-08-18T00:00:00Z\",\n \"metadata\": {\n \"campaign_id\": \"winter-2026\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.sbx.moduluslabs.io/ecom/v1/payment-links/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"Updated order description\",\n \"order_reference\": \"ORD-2026-0618-002\",\n \"redirect_urls\": {\n \"success\": \"https://merchant.com/v2/success\"\n },\n \"max_uses\": 20,\n \"expires_at\": \"2026-08-18T00:00:00Z\",\n \"metadata\": {\n \"campaign_id\": \"winter-2026\"\n }\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.sbx.moduluslabs.io/ecom/v1/payment-links/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("X-API-Key", "<api-key>");
request.AddJsonBody("{\n \"description\": \"Updated order description\",\n \"order_reference\": \"ORD-2026-0618-002\",\n \"redirect_urls\": {\n \"success\": \"https://merchant.com/v2/success\"\n },\n \"max_uses\": 20,\n \"expires_at\": \"2026-08-18T00:00:00Z\",\n \"metadata\": {\n \"campaign_id\": \"winter-2026\"\n }\n}", false);
var response = await client.PatchAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"type": "ONE_TIME",
"merchant_branch_reference_number": "SH-ANG-001",
"currency": "PHP",
"amount": 150000,
"line_items": [
{
"sku": "PROD-001",
"name": "Wireless Earbuds",
"unit_price": 75000,
"quantity": 2,
"metadata": {}
}
],
"description": "Order for wireless earbuds",
"status": "ACTIVE",
"expires_at": "2026-07-18T00:00:00Z",
"url": "https://pay.sbx.moduluslabs.io/550e8400-e29b-41d4-a716-446655440000",
"max_uses": 10,
"successful_payment_count": 3,
"metadata": {},
"created_at": "2026-06-18T10:30:00Z",
"updated_at": "2026-06-18T14:22:00Z",
"cancelled_at": "2023-11-07T05:31:56Z",
"cancellation_reason": "<string>",
"order_reference": "ORD-2026-0618-001",
"redirect_urls": {
"success": "https://merchant.com/payment/success",
"declined": "https://merchant.com/payment/declined",
"expired": "https://merchant.com/payment/expired"
}
}ACTIVE links can be updated. Updating a cancelled, expired, or consumed link returns 409 INVALID_STATE.redirect_urls entry can be updated individually without affecting the others.Authorizations
API key enabled for the requested payment-link operation and associated with an eligible partner, merchant, or branch account.
Path Parameters
The payment link ID (UUID v7).
Body
Include only the fields you want to change. currency, amount, line_items, and merchant_branch_reference_number cannot be updated. type is read-only and derived from max_uses.
New description. A supplied string must contain at least one non-whitespace character and be at most 500 characters. Send null to clear it.
500"Updated order description"
New order reference. String, max 100 characters. null clears it.
100"ORD-2026-0618-002"
Each URL must use HTTPS. Update individual members without changing the others; set a member to null to clear it, or set redirect_urls to null to clear all three.
Show child attributes
Show child attributes
Update the usage cap. Integer >= 1, null means unlimited. Link type is immutable: a ONE_TIME link's max_uses stays 1, and a MULTI_USE link's max_uses cannot be set to 1.
x >= 120
Must be in the future and later than the current expires_at.
"2026-08-18T00:00:00Z"
Merges supplied keys into existing metadata. An empty-string value deletes that key, null clears all metadata, and {} makes no change. Max 50 keys, key max 40 Unicode characters, value max 500 Unicode characters, and max 10,000 serialized bytes.
Show child attributes
Show child attributes
Response
The updated payment link
The payment link object returned by all endpoints.
Unique identifier (UUID v7). Use this in API paths and for tracking.
"550e8400-e29b-41d4-a716-446655440000"
Payment-link usage model. ONE_TIME accepts one successful payment; MULTI_USE can accept multiple successful payments.
ONE_TIME, MULTI_USE Reference number of the branch this link belongs to.
"SH-ANG-001"
ISO 4217 currency code.
"PHP"
Payment amount in the currency's smallest unit (for PHP, centavos). 150000 = PHP 1,500.00.
150000
Items the customer is paying for.
Show child attributes
Show child attributes
Merchant-defined description displayed to the customer.
"Order for wireless earbuds"
Current payment-link lifecycle status.
ACTIVE, CONSUMED, EXPIRED, CANCELLED RFC 3339 timestamp. When the link stops accepting payments.
"2026-07-18T00:00:00Z"
The URL to share with customers. Read-only.
"https://pay.sbx.moduluslabs.io/550e8400-e29b-41d4-a716-446655440000"
Maximum number of successful payments allowed. null means unlimited. ONE_TIME links always have a value of 1.
10
Number of successful payments completed so far.
3
Merchant key-value pairs. Max 50 keys, key max 40 Unicode characters, value max 500 Unicode characters, and max 10,000 serialized bytes.
Show child attributes
Show child attributes
RFC 3339 timestamp. When the link was created.
"2026-06-18T10:30:00Z"
RFC 3339 timestamp. When the link was last modified.
"2026-06-18T14:22:00Z"
RFC 3339 timestamp. When the link was cancelled. null if not cancelled.
Reason for cancellation. null if not cancelled.
500Merchant's internal order reference for reconciliation.
100"ORD-2026-0618-001"
Customer redirect destinations for successful, declined, or expired outcomes. null when no redirects are configured.
Show child attributes
Show child attributes
Was this page helpful?