I need to know what code someone used when they paid via the REST API.
I can get the list of registrant’s easy enough, and the associated attendee, I just don’t see where the Promotion code is? I can see it used in the UI, but I don’t see it via the API.
If you have the transaction ID, you can send an auth’d request to the /transactions/ endpoint’s line_items link.
e.g. if the transaction ID is 1234, the request will look like: /wp-json/ee/v4.8.36/transactions/1234/line_items
This will return an array of line items, and the promo code line item’s LIN_code will start with promotion-. The LIN_desc entity will have the promo code that was entered at checkout.
Viewing 2 reply threads
The support post ‘How do I get the Promotion Code that a registrant used when paying for a ticket?’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.