put
https://api.vcita.biz/platform/v1/payment/client_packages/cancel_redemption
Overview
Reverse a previous package credit redemption, restoring the consumed credit back to the client's package. This is the undo operation for POST /platform/v1/payment/client_packages/update_usage.
Authentication
Available for Staff tokens. Directory and App tokens are supported with the X-On-Behalf-Of header set to the target business UID. Also available for Internal tokens.
How It Works
- The system finds the
PaymentStatusby the provided ID and locates the associatedBookingCreditRedemption. - The
bookings_usagecounter on the relevantBookingCreditis decremented by one, making the credit available again. - The
BookingCreditRedemptionrecord is marked as inactive. - The
PaymentStatusis reset to pending with the original price restored (no longer marked as paid-by-package).
Required Parameters
payment_status_id(string) — The ID of the payment status whose package credit redemption should be reversed. Must reference a payment status that was previously paid via package credit.
Notes
- Returns 422 if the payment status was not paid via a package credit.
- This endpoint is in Alpha and may change.
- Use this when an appointment is cancelled or rescheduled and the client's package credit should be returned.
