Skip to content

Update a link

Change a link's details or price, or archive it to stop taking payments.

Send only what changes. Archive a link with status to stop taking payments while keeping its history, and set it back to active to restore it. A new price applies to checkouts opened after the change.

When 402pay disables a link, for example for breaking the Acceptable Use Policy, it's archived with disabled_at set, and it stays archived until 402pay turns it back on.

Path

  • id string Required
    The link's ID, such as lnk_nt842tPNne3lf0ka.

Body

  • amount string
    The price as a decimal string in currency, with at most two decimal places: "49.00" with USD is $49.00, and "49.5" and "49" are accepted too. A JSON number returns 400 invalid_request. From the equivalent of $1.00 up to 1,000,000.00 in the currency.
  • currency string
    USD, EUR, GBP, CAD, AUD. Defaults to USD.
  • name string
    What the customer is paying for, up to 80 characters. It becomes the description of each payment made through the link, shown on the receipt.
  • description string
    More about it, shown in the checkout's details, up to 300 characters.
  • success_url string
    Where checkout sends the customer after paying, with payment_id added to its query. Use https://; http:// works only for localhost and 127.0.0.1. Defaults to the redirect in your checkout settings, then the receipt.
  • status string
    active or archived. You receive link.archived or link.restored.

Errors

  • 400 invalid_request
    A field is missing, unknown or out of range. field names it.
  • 404 not_found
    No link with that ID belongs to your business.
  • 409 link_disabled
    402pay disabled the link, so status can't go back to active.

Any request can also fail on its key or its body. See errors.

Request
curl -X PATCH "https://api.402pay.co/api/v1/links/lnk_nt842tPNne3lf0ka" \
  -H "Authorization: Bearer $PAY402_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "archived"
  }'
Response200 OK
{
  "data": {
    "id": "lnk_nt842tPNne3lf0ka",
    "kind": "link",
    "code": "v6e4mrczwg",
    "url": "https://checkout.402pay.co/checkout/v6e4mrczwg",
    "name": "Team plan, monthly",
    "description": "Everything in Pro for up to 10 people.",
    "amount": "199.00",
    "currency": "USD",
    "success_url": null,
    "status": "archived",
    "disabled_at": null,
    "payments_count": 1,
    "volume": {
      "amount": "179.10",
      "currency": "USD"
    },
    "created_at": "2026-09-26T21:22:46.992Z",
    "updated_at": "2026-09-26T21:23:16.755Z"
  }
}