curl --request PATCH \
--url https://api.sbx.moduluslabs.io/ecom/v1/checkout/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--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/checkout/{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 = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', '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/checkout/{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/checkout/{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 => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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/checkout/{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("Authorization", "Bearer <token>")
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/checkout/{id}")
.header("Authorization", "Bearer <token>")
.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/checkout/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
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);
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"merchant_branch_reference_number": "SH-ANG-001",
"merchant_branch_name": "SM City Angeles - Branch 1",
"currency": "PHP",
"amount": 150000,
"line_items": [
{
"sku": "PROD-001",
"name": "Wireless Earbuds",
"unit_price": 75000,
"quantity": 2,
"metadata": {}
}
],
"expires_at": "2026-07-18T00:00:00Z",
"hosted_url": "https://pay.moduluslabs.io/checkout/550e8400-e29b-41d4-a716-446655440000",
"successful_payment_count": 3,
"metadata": {},
"created_at": "2026-06-18T10:30:00Z",
"updated_at": "2026-06-18T14:22:00Z",
"description": "Order for wireless earbuds",
"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"
},
"max_uses": 10,
"cancelled_at": "2023-11-07T05:31:56Z",
"cancellation_reason": "<string>"
}
}Update a Payment Link
Update an active payment link by ID
curl --request PATCH \
--url https://api.sbx.moduluslabs.io/ecom/v1/checkout/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--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/checkout/{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 = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', '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/checkout/{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/checkout/{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 => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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/checkout/{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("Authorization", "Bearer <token>")
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/checkout/{id}")
.header("Authorization", "Bearer <token>")
.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/checkout/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
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);
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"merchant_branch_reference_number": "SH-ANG-001",
"merchant_branch_name": "SM City Angeles - Branch 1",
"currency": "PHP",
"amount": 150000,
"line_items": [
{
"sku": "PROD-001",
"name": "Wireless Earbuds",
"unit_price": 75000,
"quantity": 2,
"metadata": {}
}
],
"expires_at": "2026-07-18T00:00:00Z",
"hosted_url": "https://pay.moduluslabs.io/checkout/550e8400-e29b-41d4-a716-446655440000",
"successful_payment_count": 3,
"metadata": {},
"created_at": "2026-06-18T10:30:00Z",
"updated_at": "2026-06-18T14:22:00Z",
"description": "Order for wireless earbuds",
"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"
},
"max_uses": 10,
"cancelled_at": "2023-11-07T05:31:56Z",
"cancellation_reason": "<string>"
}
}ACTIVE links can be updated. Updating a cancelled, expired, or consumed link returns 422 invalid_state.redirect_urls entry can be updated individually without affecting the others.
Fields that cannot be updated
type, currency, amount, line_items, and merchant_branch_reference_number are fixed at creation. To change any of them, create a new payment link.
Constraints
| Field | Constraint |
|---|---|
max_uses | null (unlimited) or greater than the current successful_payment_count |
expires_at | Must be in the future and later than the current expires_at |
metadata | Replaces the entire metadata object |
Required scope
payment_links.updateAuthorizations
API key passed as a bearer token. Use sk_live_ keys for production and sk_test_ keys for sandbox. Keys are provisioned during merchant onboarding.
Path Parameters
The payment link ID (UUID v4).
Body
Include only the fields you want to change. type, currency, amount, line_items, and merchant_branch_reference_number cannot be updated.
Free-form text displayed to the customer.
"Updated order description"
Your internal order reference.
100"ORD-2026-0618-002"
Each URL must use HTTPS. You can update individual URLs without affecting the others.
Show child attributes
Show child attributes
For multi_use links only. Must be null (unlimited) or greater than successful_payment_count.
20
Must be in the future and later than the current expires_at.
"2026-08-18T00:00:00Z"
Replaces the entire metadata object. Max 50 keys, key max 40 characters, value max 500 characters.
Show child attributes
Show child attributes
Response
The updated payment link
The payment link object returned by all endpoints.
Show child attributes
Show child attributes
Was this page helpful?