How to change the amount_total on the Stripe Checkout page?
513 views
Skip to first unread message
Akash Kanaujiya
unread,
Apr 24, 2021, 7:23:24 PM4/24/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Stripe API Discussion
I am using stripe checkout to make the payment, I want to add the shipping cost without displaying the Shipping Address form.
I didn't find any guide on this anywhere, if anyone can help will be great for me,
Thanks
Remi J.
unread,
Apr 24, 2021, 7:27:38 PM4/24/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Stripe API Discussion
Hello!
The way you control the total amount is based on the line items you pass at the Session creation. The easiest solution is to rely on our ability to calculate shipping costs for you: https://stripe.com/docs/payments/checkout/shipping
If you don't want to use this feature, then the best solution is to pass a specific line item that represents your shipping cost. You'd create a Product and a Price for this cost and then when you create your session and pass the line item(s) for the items being bought you'd also pass an extra line item for the shipping cost. Doing this ensures that your customers see the expected total on the page without having to enter their shipping details.