Skip to main content
PATCH
Update a payment link

Authorizations

x-api-key
string
header
required

API key for service-to-service or merchant authentication.

Headers

x-correlation-id
string<uuid>

Unique identifier for request tracing. Generated by the client or server if not provided.

Example:

"550e8400-e29b-41d4-a716-446655440000"

x-idempotency-key
string<uuid>

Unique key for idempotent request processing. Duplicate requests with the same key are safely ignored.

Example:

"baf6a8e2-0c89-46ef-9ca5-faa65b99bcd5"

Path Parameters

Unique identifier of the payment link

Example:

"550e8400-e29b-41d4-a716-446655440000"

Body

application/json

Request body for updating a payment link. Every field is optional; send only what should change.

Two kinds of update are supported, and they can be combined in one request:

  1. Status flip — send status to deactivate or reactivate the link. Permitted at any time, including on links that have already been paid.
  2. Field edits — any other field. Rejected with 400 once the link has been used (it has a successful payment or a payment in flight), so a customer can never see terms change mid-flow.

mode, merchant_reference_id and max_uses are immutable after creation.

status
enum<string>

Target status. Only ACTIVEDISABLED is settable here, so this enum is deliberately narrower than the PaymentLinkStatus returned on responses: EXPIRED and PAID are server-controlled and requesting either returns 400. Sending the link's current status is a no-op.

Available options:
ACTIVE,
DISABLED
Example:

"DISABLED"

redirect_urls
object

Where the customer's browser is sent after the hosted checkout completes. Propagated onto every checkout session spawned by this link.

Both URLs must be https:// — the hosted checkout returns the customer to them after a payment, so plaintext destinations are not accepted.

three_ds_required
boolean

Force 3DS authentication for payments made through this link

Example:

true

description
string

Free-form description shown to the customer on the hosted checkout page

Example:

"Invoice"

customer
object

Customer details prefilled on the hosted checkout page. Every field is optional — omit the object entirely to have the customer enter their own details at checkout.

metadata
object

Replaces the stored metadata object wholesale

Example:
channel_id
string

Channel to attribute the link to

Example:

"3d1f9c60-5a72-4e18-b0c4-9a6d2f5e7b13"

expires_at
string<date-time>

ISO 8601 timestamp after which the link stops being payable

Example:

"2026-12-31T23:59:59Z"

amount
integer

Amount in the currency's minor units

Required range: x >= 1
Example:

12500

currency
string

ISO 4217 currency code

Example:

"SAR"

Response

Payment link updated successfully.

A shareable payment link. Sending a customer to hostedUrl spawns a checkout session and redirects them to the hosted checkout page.

Casing note: this response uses camelCase property names, while the create and update request bodies accept snake_case. This is a known divergence from the rest of the Lite API surface, which is snake_case in both directions. The contract documented here is what the service returns today — integrate against camelCase on the response.

id
string<uuid>
required

Unique payment link identifier

Example:

"550e8400-e29b-41d4-a716-446655440000"

publicToken
string
required

Opaque token embedded in hostedUrl. Safe to share with customers — it carries no merchant or amount information.

Example:

"plive_7c9f2a1b8e4d6035"

hostedUrl
string<uri>
required

The customer-facing URL. Opening it consumes a slot on the link, creates a checkout session and redirects the browser to the hosted checkout page. Share this URL directly with customers.

Example:

"https://pay.lite.sa/pay/plive_7c9f2a1b8e4d6035"

merchantId
string<uuid>
required

Merchant that owns the link

Example:

"7f3c8b21-0d4e-4a92-9f65-2b8e1c7a4d30"

mode
enum<string>
required

How many times the link may be paid.

  • SINGLE_USE — exactly one successful payment. The link is promoted to PAID as soon as a payment reaches a terminal successful status.
Available options:
SINGLE_USE
Example:

"SINGLE_USE"

status
enum<string>
required

Lifecycle status of the payment link.

  • ACTIVE — payable.
  • DISABLED — deactivated by the merchant. Reversible via the update endpoint.
  • EXPIREDexpires_at has passed. Applied automatically when the link is read or listed; not settable by the caller.
  • PAID — the usage ceiling has been reached, i.e. the SINGLE_USE link has been paid. Not settable by the caller.

Only ACTIVEDISABLED transitions are accepted on the update endpoint.

Available options:
ACTIVE,
DISABLED,
EXPIRED,
PAID
Example:

"ACTIVE"

amount
integer
required

Amount in the currency's minor units (e.g. 10000 = 100.00 SAR)

Required range: x >= 1
Example:

10000

currency
string
required

ISO 4217 currency code

Example:

"SAR"

usedCount
integer
required

Number of successful payments. Mirrors paidCount.

Example:

2

paidCount
integer
required

Number of payments through this link that reached a successful terminal status

Example:

2

failedCount
integer
required

Number of payments through this link that reached a failed terminal status

Example:

1

createdAt
string<date-time>
required

Timestamp when the link was created

Example:

"2026-06-01T10:30:00.000Z"

updatedAt
string<date-time>
required

Timestamp when the link was last updated

Example:

"2026-06-04T09:12:44.000Z"

merchantReferenceId
string | null

Merchant-supplied reference. Unique per merchant — a second create with the same value is rejected with 409, which prevents duplicate links for one order.

Example:

"order-2026-0042"

redirectUrls
object | null

Post-checkout redirect targets, or null if none were configured

threeDsRequired
boolean | null

Whether 3DS authentication is forced for payments made through this link

Example:

true

description
string | null

Free-form description shown to the customer on the hosted checkout page

Example:

"Invoice"

customer
object | null

Prefilled customer details, or null if none were configured

metadata
object | null

Arbitrary merchant metadata, propagated onto every checkout session spawned by this link

Example:
channelId
string | null

Channel the link is attributed to

Example:

"3d1f9c60-5a72-4e18-b0c4-9a6d2f5e7b13"

expiresAt
string<date-time> | null

When the link stops being payable. Once passed, the link is promoted to EXPIRED on the next read. null means the link never expires.

Example:

"2026-12-31T23:59:59.000Z"

maxUses
integer | null

Ceiling on successful payments. null unless the caller set it explicitly; either way a SINGLE_USE link allows exactly one successful payment.

Example:

1

lastPaidAt
string<date-time> | null

Timestamp of the most recent successful payment, or null if never paid

Example:

"2026-06-04T09:12:44.000Z"