Permanently delete a coupon. The coupon is also deleted at your payment provider.
This action cannot be undone. Once deleted, the coupon code becomes available for reuse.
Path Parameters
The unique identifier of the coupon to delete.
Response
Always true for successful responses
Confirmation object containing the deleted coupon’s ID.Show Data Object Properties
The ID of the deleted coupon
Always true to confirm deletion
curl -X DELETE "https://api.affonso.io/v1/coupons/cpn_abc123" \
-H "Authorization: Bearer sk_live_your_api_key"
{
"success": true,
"data": {
"id": "cpn_abc123",
"deleted": true
}
}
Error Responses
Returned when the coupon doesn’t exist or has already been deleted.
Returned when the payment provider fails to delete the coupon. The coupon remains in Affonso’s database.