Skip to main content

Get Available Coupons

Introduction

This endpoint retrieves a list of available coupons for a specific event and ticket.

Endpoint

https://api.paydexp.com/v1/coupons

Authorization

Users need to include basic authentication credentials in the request headers.

Below are code examples in different programming languages demonstrating how to get available coupons for a ticket sales.

curl --location --request POST 'https://api.paydexp.com/v1/coupons' \
--header 'Authorization: Basic {base64_encoded_username_password}' \
--header 'Content-Type: application/json' \
--data '{
"event_id": 123,
"ticket_id": 1759,
"slots": 2
}'

Example success Response

{
"success": true,
"data": [
{
"id": 1,
"code": "DISCOUNT20",
"discount_type": "percentage",
"discount_value": 20,
"valid_for_ticket": true,
"is_available": true,
"available_until": "2025-12-14",
"original_amount": 300,
"discounted_amount": 240,
"sale_period": "Nov 1, 2025 - Dec 14, 2025",
"applicable_tickets": "VIP Ticket, General Admission"
},
{
"id": 2,
"code": "VIPSPECIAL",
"discount_type": "fixed",
"discount_value": 50,
"valid_for_ticket": true,
"is_available": true,
"available_until": "2025-11-30",
"original_amount": 300,
"discounted_amount": 200,
"sale_period": "Nov 1, 2025 - Nov 30, 2025",
"applicable_tickets": "VIP Ticket"
}
],
"message": "Coupons retrieved successfully."
}

Conclusion

Easily get all available coupons for a specific event using this endpoint.```