Payouts Payout up to 500 recipients in one API Call

bnemo5
New Community Member
Payouts Payout up to 500 recipients in one API Call. enable live
 

hello

I would like to enable this option:

"Payouts Payout up to 500 recipients in one API Call."
and then enable "live"

when i try to enable it it say that i have to contact paypal to continue it says:

"To process your request we need more information about you and your account."

and than it shows a button saying: "contact us"
so thats why i am contacting, could somebody help me with this.

Login to Me Too
1 REPLY 1

alloy_bacon
Contributor
Contributor

Do a single payout first, than make the file better. edit %email% with the recipient email, generate your own authorization code how the rest apu says, batch_id must always a new number before running url, so run the file in the browser it will send single payout and leave the window, when finished.

 

Personally, I use batch_id with a cookie to increment it each time which can be dangerous if you loop the program to keep sending payouts by accident.

 

maybe someone else can give you the 500 recipient version.

 

payout.html

 

 

 

<!DOCTYPE html>
<html>
<body>

<h2>Using the XMLHttpRequest Object</h2>

<div id="demo">
<button type="button">Change Content</button>
</div>

<script>
var batch_id='2000000000000'
var email='%email%'
var data = '{'+'\n'+ '"sender_batch_header": {'  +'\n'+' "sender_batch_id": "'+batch_id+'",'+'\n'+'"email_subject": "This email is related to simulation"'+'\n'+'},'+'\n'+'"items": ['+'\n'+'{'+'\n'+'"recipient_type": "EMAIL",'+'\n'+'"receiver": "'+email+'",'+'\n'+'"note": "POSPYO001",'+'\n'+'"sender_item_id": "15240864065560",'+'\n'+'"amount": {'+'\n'+'"currency": "USD",'+'\n'+'"value": "0.01"'+'\n'+'}'+'\n'+'}'+'\n'+']'+'\n'+'}'
//window.location="complete"

var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {

if (this.readyState == 4) {
document.getElementById("demo").innerHTML =this.responseText;
window.location="complete"
}
};

xhttp.open("POST", "https://api.paypal.com/v1/payments/payouts", true);//http://127.0.0.1:845   //https://api.sandbox.paypal.com/v1/payments/payouts
xhttp.setRequestHeader("Content-Type", "application/json");
xhttp.setRequestHeader("cache-control", "no-cache");
xhttp.setRequestHeader("Authorization", "Basic lVjNKSDVsZXRJMmxKNmdqTnZ=");
//xhttp.setRequestHeader("Postman-Token", "bf41afcb-0e17-4f7c-bde9-c3ae8855a88f");
xhttp.send(data);
setTimeout(never_loaded,2000);
function never_loaded(){
window.location="complete"
}

</script>

</body>
</html>

 

 

 

 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.