get https://api-uat.payments.paynow.afterpaytouch.dev/v1/payments?requestor=&paymentRequestId=
Use this API to query the payment completed earlier
Search for Request Payment already completed.
This interface could only be accessed by the Optus host. All other access will be blocked. IP whitelisting will ensure only traffic from Optus could access this endpoint.
The interface provided is an HTTP GET request and JSON response.
HTTP Request
GET https://<env>/v1/payments?requestor={requestor}&paymentRequestId={paymentRequestId}
Request headers
Parameter | Mandatory | Description |
---|---|---|
Content-Type | yes | application/json |
Accept | yes | application/json |
Authorization | yes | Bearer Access-admin-oauth-token (Refer Authentication) |
User-Agent | yes | All requests must include information about the Merchant, Platform, Channel and Service. For example `Merchant/FGH; Platform/Digital; MerchantId/ABC123; Channel/app; CountryCode/AU; System Information/Java/8.3; Service/Shop |
Request-Id | yes | unique identifier for query payment request provided by Merchant |
Query parameter
Name | Type | Mandatory | Description | Comment |
---|---|---|---|---|
requestor | string | yes | Who requested the query payment | |
paymentRequestId | string | yes | Request Id of the original payment request provided by Merchant |
Sample Example
curl -v -X POST https://<env>/v1/payments?requestor=0464613757&paymentRequestId=84567324156665656565656565656511 \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer eghijkWerTyuiohjhkjhjkh" \
-H "User-Agent: Merchant/FGH; Platform/Merchant-BE; MerchantId/ABC123; Channel/sms; CountryCode/AU System Information/Java/8.3; Service/Recharge"\
-H "Request-Id: 84567324156665656565656565656512" \
Response body
A successful request returns the 200 OK
status code and a JSON response body.
Name | Type | Mandatory | Description | Comment |
---|---|---|---|---|
id | string | yes | Uniquely identifies each payment. This is generated by the APT and is included in the response | |
receiptId | string | yes | The unique identifier representing the payment processed | |
token | string | no | The unique identifier representing the customer's payment card | |
amount | number | yes | The value of the funds to be transferred from the payment card | |
currency | string | yes | The currency in which the transaction is to occur | |
initiator | string | yes | indicates whether this transaction is initiated by customer or merchant | E.g. Merchant/Customer |
requestor | string | yes | Who requested the query payment | phone number, employee number etc. |
Sample Example
Status: 200 OK
{
"id": "13e753e2e4a4b2f692b573e5fbe98b7b5523586a",
"receiptId": "342344",
"token": "6966af4975984c30ae2e2c18985bc21c",
"amount": 100.5,
"currency": "AUD",
"initiator": "Customer",
"requestor": "6140222333",
}