APG PayAPG Paydocs

Payment sources

Create pay to aliases

POST/pay-to-aliases

Resolve a PayID to the account name behind it. Nothing is stored, the answer is the lookup.

Permissions

Required permission
payToAgreements:query

Requires the `query` action on `payToAgreements` for the supplied runtime context

Request body

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

Discriminated by type
type = "PtalCmdLookup"
merchantIdMchtIdrequired

Identifier of a merchant.

Example mcht_9f2Kd8QpLzXw

aliasTypePtalTyperequired
PhoneEmailAbnOrganisationIdentifierUnknown
aliasstringrequired

The PayID to resolve. A phone number must be in E.164 form.

curl -X POST https://api.tst.au.apgpay.dev/pay-to-aliases \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "PtalCmdLookup",
  "merchantId": "mcht_9f2Kd8QpLzXw",
  "aliasType": "Phone",
  "alias": "string"
}'

Responses

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

Discriminated by type
type = "PtalCreateRspAttributes"

The resource that was created.

Example
{
  "type": "PtalCreateRspAttributes",
  "created": {
    "type": "PtalViewAttributes",
    "merchantId": "mcht_9f2Kd8QpLzXw",
    "aliasType": "Phone",
    "alias": "string",
    "accountName": "Ada Lovelace"
  }
}

Error responses