Retrieving Settlement Batch Files

The following example shows retrieving a settlement batch file by date.

  1. Use the Get Settlement Batches by Date endpoint to correctly retrieve the settlement batch files associated with the given settlement date.
1curl --location 'https://agencyapi.afterpay.com/v1/settlement/batches/date/{YYYY-MM-DD}' \
2--header 'X-Afterpay-Request-Signature: <Request Signature>' \
3--header 'X-Afterpay-Request-Date: <Request Date>' \
4--header 'X-Afterpay-Request-Apikey: <API Key>' \
5--header 'Content-Type: application/json' \
  1. Once you have retrieved the relevant settlement batch IDs, use the Get Settlement Batch Files endpoint to retrieve the associated settlement and aggregation files.
1curl --location 'https://agencyapi.afterpay.com/v1/settlement/batch?ids={settlement_batch_id}' \
2--header 'X-Afterpay-Request-Signature: <Request Signature>' \
3--header 'X-Afterpay-Request-Date: <Request Date>' \
4--header 'X-Afterpay-Request-Apikey: <API Key>' \
5--header 'Content-Type: application/json' \