admin管理员组

文章数量:1417054

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

本文标签: javascriptHow to change Stripe39s currency display on websiteStack Overflow