APG PayAPG Paydocs

Payment sources

Get pay to agreement

GET/pay-to-agreements/{payToAgreementId}
Request
GEThttps://api.tst.au.apgpay.dev/pay-to-agreements/{payToAgreementId}
curl -X GET https://api.tst.au.apgpay.dev/pay-to-agreements/{payToAgreementId} \
  -H "Authorization: Bearer $API_KEY"

Return an agreement's status. The identifier is the token you were given. It is sealed to its merchant, so the merchant is named by merchantId or the Merchant-Id header.

Permissions

Required permission
payToAgreements:query

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

Path parameters

payToAgreementIdstring
required

Query parameters

merchantIdstring

Whose agreement this is. Omit it when the Merchant-Id header names the merchant.

Responses

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

Discriminated by type
type = "PtagViewAttributes"
tokenstringrequired

The token that addresses this agreement. Carries the merchant, the customer and the account; treat it as a credential.

Example tok_9f2Kd8QpLzXwR4mN

merchantIdMchtIdrequired

Identifier of a merchant.

Example mcht_9f2Kd8QpLzXw

customerIdCustId

The customer the agreement is for, where one was named.

Example cust_9f2Kd8QpLzXw

statusPtagStatusrequired
PendingCreatedActiveSuspendedCancelledDeclinedExpiredFailedUnknown
Example
{
  "type": "PtagViewAttributes",
  "token": "tok_9f2Kd8QpLzXwR4mN",
  "merchantId": "mcht_9f2Kd8QpLzXw",
  "customerId": "cust_9f2Kd8QpLzXw",
  "status": "Pending"
}

Error responses