APG PayAPG Paydocs

Merchants

Update external account

PATCH/external-accounts/{externalAccountId}

Make an account primary for its currency, ask the bank to verify it, or remove it. Every arm names the merchant, because the platform cannot resolve one from the account.

3 actionsXaccUpdateRemoveXaccUpdateSetPrimaryXaccUpdateVerify

Permissions

Required permission
merchantFinancials:update

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

Path parameters

externalAccountIdstring
required

Request body

This body is a typed union. Pick a variant to see its fields and a matching example.

Discriminated by type
type = "XaccUpdateRemove"
merchantIdMchtIdrequired

Identifier of a merchant.

Example mcht_9f2Kd8QpLzXw

curl -X PATCH https://api.tst.au.apgpay.dev/external-accounts/{externalAccountId} \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "XaccUpdateRemove",
  "merchantId": "mcht_9f2Kd8QpLzXw"
}'

Responses

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

Discriminated by type
type = "XaccUpdateRspAttributes"

The resource as it stands after the change.

Example
{
  "type": "XaccUpdateRspAttributes",
  "updated": {
    "type": "XaccViewAttributes",
    "externalAccountId": "xacc_9f2Kd8QpLzXw",
    "merchantId": "mcht_9f2Kd8QpLzXw",
    "reference": "your-own-reference",
    "accountName": "Ada Lovelace",
    "bankName": "Ada Lovelace",
    "routingNumber": "string",
    "last4": "4242",
    "country": "AU",
    "currency": "AUD",
    "status": "Pending",
    "blockReason": "Requested by the customer.",
    "primary": true,
    "verified": true,
    "verification": {
      "type": "XaccVerificationAttributes",
      "outcome": "Match",
      "matchedName": "Ada Lovelace",
      "message": "string",
      "provider": "string",
      "failureMessage": "string",
      "verifiedAt": "2026-08-19T04:21:07Z"
    },
    "createdAt": "2026-08-19T04:21:07Z",
    "updatedAt": "2026-08-19T04:21:07Z"
  }
}

Error responses