Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top