The product to edit is identified by the
id field in the request body, not by
the {id} segment in the URL path. This endpoint shares the same handler as
Update Payment Link
(POST /payment-links/{id}/update).Authorization
Request Body
Unique identifier of the generic payment link product to edit. This is read
from the request body.
Optional slug that replaces the product’s public URL path. The slug is normally
fixed at creation from the original
name; sending link moves the public URL,
e.g. { "id": "...", "link": "superapp-demo-saas" } answers
data.link: "https://<merchant>.myr.id/pl/superapp-demo-saas".Response
Successful ResponseMain Structure (Root)
data Structure (Object)
Errors
When the request body fails validation, the endpoint responds with HTTP
400
and sets messages to failed, returning the validator errors in data:
{ "statusCode": 400, "messages": "failed", "data": [ ... ] }.Returned when the body carries
id but no updatable field:
{ "statusCode": 400, "messages": "At least one field to update is required" }.
name and amount are optional — the body must contain at least one of
name, description, amount, redirectUrl, link, coverImage,
expiredAt, limit, notes, or tax.For membership-family products (
membership, saas, credit), amount is
required: { "statusCode": 400, "messages": "amount is required to update a membership product" }.Returned when the product does not belong to the authenticated account:
{ "statusCode": 401, "messages": "Unauthorized" }.