Pass in a APIContext
object to authenticate
the call and to send a unique request id
(that ensures idempotency). The SDK generates
a request id if you do not pass one explicitly.
See Configuration.cs to know more about APIContext.
Payout
ObjectInitialize a new Payout
object with details of the batch payout to be created.
Describes how the payments defined in the items
array are to be handled.
The items
array contains the list of payout items to be included in this payout.
If syncMode
is set to true
when calling Payout.Create()
, then the items
array must only
contain one item. If syncMode
is set to false
when calling Payout.Create()
, then the items
array can contain more than one item.
Creates the batch payout resource.
syncMode = false
indicates that this call will be performed asynchronously,
and will return a payout_batch_id
that can be used to check the status of the payouts in the batch.
syncMode = true
indicates that this call will be performed synchronously and will return once the payout has been processed.
NOTE: The
items
array can only have one item ifsyncMode
is set totrue
.
For more information, please visit PayPal Developer REST API Reference.
Create Batch Payout
This sample code demonstrates how you can create a batch payout. More Information: https://developer.paypal.com/docs/integration/direct/payouts-overview/