Approves payment requests and creates their payments in a batch, in one call.
Use it to pay requests that are PENDING_APPROVAL or already APPROVED. The requests move to APPROVED and stay there;
each request's payment appears in payments on the request.
Requires the Payment Requests permission (see List Received Payment Requests). Creating the payments needs no
other permission.
One payment per payee. All the requests in the call from the same payee are added up into one payment, so several
rows can share a paymentId. createdCount counts requests and createdPaymentCount counts payments. Requests from one
payee must share a currency (MIXED_CURRENCY_FOR_PAYEE) unless you send amountOverride.
What 200 means. The payments named by paymentId exist. A row with reservedPaymentId instead is still being
created after the response (see queuedReason); read the request later to see the payment or paymentFailure. A refused
row carries an errorCode. The payments are created in the state Create Payment leaves them: submit them yourself, or
send sendImmediately: true.
Retries are safe. Repeating the call with the same requests and batch lands on the same payments and never pays
twice. A request whose payment failed can be approved again once you fix the cause.
If the call fails as a whole (4xx), no payment was created for any request.
Errors
400 INVALID_REQUEST_IDS:requestIdsis missing, empty, over 50, holds a value that is not a string, or repeats an ID400 INVALID_LEDGER_ACCOUNT:ledgerAccountis missing or blank400 INVALID_BATCH:batchis missing, names both an existing batch and a new one, or is missingnameor
defaultPaymentCategoryfor a new batch400 INVALID_AMOUNT_OVERRIDE:amountOverrideis not a number400 INVALID_FUNDING_CURRENCY:amountOverrideis sent without a three-letterfundingCurrencyCode400 AMOUNT_OVERRIDE_AMBIGUOUS:amountOverrideis sent for requests from more than one payee. Approve one payee at a time400 INVALID_PAYOR_MEMO,400 INVALID_PAYEE_MEMO: the memo is not a string400 INVALID_SEND_IMMEDIATELY:sendImmediatelyis not a boolean400 BATCH_CREATION_FAILED: the new batch could not be created404 NOT_FOUND:batch.batchIdis not one of your batches423 NOT_EDITABLE: the batch is archived
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
