Modify the sales statistics of an existing payment link, including updating the total sales and transaction count.
This endpoint is essential for maintaining accurate records of a payment link's performance.
Key Features
- Updates the
total_salesproperty to reflect the accumulated sales for the payment link. - Increments the
total_transactionsproperty by 1 with each call to track transaction volume.
Usage Notes
Purpose: Use this endpoint after retrieving payment link data via GET /query/payment-links or GET /query/payment-links/{id} to ensure accurate and real-time updates to sales statistics.
Sales Tracking: Update total_sales with the correct value representing the sum of all sales processed through the payment link.
Transaction Count: Each time this endpoint is called, the total_transactions property is automatically incremented by 1.
Response Structure
| Code | Response | Reason |
|---|---|---|
| 200 | Success | The payment link's sales stats were successfully updated. |
| 400 | Bad Request | Invalid input or missing required parameters. |
| 401 | Unauthorized | Authentication failed. |
| 404 | Not Found | The specified payment link ID does not exist. |
| 500 | Internal Server Error | Unexpected server error occurred. |
Important Considerations
Data Integrity: Ensure total_sales values are calculated accurately before updating.
Incremental Transactions: The total_transactions count is automatically incremented and cannot be manually adjusted.
Real-Time Updates: Use this endpoint consistently to maintain an up-to-date record of payment link performance metrics.
