Skip to main content
PATCH
/
api
/
canary
/
payment-links
/
{id}
Update Payment Link
curl --request PATCH \
  --url http://localhost:3000/api/canary/payment-links/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": {
    "orderId": "12345"
  },
  "active": true,
  "amount": 123,
  "successUrl": "<string>",
  "cancelUrl": "<string>"
}
'
{
  "statusCode": 400,
  "message": [
    "Invalid input data"
  ],
  "error": "Bad Request"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The unique identifier of the payment link

Body

application/json

Payment link update details

metadata
object
required

Optional custom metadata

Example:
{ "orderId": "12345" }
active
boolean

Whether the payment link is active

amount
number
successUrl
string

The URL to redirect to on successful payment

cancelUrl
string

The URL to redirect to if customer cancels

Response

Payment link updated successfully