Place onion in a food processor and pulse until onion is minced. Add lemon juice, ketchup, cayenne pepper, paprika, salt, and sugar and pulse until evenly combined. Transfer sauce to an airtight container and refrigerate until flavors combine, 2 to 3 hours.