For refund on the previously charged transaction, Service Providers need to invoke the refund API. The refund API supports both full refund and partial refund. Service Providers need to make sure the total amount refunded doesn’t exceed the original charge amount, if not, the AOC platform will return error for the refund transaction.

Request

HTTP Method

POST

POST <AOC_SERVER>/api/refund
HTTP/1.1
Content type: application/x-www-form-urlencoded


{
  "apiKey":"Ofa3M7zS2c3",
  "username":"test",
  "spTransID":"201903192030-test1",
  "aocTransID":"12345",
  "amount":"1.00"
}

Request Parameter

Parameter Name

Description

Usage

username

This will be the username provided to the Service Provider by BOOSTCONNECT.

(STRING) Mandatory

apiKey

This will be API Key to access AOC. Will be provided by BOOSTCONNECT.

(STRING) Mandatory

spTransID

This is a unique transaction id per API call event generated by Service Provider. It is your reference for troubleshooting purposes.

(STRING) Mandatory

aocTransID

This is the aocTransID for the original charge transaction.

(STRING) Mandatory

amount

This is the actual amount for refund. It need to be two digit decimal such as 3.00, 6.50 and etc.

(DECIMAL) Mandatory

Response

HTTP/1.1 200 OK 
Content-Type: application/json 
Date: Tue, 01 Nov 2016 12:00:00 GMT


{ "data":
{ 
    "aocTransID":"12345", 
    "transactionOperationStatus":"refunded",
    "amountRefunded":"1.00", 
    "errorCode":"00", 
    "errorMessage":"" 
} 
}

Response Parameter

Parameter Name

Description

Usage

transactionOperationStatus

The status of the charge transaction as below:

  1. Refunded. (mean successfully refunded).
  2. Denied. (failed to refund. Check the error code list for reason).

(STRING)

amountRefunded

This is the actual amount being refunded. It can be a whole number or two digit decimal.

(DECIMAL)

aocTransID

This is the unique transaction id generated by AOC Gateway. This id will be used for any future reconciliation purposes.

(STRING)

clientCorrelator

This is the client correlator id that will be returned for all success refund transactions. Do keep this id as it will be used for reconciliation purposes.

(STRING)

errorCode

Please check on the error code list.

(STRING)

errorMessage

Explanation of the error.

(STRING)