Batch API Frequently Asked Questions
Last updated: Mar 3rd, 4:10pm
Important: The PayPal Batch API is available as a limited-release API to select merchants and partners. Use this API to make batch requests to the /v2/checkout/orders, v1/payments/payment, and /v2/payments endpoints.
- Which methods and endpoints does Batch API support?
- How many maximum operations can I nest in a batch request
- Which authorization header applies when it is present in both the main batch request and the individual operation
- How does a Batch API handle idempotency
Which methods and endpoints does Batch API support?
Batch API supports POST, GET, PATCH, and PUT on /v2/checkout/orders, /v1/payments and /v2/payments endpoints.
How many maximum operations can I nest in a batch request?
The current batching capability enables you to nest a batch request with a maximum of four operations.
Which authorization header applies when it is present in both the main batch request and the individual operation?
If an authorization header is present in the batch request component and the individual operation component, the headers in the operation’s component take precedence over the global headers in the batch request component. The same holds true for all other headers.
How does a Batch API handle idempotency?
The batch implementation does not handle the idempotency of individual APIs in a single batch request. However, it supports batching of idempotent operations as long as you send the PayPal-Request-ID request header in individual batch operations.
For example, if you create an order, which is an example of a non-idempotent operation, and process its refund, which is an example of an idempotent operation, and mistakenly repeat the steps again, the Batch API processes the refund twice by creating an order ID the second time.