setSenderBatchId(uniqid()) ->setEmailSubject("You have a Payout!"); // #### Sender Item // Please note that if you are using single payout with sync mode, you can only pass one Item in the request $senderItem = new \PayPal\Api\PayoutItem(); $senderItem->setRecipientType('Email') ->setNote('Thanks for your patronage!') ->setReceiver('shirt-supplier-one@gmail.com') ->setSenderItemId("2014031400023") ->setAmount(new \PayPal\Api\Currency('{ "value":"1.0", "currency":"USD" }')); $payouts->setSenderBatchHeader($senderBatchHeader) ->addItem($senderItem); // For Sample Purposes Only. $request = clone $payouts; // ### Create Payout try { $output = $payouts->createSynchronous($apiContext); } catch (Exception $ex) { // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY ResultPrinter::printError("Created Single Synchronous Payout", "Payout", null, $request, $ex); exit(1); } // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY ResultPrinter::printResult("Created Single Synchronous Payout", "Payout", $output->getBatchHeader()->getPayoutBatchId(), $request, $output); return $output;