Skip to main content
PATCH
/
checkout
/
{id}
Update a payment link
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"
  }
}
'
{
  "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>"
  }
}
Only ACTIVE links can be updated. Updating a cancelled, expired, or consumed link returns 422 invalid_state.
Include only the fields you want to change. Each 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

FieldConstraint
max_usesnull (unlimited) or greater than the current successful_payment_count
expires_atMust be in the future and later than the current expires_at
metadataReplaces the entire metadata object

Required scope

payment_links.update

Authorizations

Authorization
string
header
required

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

id
string<uuid>
required

The payment link ID (UUID v4).

Body

application/json

Include only the fields you want to change. type, currency, amount, line_items, and merchant_branch_reference_number cannot be updated.

description
string

Free-form text displayed to the customer.

Example:

"Updated order description"

order_reference
string

Your internal order reference.

Maximum string length: 100
Example:

"ORD-2026-0618-002"

redirect_urls
object

Each URL must use HTTPS. You can update individual URLs without affecting the others.

max_uses
integer | null

For multi_use links only. Must be null (unlimited) or greater than successful_payment_count.

Example:

20

expires_at
string<date-time>

Must be in the future and later than the current expires_at.

Example:

"2026-08-18T00:00:00Z"

metadata
object

Replaces the entire metadata object. Max 50 keys, key max 40 characters, value max 500 characters.

Response

The updated payment link

data
object
required

The payment link object returned by all endpoints.