Open donrestarone opened 1 year ago
An update in regards to calculating the Stripe's processing fee and showing it to the customer before prompting to checkout-page.
I checked the stripe's API documentation and could not find such API. Later, I reached out to Stripe's dev support team in their official discord channel, and they informed that there was no such API and suggested to manually calculate the processing fees on our end. LINK
I also analyzed the fitprint implementation done on our test-net. Fitprint is also using such manual calculation to show the processing fees.
The processing fees that we see on the stripe's checkout page, after we click on "COMPLETE ORDER" button as shown in above picture, is also a part of the line_items(analogous to an item of an order comprised of many items). So, the processing fees that we are seeing on the stripe's checkout page is not from stripe itself.
Conclusion:
The printify does provide shipping charge through its API. After the total amount (products price + shipping charge), we can also show the stripe processing fee on client-side by doing calculation like mentioned in here.
currently, we are using client side web hooks without authentication. The goal is to use the rails session/authentication to automatically authenticate the incoming request (verify cryptographically that the request is from the violet rails client side)