For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
HomeGuidesAPI Reference
HomeGuidesAPI Reference
  • Technical Guides
    • Onboarding
    • Capabilities
      • Overview
      • Settlement Contract ID
      • Settlement File Schema
      • Retrieving Settlement Batch Files
LogoLogo
Technical GuidesSettlements

Retrieving Settlement Batch Files

Was this page helpful?
Previous
Built with

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' \