Skip to main content

Merchant Help


Affirm Merchant Help

Flat File Charge Management


Flat File Charge Management enables merchants to interact with the Affirm API in bulk actions, by delivering batch csv files to an sFTP folder hosted by Affirm. This can be used to workaround inherent technical limitations of your Order Management System, or simply to lower the level of effort required to support actions like Capture, Void, Refund, and Update.

Requirements to use Flat File charge management:
  • ERP/OMS must be capable of scheduling a csv export of actions taken to orders
  • Files must be delivered via sFTP
  • CSV Files must be in the prescribed format (defined below)
  • Must be delivered at least once per day
  • Affirm must have an escalation e-mail or alias for reporting errors in processing
Flat File Format:
  • Filename Format
    • Naming Convention: YYYY-MM-DD’T’HH:mm:ss’Z’_YYYY-MM-DD’T’HH:mm:ss’Z’_[checksum_value].csv
    • Where the first UTC timestamp in the filename matches the UTC time of the earliest requested action in the file and the second UTC timestamp in the filename matches the UTC time for the most recent requested action in the file.
  • File Schema / Column Headers
    • charge_id: Required column; The Affirm Charge ID of the loan
    • action: Required column; The action (capture, void, refund, update) to take on the Affirm charge
    • amount: Required column; The amount as a positive integer in USD cents ($499.99 = 49999).
    • data: Optional column; Add additional data to the JSON request