Approve a payment batch
POST/api/v1/payment_batches/:id/approve
Moves a pending_approval batch to approved and stamps approved_at; the batch total is frozen from then on. expected_version is required. The API application behind the token is recorded as the approver and published as the batch's approved_by, by name. Approving a batch that is already approved changes nothing, records no second approver, and answers 200 again.
Request
Responses
- 200
- 403
- 404
- 409
- 422
The batch, now approved.
The token lacks the write scope.
No payment batch with this id is reachable by the token's grants.
stale_version: the batch changed since the expected_version you sent. NOTHING WAS CHANGED; details carries the current version and batch. idempotency_key_reuse and idempotency_request_in_progress also answer 409, with no details.
batch_not_submittable: the batch is neither awaiting approval nor already approved. validation_failed: the Idempotency-Key header or expected_version is missing, or expected_version is not an integer.