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

ParameterMandatoryDescription
Content-Typeyesapplication/json
Acceptyesapplication/json
AuthorizationyesBearer Access-admin-oauth-token (Refer Authentication)
User-AgentyesAll 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-Idyesunique identifier for query refund request provided by Merchant

Query parameters

NameTypeMandatoryDescriptionComment
requestorstringyesWho requested the query refunds
refundRequestIdstringyesRequest-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.

NameTypeMandatoryDescriptionComment
idstringyesUniquely identifies each refund. This is generated by the Afterpay and is included in the response
receiptIdstringyesThe unique identifier representing the refund
amountnumberyesThe value of the funds to be refunded
requestorstringyesWho requested the query refundsphone number, employee number etc.
Status: 200 OK
{
  "id": "13e753e2e4a4b2f692b573e5fbe98b7b5523586a",
  "receiptId": "3517998",
  "amount": 100.5,
  "requestor": "6140222333",
}
Language
Click Try It! to start a request and see the response here!