get https://api-uat.payments.paynow.afterpaytouch.dev/v1/refunds/?requestor=&refundRequestId=
Use this API to query a refund completed earlier
Search for Request Refund previously done.
This interface could only be accessed by the merchant 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/refunds/?requestor={requestor}&refundRequestId={refundRequestId}
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/Optus; Platform/Crimson; MerchantId/ABC123; Channel/SMS; CountryCode/AU; System Information/Java/8.3; Service/Auto-recharge |
Request-Id | yes | unique identifier for query refund request provided by Merchant |
Query parameters
Name | Type | Mandatory | Description | Comment |
---|---|---|---|---|
requestor | string | yes | Who requested the query refunds | |
refundRequestId | string | yes | Request-Id of the original refund request provided by Merchant |
Sample Example
curl -v -X GET https://<env>/v1/refunds?requestor=0464613757&refundRequestId=84567324156665656565656565656513\
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer efghjkiWERtyuio" \
-H "Request-Id: 84567324156665656565656565656514" \
-H "User-Agent: Merchant/ABC; Platform/BE; MerchantId/ABC123; Channel/app; CountryCode/AU System Information/Java/8.3; Service/Shop"\
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 refund. This is generated by the Afterpay and is included in the response | |
receiptId | string | yes | The unique identifier representing the refund | |
amount | number | yes | The value of the funds to be refunded | |
requestor | string | yes | Who requested the query refunds | phone number, employee number etc. |
Status: 200 OK
{
"id": "13e753e2e4a4b2f692b573e5fbe98b7b5523586a",
"receiptId": "3517998",
"amount": 100.5,
"requestor": "6140222333",
}