Getting value and major_value zero in order API.

93 views
Skip to first unread message

Gaurav Dhandre

unread,
Jul 20, 2021, 5:03:03 AM7/20/21
to Eventbrite Developers
Hi Team,

We are trying to call retrieve order API but getting value and major_value is zero, We have placed a $5 order using PromoCode.

How can we get the actual payment amount?

Response :-  #<OpenStruct costs=#<OpenStruct base_price=#<OpenStruct display="$0.00", currency="USD", value=0, major_value="0.00">, eventbrite_fee=#<OpenStruct display="$0.00", currency="USD", value=0, major_value="0.00">, gross=#<OpenStruct display="$0.00", currency="USD", value=0, major_value="0.00">, payment_fee=#<OpenStruct display="$0.00", currency="USD", value=0, major_value="0.00">, tax=#<OpenStruct display="$0.00", currency="USD", value=0, major_value="0.00">>, resource_uri="https://www.eventbriteapi.com/v3/orders/1796153567/", id="1796153567", changed="2021-07-20T08:16:44Z", created="2021-07-20T08:16:42Z", name="Mrudul T", first_name="*****", last_name="T", email="keys@******", status="placed", time_remaining=nil, event_id="163644114953">

nata...@eventbrite.com

unread,
Jul 28, 2021, 6:53:57 PM7/28/21
to Eventbrite Developers
Hello!

I'm seeing "gross.major_value": "$0.00" is correct for order ID: 1796153567, as that is the amount paid for the order. 

If you would like to retrieve discount information, you can follow this sequence of requests: 
  1. GET https://www.eventbriteapi.com/v3/orders/:order_id:/?expand=attendees
  2. Grab the `attendee_id` from the response to your first request and insert it in GET https://www.eventbriteapi.com/v3/attendees/$attendee_id/?expand=promotional_code
For more information about the Attendee object and available expansions, check out our API reference here

I hope this is helpful and I have created a ticket for us to update our documentation for the Order object accordingly!

Best,
Natalie

Mrudul Tarwatkar

unread,
Aug 12, 2021, 7:52:30 AM8/12/21
to Eventbrite Developers
Hello Natalie,

Even when we expand the attendee API with `promotional_code`, we don't get the original order value. Check the response below:


{ "costs": { "base_price": { "display": "$0.00", "currency": "USD", "value": 0, "major_value": "0.00" }, "eventbrite_fee": { "display": "$0.00", "currency": "USD", "value": 0, "major_value": "0.00" }, "gross": { "display": "$0.00", "currency": "USD", "value": 0, "major_value": "0.00" }, "payment_fee": { "display": "$0.00", "currency": "USD", "value": 0, "major_value": "0.00" }, "tax": { "display": "$0.00", "currency": "USD", "value": 0, "major_value": "0.00" } }, "resource_uri": "https://www.eventbriteapi.com/v3/events/163644114953/attendees/2565710599/", "id": "2565710599", "changed": "2021-08-12T10:34:58Z", "created": "2021-08-12T10:34:58Z", "quantity": 1, "variant_id": null, "profile": { "first_name": "Mrudul", "last_name": "T", "email": "te...@example.com", "name": "Mrudul T", "addresses": {} }, "barcodes": [ { "status": "unused", "barcode": "18179855212565710599001", "created": "2021-08-12T10:34:59Z", "changed": "2021-08-12T10:34:59Z", "checkin_type": 0, "is_printed": false } ], "answers": [], "checked_in": false, "cancelled": false, "refunded": false, "affiliate": "oddtdteb", "guestlist_id": null, "invited_by": null, "status": "Attending", "ticket_class_name": "General Admission", "delivery_method": "electronic", "event_id": "163644114953", "order_id": "1817985521", "ticket_class_id": "288736113", "promotional_code": { "resource_uri": "https://www.eventbriteapi.com/v3/events/163644114953/discounts/557828915/", "id": "557828915", "promotion": "50.00 - 4020194196999891", "promotion_type": "discount", "code": "4020194196999891", "amount_off": { "currency": "USD", "value": 5000, "major_value": "50.00", "display": "50.00 USD" } }

Is there a way to get the original order_value/payment_value for an order with a discount code applied?

Thanks
Mrudul

Suzie Gladysz

unread,
Sep 9, 2021, 5:02:56 AM9/9/21
to Eventbrite Developers
Hello Eventbrite team,

Would you please be able to help with answering the above? 

We would really appreciate your help.

Suzie

Mrudul Tarwatkar

unread,
Jun 30, 2022, 12:35:41 PM6/30/22
to Eventbrite Developers
Hello Natalie,

Any update on this? We are still getting the same issue.

Thanks
Reply all
Reply to author
Forward
0 new messages