Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

118
Views
How to accept payment in requested currency in PayPal through integration via Javascript?

Currently, I am able to accept payment only in one currency with this code

<script src="https://www.paypal.com/sdk/js?client-id=Your Client ID&currency=AUD"></script> -->   

If make USD over there like this..

<script src="https://www.paypal.com/sdk/js?client-id=Your Client ID&currency=USD"></script> -->   

I can accept the payment in USD on my website

if will do GBP

<script src="https://www.paypal.com/sdk/js?client-id=Your Client ID&currency=GBP"></script> -->   

I can accept the payment in GBP on my website

But when I add multiple currencies like this...

<script src="https://www.paypal.com/sdk/js?client-id=Your Client ID&currency=AUD,USD, AUD,NZD,GBP"></script> -->   

The button doesn't work

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The currency determines which buttons are eligible, so an SDK load is only usable with 1 currency at a time.

To support multiple currencies, you must reload the SDK on the page and re-render any buttons afterward (and createOrder, when called, must specify amounts in the single currency that matches).


A new alternative you can try is to load the SDK multiple times on the page using the data-namespace parameter, to specify a name other than the default paypal.

An example....

<h3>USD buttons...</h3>
<div id="paypal-button-container-1" />

<script src="https://www.paypal.com/sdk/js?client-id=test&currency=USD" data-namespace="paypalUSD"></script>
<script>
    paypalUSD.Buttons({
        //...
    }).render('#paypal-button-container-1');
</script>


<hr />


<h3>AUD buttons...</h3>
<div id="paypal-button-container-2" />

<script src="https://www.paypal.com/sdk/js?client-id=test&currency=AUD" data-namespace="paypalAUD"></script>
<script>
    paypalAUD.Buttons({
        //...
    }).render('#paypal-button-container-2');
</script>

</script>

In general, unless you have a specific business need to receive multiple currencies in your account, it's simpler to just use an international currency like USD or EUR and let PayPal show the conversion at payment time if the buyer is going to use a funding source in a differrent currency like GBP, NZD, etc

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!