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.
$curl --location 'https://agencyapi.afterpay.com/v1/settlement/batches/date/{YYYY-MM-DD}' \
>--header 'X-Afterpay-Request-Signature: <Request Signature>' \
>--header 'X-Afterpay-Request-Date: <Request Date>' \
>--header 'X-Afterpay-Request-Apikey: <API Key>' \
>--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.
$curl --location 'https://agencyapi.afterpay.com/v1/settlement/batch?ids={settlement_batch_id}' \
>--header 'X-Afterpay-Request-Signature: <Request Signature>' \
>--header 'X-Afterpay-Request-Date: <Request Date>' \
>--header 'X-Afterpay-Request-Apikey: <API Key>' \
>--header 'Content-Type: application/json' \