Shopify multi-currency: We are unable to get `discount_code.amount` of orders in presentment currenc

Highlighted
Shopify Partner
1 0 0

Hi there,
We are implementing to support Shopify multi-currency and get stuck because we are unable to get discount code amount of Shopify orders in buyer(customer/presentment) currency. There are `shop_money` and `presentment_money` fields for other totals of orders like `total_price_set`, `total_tax_set` in the API responses except `discount_code`. We suppose that this is a bug.

Is it possible to return discount code amounts of orders in buyer currency as well through the API just like in other order totals field? if yes, how long it will take?

 

Our store URL is https://veeqo-multi-currency.myshopify.com
Response from the Shopify API for my order:

{"id":758267576420,"email":"","closed_at":null,"created_at":"2019-01-27T20:40:47-12:00","updated_at":"2019-01-27T20:41:37-12:00","number":25,"note":null,"token":"4545","gateway":"shopify_payments","test":true,"total_price":"157.66","subtotal_price":"137.66","total_weight":200,"total_tax":"26.24","taxes_included":true,"currency":"GBP","financial_status":"paid","confirmed":true,"total_discounts":"15.29","total_line_items_price":"152.95","cart_token":"","buyer_accepts_marketing":false,"name":"#1025","referring_site":"https://veeqo-multi-currency.myshopify.com/collections/frontpage/products/variable-t-shirts?variant=22651402322020","landing_site":"/wallets/checkouts.json","cancelled_at":null,"cancel_reason":null,"total_price_usd":"208.25","checkout_token":"bb68464e47b0b6a749dc59c84b1751ce","reference":null,"user_id":null,"location_id":null,"source_identifier":null,"source_url":null,"processed_at":"2019-01-27T20:40:47-12:00","device_id":null,"phone":null,"customer_locale":"en","app_id":580111,"browser_ip":null,"landing_site_ref":null,"order_number":1025,"discount_applications":[{"type":"discount_code","value":"10.0","value_type":"percentage","allocation_method":"each","target_selection":"entitled","target_type":"line_item","code":"VEEQOPRODUCT"}],"discount_codes":[{"code":"VEEQOPRODUCT","amount":"15.29","type":"percentage"}],"note_attributes":[],"payment_gateway_names":["shopify_payments"],"processing_method":"direct","checkout_id":5445728665700,"source_name":"580111","fulfillment_status":null,"tax_lines":[{"price":"26.24","rate":0.2,"title":"Tax","price_set":{"shop_money":{"amount":"26.24","currency_code":"GBP"},"presentment_money":{"amount":"30.36","currency_code":"EUR"}}}],"tags":"","contact_email":"","order_status_url":"https://veeqo-multi-currency.myshopify.com/21761065060/orders/5316362c729025292def9b8314dbe58e/authenticate?key=9b3ee1f66fd01b80da918e34a7932ef7","presentment_currency":"EUR","total_line_items_price_set":{"shop_money":{"amount":"152.95","currency_code":"GBP"},"presentment_money":{"amount":"176.95","currency_code":"EUR"}},"total_discounts_set":{"shop_money":{"amount":"15.29","currency_code":"GBP"},"presentment_money":{"amount":"17.69","currency_code":"EUR"}},"total_shipping_price_set":{"shop_money":{"amount":"20.00","currency_code":"GBP"},"presentment_money":{"amount":"23.49","currency_code":"EUR"}},"subtotal_price_set":{"shop_money":{"amount":"137.66","currency_code":"GBP"},"presentment_money":{"amount":"159.26","currency_code":"EUR"}},"total_price_set":{"shop_money":{"amount":"157.66","currency_code":"GBP"},"presentment_money":{"amount":"182.75","currency_code":"EUR"}},"total_tax_set":{"shop_money":{"amount":"26.24","currency_code":"GBP"},"presentment_money":{"amount":"30.36","currency_code":"EUR"}},"total_tip_received":"0.0","admin_graphql_api_id":"gid://shopify/Order/758267576420","line_items":[{"id":1777592696932,"variant_id":22651402322020,"title":"Variable T-Shirts","quantity":1,"price":"152.95","sku":"variable-t-shirt-5","variant_title":"L / White","vendor":"veeqo-multi-currency","fulfillment_service":"manual","product_id":2516164739172,"requires_shipping":true,"taxable":true,"gift_card":false,"name":"Variable T-Shirts - L / White","variant_inventory_management":"shopify","properties":[],"product_exists":true,"fulfillable_quantity":1,"grams":200,"total_discount":"0.00","fulfillment_status":null,"price_set":{"shop_money":{"amount":"152.95","currency_code":"GBP"},"presentment_money":{"amount":"176.95","currency_code":"EUR"}},"total_discount_set":{"shop_money":{"amount":"0.00","currency_code":"GBP"},"presentment_money":{"amount":"0.00","currency_code":"EUR"}},"discount_allocations":[{"amount":"15.29","discount_application_index":0,"amount_set":{"shop_money":{"amount":"15.29","currency_code":"GBP"},"presentment_money":{"amount":"17.69","currency_code":"EUR"}}}],"admin_graphql_api_id":"gid://shopify/LineItem/1777592696932","tax_lines":[{"title":"Tax","price":"22.91","rate":0.2,"price_set":{"shop_money":{"amount":"22.91","currency_code":"GBP"},"presentment_money":{"amount":"26.51","currency_code":"EUR"}}}],"origin_location":{"id":745758883940,"country_code":"GB","province_code":"","name":"veeqo-multi-currency","address1":"4 Richmond Terrace","address2":"","city":"Swansea","zip":"SA2 0QY"}}],"shipping_lines":[{"id":640760086628,"title":"International Shipping","price":"20.00","code":"International Shipping","source":"shopify","phone":null,"requested_fulfillment_service_id":null,"delivery_category":null,"carrier_identifier":null,"discounted_price":"20.00","price_set":{"shop_money":{"amount":"20.00","currency_code":"GBP"},"presentment_money":{"amount":"23.49","currency_code":"EUR"}},"discounted_price_set":{"shop_money":{"amount":"20.00","currency_code":"GBP"},"presentment_money":{"amount":"23.49","currency_code":"EUR"}},"discount_allocations":[],"tax_lines":[{"title":"Tax","price":"3.33","rate":0.2,"price_set":{"shop_money":{"amount":"3.33","currency_code":"GBP"},"presentment_money":{"amount":"3.85","currency_code":"EUR"}}}]}],"billing_address":{"first_name":"Ulan","address1":" ","phone":null,"city":"Berlin","zip":"","province":null,"country":"Germany","last_name":"Dj","address2":"","company":null,"latitude":52.5084133,"longitude":13.3900205,"name":"Ulan Dj","country_code":"DE","province_code":null},"shipping_address":{"first_name":"Ulan","address1":"Friedrichstraße 204","phone":null,"city":"Berlin","zip":"10117","province":null,"country":"Germany","last_name":"Dj","address2":"","company":null,"latitude":52.5084133,"longitude":13.3900205,"name":"Ulan Dj","country_code":"DE","province_code":null},"fulfillments":[],"client_details":{"browser_ip":"185.72.244.149","accept_language":"en-US,en;q=0.9,ru-RU;q=0.8,ru;q=0.7","user_agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36","session_hash":null,"browser_width":1838,"browser_height":1008},"refunds":[],"payment_details":{"credit_card_bin":"400000","avs_result_code":"Y","cvv_result_code":"M","credit_card_number":"•••• •••• •••• 0016","credit_card_company":"Visa"},"customer":{"id":1037845954660,"email":"","accepts_marketing":false,"created_at":"2019-01-21T21:11:26-12:00","updated_at":"2019-01-27T20:40:47-12:00","first_name":"Ulan US","last_name":"Ulan US","orders_count":2,"state":"disabled","total_spent":"100.00","last_order_id":731247968356,"note":"","verified_email":true,"multipass_identifier":null,"tax_exempt":false,"phone":"+12129475316","tags":"","last_order_name":"#1002","currency":"GBP","admin_graphql_api_id":"gid://shopify/Customer/1037845954660","default_address":{"id":1134686208100,"customer_id":1037845954660,"first_name":"Ulan","last_name":"Dj","company":null,"address1":"","address2":"","city":"Berlin","province":null,"country":"Germany","zip":"","phone":null,"name":"Ulan Dj","province_code":null,"country_code":"DE","country_name":"Germany","default":true}}}

 

Thanks in advance!

0 Likes
Shopify Staff
Shopify Staff
1087 75 140

Hey there, 

 

The discounted amount of an order should still be available in both currencies on shops that currently have the feature enabled. You'll want to take a look at the 'discount_allocations' attached to your line item, and that should provide you with the amounts that you're after. 

0 Likes