API Docs

Updating Payment Links

You can update payment links by changing either the currency, the amount, or the status from active to inactive. The response will provide detailed information about the update status and other relevant details.

Headers

  • Authorization: Bearer YOUR_SECRET_KEY
  • Content-Type: application/json

Body Parameters

  • payment_link_id: string (required) - Payment Link ID to be updated.
  • amount: string (optional) - New amount to be charged (e.g., 100.00).
  • currency: string (optional) - New currency code (e.g., USD, ZWG, ZAR).
  • status: string (optional) - New status of the payment link (e.g., active, inactive).

Sample Request to Update a Payment Link

1. Update Payment Link using Payment Link ID

cURL

curl -X PUT "https://api.zuripay.app/v1/links/update" \
-H "Authorization: Bearer zp_test_26PHem9AhJZvU623DfE1x4sd" \
-H "Content-Type: application/json" \
-d '{
  "payment_link_id": "zp_link_1234567890",
  "amount": "150.00"
}'

Python

import requests

url = "https://api.zuripay.app/v1/links/update"

data = {
    "payment_link_id": "zp_link_1234567890",
    "amount": "150.00"
}

headers = {
    "Authorization": "Bearer zp_test_26PHem9AhJZvU623DfE1x4sd",
    "Content-Type": "application/json"
}

response = requests.patch(url, headers=headers, json=data)

if response.status_code == 200:
    print("Payment link updated:", response.json())
else:
    print("Error:", response.status_code, response.text)

Sample Responses

Successful Update (200)

{
    "result": "success",
    "payment_link_id": "zp_link_1234567890",
    "amount": "150.00",
    "currency": "EUR",
    "status": "inactive",
    "message": "Payment link updated successfully."
}

Bad Request (400)

{
    "result": "error",
    "message": "Invalid request parameters."
}

Unauthorized (401)

{
    "result": "error",
    "message": "Unauthorized. Please provide a valid API key."
}

Internal Server Error (500)

{
    "result": "error",
    "message": "Internal server error. Please try again later."
}