program.payments.batch in
program capabilities says whether yours has them.
The flow
- Verify a batch with the items, or with a CSV or pain.001 file and we parse it. Each item is checked against your program’s rules and the payee’s name is checked against the account. You get back a request id to poll with and a batch id for the draft this creates. Nothing is charged or reserved; verify as often as the user edits.
- Get verify status
until it finishes, or hold a WebSocket open and wait for
BATCH_PAYMENT_VERIFICATION_COMPLETED, which carries therequestId, then fetch the status once. The result marks each item valid or invalid, with the reasons, and shows the balances available to cover the batch. Fix or drop the invalid ones. - Pay a batch with the initiate action and the batch id. You get the total, the currency, and a challenge for the customer to authorise against.
- The same endpoint with the submit action, the challenge, the batch id, and the customer’s confirmation: a passkey (request the passkey challenge on this endpoint first), a 2FA code, or a PIN. Send exactly the items you initiated with; the challenge is bound to every row’s payee and amount, so any change invalidates it. A draft can be paid once.
- Get a batch to watch each item go from queued to success or failed. List batches shows all of a customer’s batches, with per-batch counts and totals on request.