1

My application uses Amazon FPS to charge a user. After setting up a pipeline and receiving a token, I then issue a Pay request with that token. The response contains a Transaction ID and a Transaction Status.

http://docs.aws.amazon.com/AmazonFPS/latest/FPSAdvancedGuide/Pay.html

Then I wait to receive an Instant Payment Notification, which has several fields, including the total transaction amount.

http://docs.aws.amazon.com/AmazonFPS/latest/FPSAdvancedGuide/APPNDX_IPN.html

For this transaction, Amazon FPS subtracts a fee from the money my account receives. I need to record the fee for the application's bookkeeping.

Where can I find the amount of this fee?

I could attempt to calculate it, but with rounding that seems error-prone. Additionally, Amazon's fee schedule varies with scale: higher-volume applications are charged lower rates. Attempting to reproduce that math accurately sounds like a disaster waiting to happen.

Peeja
  • 13,683
  • 11
  • 58
  • 77

1 Answers1

2

According to the documentation, no fee information is sent in an IPN - as you've discovered.

The only way to get the transaction fee is to call GetTransaction. This call returns a TransactionDetail which has an FPSFees property.

Jonathan Spooner
  • 7,682
  • 2
  • 34
  • 41
  • Oh, FFS. I've been looking at the "Advanced Quick Start", which is exactly as detailed and looks almost exactly the same, but doesn't list all of the API calls. (http://docs.aws.amazon.com/AmazonFPS/latest/FPSAdvancedGuide/GetTransactionStatus.html) Thank you. :) – Peeja Jun 30 '13 at 15:15
  • Yeah, it can be a little confusing at first. Amazon has broken up the API's _documentation_ into categories that they felt would be the most helpful for users getting started - but there's only one API in the end. – Jonathan Spooner Jun 30 '13 at 17:52