Refuse a payment batch's approval
POST/api/v1/payment_batches/:id/refuse
Sends a pending_approval batch back to draft, where it can be corrected and sent for approval again. The API application behind the token is recorded as the one who refused and published as the batch's refused_by, by name. Refusing a batch that is already draft changes nothing, records nothing, and answers 200 again.
Request
Responses
- 200
- 403
- 404
- 409
- 422
The batch, now draft.
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 past approval. validation_failed: the Idempotency-Key header is missing or expected_version is not an integer.