{
  "opencollection": "1.0.0",
  "info": {
    "name": "Affirm Checkout Authorization API",
    "version": "1.0"
  },
  "request": {
    "auth": {
      "type": "basic",
      "username": "{{username}}",
      "password": "{{password}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Authorization",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Affirm Authorize a Transaction",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.affirm.com/api/v1/transactions",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Exchanges a checkout token for a transaction authorization, completing the server-side portion of the Direct API flow. This call must be made from the merchant server after the browser-side affirm.js returns a checkout token via the user_confirmation_url callback. The authorization places a hold on the customer's Affirm credit. The resulting transaction must be captured within the authorization window to transfer funds to the merchant."
        },
        {
          "info": {
            "name": "Affirm Upload a File",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.affirm.com/api/v1/files",
            "body": {
              "type": "multipart-form",
              "data": [
                {
                  "name": "file",
                  "type": "text",
                  "value": ""
                },
                {
                  "name": "purpose",
                  "type": "text",
                  "value": ""
                }
              ]
            }
          },
          "docs": "Uploads a file to Affirm's servers for use as dispute evidence. Returns a file identifier that can be referenced when submitting evidence via the Disputes API. Supported file types include images (JPEG, PNG) and documents (PDF)."
        },
        {
          "info": {
            "name": "Affirm Download a File",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.affirm.com/api/v1/files/:id",
            "params": [
              {
                "name": "id",
                "value": "500123",
                "type": "path",
                "description": "The unique identifier of the file to download."
              }
            ]
          },
          "docs": "Downloads a previously uploaded file by its identifier. Returns the raw file content with the appropriate content type header."
        }
      ]
    }
  ],
  "bundled": true
}