How to get shipping costs of an order with Amazon MWS Api? - amazon-web-services

I would like to get shipping costs of an order. I can get amount, customer information, purchase date of an order... but where is the shipping cost?
Any code or link would be very helpful.
Thanks.

Assuming that you are using the Orders API, the shipping charges for each item are stored in the shippingPrice property of the OrderItem type. You need to use the ListOrderItems operation to retrieve the order's items.
See page 26 of the Orders API documentation for a description of shippingPrice property. See page 25 for a description of the ListOrderItems operation.

Related

Stripe Checkout with django-stripe: how pass fees on to customers (surcharging)?

I am using django-stripe to generate Stripe Checkouts.
I would like to pass the Stripe fees on to my customers ("surcharging").
I found a help article from stripe regarding this. It says in general how to calculate the fees to put on top of the price of the product.
The problem is, that different payment methods have different fees.
And when creating the Checkout, I must calculate the final price (including the fees I want to pass on) before I know what payment method the customer will select (and therefore what fees the customer will have to pay).
So I don't know the fees when I must put them on top of the price the user has to pay in the Checkout.
Is there a way out of this dilemma?
Unfortunately there isn't a way to dynamically change the price based on the payment method presently. You must specify the amount to be paid prior to redirecting your customers to the Stripe Checkout interface.
You could create make your users select a Payment Method prior to redirecting them to Checkout (restricting the payment_method_types to their selection) and adjust the price based on their chosen Payment Method. But that requires a lot of work on your side and loses some of the nicest features of Stripe Checkout.

How to calculate total transaction fees paid by users?

I want to calculate total transaction fees paid by users by using a substrate-api-sidecar on any substrate-based chain.
I tried reading two docs on calculating fees but none could help me out in deducing what to look for while querying a block. Click here for document 1, here for document 2.
Would that differ from chain to chain implementation?
I checked Moonriver documents on using substrate-api-sidecar and it seems possible to calculate fees. But I could not find out how to do so against a Polkadot parachain(relay chain)?
For setting the base premise, Token Terminal states that in a blockchain, total revenue generated means total transaction fees paid by the users.

Change cart amount in prestashop

I want to add our custom amount in total cart amount during checkout or payment in prestashop in custom payment module. And so can i change cart amount during checkout or payment in our custom payment module in prestashop?
There are three options I spontaneously know about:
Use an already available module for such purpose. In this case, there is in example the Additional Payment Fees module (which I use in production in a PrestaShop installation myself).
Write an additional module which can apply configurable fees on selectable payment options. This might be the favored option and bases on the same principles as the next.
Make your payment module use a specific cart rule.
I checked it again and cart rules do not appear to be a good idea for adding fees rather than discounts. In fact, the PrestaShop Back-Office does not allow to set up cart rules with negative "discounts".
These are the things to take care about:
Its best to add the fee distinct from the actually purchased products and eventual shipping costs to maintain transparency towards the customer. This might not be a technical detail, but valuable concerning user experience.
Display the additional fees for a payment type on the cart page. The hookdisplayShoppingCart or displayShoppingCartFooter is suitable for that. These hooks can also be used to initiate calculation of payment fees and storing them in association with the cart because calculation is necessary only when the customer is confronted with the choice of payment: in the cart.
Create an additional column in the cart table or alternatively a dedicated table which holds the fee information for each cart. This information must be stored permanently as it is necessary even after finished order.
Getting the cart's total value is easy: $this->context->cart->getOrderTotal(); - but keep in mind that this includes tax (provide false as first parameter). I am not sure about whether such fee must be applied to the net or gross value of the cart.
They must be visible on the invoice, too. In that case the displayPDFInvoice hook is suitable for inserting additional information into the invoice PDF.
I am sorry I did not find yet how to finally apply the fee to the cart for checkout but I hope it helps if I point into the direction of tax rules, which you could leverage programmatically for each order.
Sources
PrestaShop 1.5 documentation about hooks
PrestaShop 1.5 documentation about tax rules
PrestaShop 1.5.6.2 Cart class

AWS API to get the price displayed on amazon site

On an Amazon site, there is usually a List Price and a Price. I am trying to figure out how to obtain Price programmatically.
For example: This product has List Price $35 and Price $26
Through the ItemLookUp API, the List Price can be obtained easily but is there a way to get the Price from Amazon API?
First I thought that 'price' is the price that amazon sells the item at, but for this previously mentioned product this Price is $26 while the amazon's own lowest price is $28.76
Then I thought Price is the lowest price that is eligible for Prime, but I can't find easy way of getting this information.
If you make sure to include the Offers response group, you can get the lowest new price, lowest used price, etc. And if you need to, you can filter it to only offers from Amazon. That should give you the functionality you're needing. You can also find out if a specific offer is eligible for super saver shipping through that response group - which should be the same ones that are prime eligible.
Here's some more info on response groups and the different ones available - a very useful resource to dig through if you're wondering where to get a specific piece of info from.
I realize it's been a month since you asked this question, but I hope this helps. Let me know if you need any more clarification.

amazon product advertising api : getting shipping rate

i was looking to get the shipping price from amazon using the advertising api
what i am basically looking for can be seen here http://www.amazon.com/VGN-CR320E-VGN-FE550G-VGN-FE880E-VGN-FZ240E-VGN-SZ240P/dp/B003E2VP7I/
I am looking for the shipping quote ex. on the above page it's $2.59 + $6.39 shipping
is it possible to retrieve shipping rate using the api , i tried it with a ResponseGroup as Large and few others but it didn't work
The PA-API will never have this information. You can get it through MWS and should use it for all sales and seller related information. You can sign up at http://developer.amazonservices.com and it is free.