APG PayAPG Paydocs

Settlement

Create fee adjustments

POST/fee-adjustments

Recalculate platform fees over a window, as a dry run or for real. The response is the only record of the run.

Permissions

Required permission
transactions:update

Requires the `update` action on `transactions` for the supplied runtime context

Request body

This body is a tagged shape: type is always "FeeadjCmdRun". Send it; more variants can be added, and a caller that switches on it keeps working when they are.

Discriminated by type
type = "FeeadjCmdRun"
merchantIdMchtIdrequired

Whose fees to recalculate.

Example mcht_9f2Kd8QpLzXw

createdAtAfterstring (date-time)required

Consider transactions created at or after this instant.

Example 2026-08-19T04:21:07Z

createdAtBeforestring (date-time)required

Consider transactions created before this instant.

Example 2026-08-19T04:21:07Z

dryRunbooleanrequired

true calculates the change without applying it. Required, there is no safe default.

Example true

curl -X POST https://api.tst.au.apgpay.dev/fee-adjustments \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "FeeadjCmdRun",
  "merchantId": "mcht_9f2Kd8QpLzXw",
  "createdAtAfter": "2026-08-19T04:21:07Z",
  "createdAtBefore": "2026-08-19T04:21:07Z",
  "dryRun": true
}'

Responses

The response is a tagged shape: type is always "FeeadjCreateRspAttributes". Switch on it; subtypes can be added, and a client that already reads it will not break.

Discriminated by type
type = "FeeadjCreateRspAttributes"

The resource that was created.

Example
{
  "type": "FeeadjCreateRspAttributes",
  "created": {
    "type": "FeeadjViewAttributes",
    "merchantId": "mcht_9f2Kd8QpLzXw",
    "dryRun": true,
    "createdAtAfter": "2026-08-19T04:21:07Z",
    "createdAtBefore": "2026-08-19T04:21:07Z",
    "transactionsConsidered": 1250,
    "transactionsChanged": 1250,
    "amounts": {
      "type": "FeeadjAmountsAttributes",
      "currency": "AUD",
      "feesBefore": 1250,
      "feesAfter": 1250,
      "difference": 1250
    }
  }
}

Error responses