APG PayAPG Paydocs

Payments

Reconcile a payout

Explain a deposit on a bank statement, from the reference on the line to the entries that made it up.

Someone in finance has a bank statement line and a question: what is this deposit?

That is the whole guide. You start with the string on the statement, not with an identifier you have never seen, and you end with the individual payments, refunds, disputes and fees that add up to it.

A payout is money the platform sent, and it is its own thing, not a view of a transaction. It is raised on the merchant's schedule; you can also raise one by hand.

reference is what the bank prints on the statement line, so it is the one field you can search by without knowing anything else.

Request
curl -X GET "https://api.tst.au.apgpay.dev/bezel/payouts" \
  -H "Authorization: Bearer $API_SECRET_KEY"

composition counts the payments, refunds, disputes and fees behind the amount. Read it before the entries: it tells you whether the surprise is a refund you had forgotten or a fee you had not expected, which decides whether you need the entries at all.

Request
curl -X GET "https://api.tst.au.apgpay.dev/bezel/payouts/<usePayoutIdFromStep1>" \
  -H "Authorization: Bearer $API_SECRET_KEY"

Every entry names the transaction it came from and the direction money moved, so this is the line-by-line answer to “what is this deposit”.

Request
curl -X GET "https://api.tst.au.apgpay.dev/bezel/settlement-entries" \
  -H "Authorization: Bearer $API_SECRET_KEY"
A payout that failed still exists, and disbursement.attempts is the history. Each attempt carries a permanent flag: false means the platform will try again, true means it will not and the account needs attention. Read that flag before telling a merchant to wait, it is the difference between "it is coming" and "your bank details are wrong".

When a merchant needs money before their schedule pays out. The command does not take a merchantId, it is inferred from the credential, which is what stops a call paying the wrong merchant.

Request
curl -X POST "https://api.tst.au.apgpay.dev/bezel/payouts" \
  -H "Authorization: Bearer $API_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "amount": {
    "minorCurrencyUnits": 125000,
    "currency": "AUD"
  },
  "statementDescriptor": "BLUE HILL COFFEE",
  "paymentChannels": [
    "DirectEntry"
  ],
  "externalAccountId": null,
  "feePayingMerchantId": null,
  "type": "PayoutCmdCreateManual"
}'

See listen for webhooks.