{
  "opencollection": "1.0.0",
  "info": {
    "name": "Flex Pay API (Upgrade) Marketing Offers Transactions API",
    "version": "v1"
  },
  "request": {
    "auth": {
      "type": "oauth2",
      "flow": "client_credentials",
      "accessTokenUrl": "https://partner.upgrade.com/api/auth/v1/oauth/token",
      "credentials": {
        "clientId": "{{clientId}}",
        "clientSecret": "{{clientSecret}}"
      }
    }
  },
  "items": [
    {
      "info": {
        "name": "Transactions",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Authorize Transaction",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://partner.upgrade.com/api/checkout/v1/transactions",
            "headers": [
              {
                "name": "Idempotency-Key",
                "value": ""
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Using the order_id from the checkout flow, an authorization is the first step using the Transaction API. Once an authorization is submitted against an Order, a new Transaction is created. Once a transaction is authorized you have up to 7 days to submit capture requests; after expiration the remaining amount is automatically voided (see authorization_expiration on the Transaction object)."
        },
        {
          "info": {
            "name": "Get Transaction",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://partner.upgrade.com/api/checkout/v1/transactions/:transactionId",
            "params": [
              {
                "name": "transactionId",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get Transaction"
        },
        {
          "info": {
            "name": "Void Transaction",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://partner.upgrade.com/api/checkout/v1/transactions/:transactionId/void",
            "headers": [
              {
                "name": "Idempotency-Key",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "transactionId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Fully or partially void an already authorized transaction (e.g. a cancelled or unfulfillable item). The amount must be less than or equal to the remaining_amount in the Transaction object; voided amounts are permanently deducted and can no longer be captured."
        },
        {
          "info": {
            "name": "Capture Transaction",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://partner.upgrade.com/api/checkout/v1/transactions/:transactionId/capture",
            "headers": [
              {
                "name": "Idempotency-Key",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "transactionId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Request payment for the customer's order. Fully capture by submitting an amount equal to the remaining_amount, or partially capture with a smaller amount and request the rest later."
        },
        {
          "info": {
            "name": "Refund Transaction",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://partner.upgrade.com/api/checkout/v1/transactions/:transactionId/refund",
            "headers": [
              {
                "name": "Idempotency-Key",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "transactionId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Fully or partially refund a previously captured transaction with an amount equal to or less than the captured_amount. The refunded amount is returned by netting against your upcoming payout during the disbursement process."
        }
      ]
    }
  ],
  "bundled": true
}