javascript - How to change Stripe's currency display on website? - Stack Overflow

I have done a easy website with stripe checkout,the javascript is pretty simple:<scriptsrc=".j

I have done a easy website with stripe checkout, the javascript is pretty simple:

                    <script
                        src=".js" class="stripe-button"
                        data-key="${homeForm.public_token}"
                        data-amount="4750"
                        data-name="My Product"
                        data-description="Something interesting"
                        data-image=".png"
                        data-locale="auto"
                        data-zip-code="true">
                    </script>

It works fine. However, the amount "4750" in the above code is Australia Dollar, the problem is when Stripe checkout page appears, it shows "USD" as the screenshot:

Is there a way to change "USD" to "AUD" and make sure the customer is charged with $47.5 AUD instead of USD?

Thank you!

I have done a easy website with stripe checkout, the javascript is pretty simple:

                    <script
                        src="https://checkout.stripe./checkout.js" class="stripe-button"
                        data-key="${homeForm.public_token}"
                        data-amount="4750"
                        data-name="My Product"
                        data-description="Something interesting"
                        data-image="https://stripe./img/documentation/checkout/marketplace.png"
                        data-locale="auto"
                        data-zip-code="true">
                    </script>

It works fine. However, the amount "4750" in the above code is Australia Dollar, the problem is when Stripe checkout page appears, it shows "USD" as the screenshot:

Is there a way to change "USD" to "AUD" and make sure the customer is charged with $47.5 AUD instead of USD?

Thank you!

Share Improve this question asked Dec 18, 2017 at 13:13 Zhang ZhanZhang Zhan 9159 silver badges30 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 3

Checkout has a lot of additional parameters and the one you want here is data-currency. If you add data-currency=aud to the data attributes you'll get what you want. You can find all the options here: https://stripe./docs/checkout#optional

This is only for display purpose in the frontend though. To actually charge your customer in AUD you need to pass AUD to the currency parameter of your server side create charge call: https://stripe./docs/api#create_charge-currency

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745262563a4619277.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信