Retrieve or download a payment batch's SEPA file
GET/api/v1/payment_batches/:id/sepa_export
Returns the export resource as JSON. With Accept: application/xml and state: available, returns the file itself; before that, the JSON resource is returned instead. Never generates a file, and downloading one never means a payment was executed. Requires write, not read, because the file carries full beneficiary IBANs. Every download of the file, here or from the Scribee payment centre, is recorded and published as served_count, first_served and last_served; reading the JSON resource is not. Served means the bytes were sent in an HTTP response to that actor: it proves neither receipt, nor handover to the bank, nor bank execution.
Request
Responses
- 200
- 403
- 404
- 422
The export resource, or the pain.001 file when Accept: application/xml is sent and state is available.
The token does not hold the write scope.
No export was ever requested for this batch, or no batch with this id is reachable by the token's grants.
operation_failed - the stored file is gone, or no longer matches its recorded sha256, so it is not served.