Showing results for 
Search instead for 
Did you mean: 

Accept Hosted Form: Truncated Last Zero

We have noticed that the pricing/amount of the payment form is not showing all of of the cent values. For example, when we set the amount to "25.00" or "25.50", the price on the payment form is shown as "$25.0" or "25.5" respectively. If the payment is "25.01" then the payment is shown correctly.


Hello @sfo_gtu


Is this behavior new, or has it been observed for a while?



Administrator Administrator
Hi Richard,

We noticied the issue when we started using the Python SDK back August.


Hi sfo_gtu


We are aware of the issue within our Python SDK and are working to update them to correct this. In the meantime, the following is a workaround you may use: 


The implementation is not when we pass it to the Python SDK.


The Python SDK will send the proper value to the servers and the amount that the merchant sends is properly getting stored in the servers as 50.00 (for example).


It is when the response has reached the merchant’s application that the issue starts happening.


When the SDK tries to show the response (50.00), it removes the zero and shows only one zero after the decimal point (50.0).


The suggested fix is to be implemented when the SDK is trying to print the response, i.e., from SDK to the merchant’s application.


Please do not worry about the amount on the server side. That is assuredly stored properly.


It is just a matter of printing the proper response to the merchant in the proper manner.


The original sample codes suggest something like this:

print('Auth Amount : %s' % transactionDetailsResponse.transaction.authAmount)

print('Settle Amount : %s' % transactionDetailsResponse.transaction.settleAmount)


This needs to be changed to the following. The highlighted text shows what is different:

print('Auth Amount : %s' % Decimal(repr(transactionDetailsResponse.transaction.authAmount)).quantize(Decimal('1.00')))

print('Settle Amount : %s' % Decimal(repr(transactionDetailsResponse.transaction.settleAmount)).quantize(Decimal('1.00')))


Also, if required, they may need to add a new import to the file:

            from decimal import *


Thank you,



Hi Elaine:



Thanks for the response. But I have been working with you guys to get this fix, and the workaroud below is not something we can do on our end, but the SDK which other agents have been mentioned too. 


The last agent suggested that I reach out the community to see if someone else might be able to help.