Description
The refundToken request will create refund for the transaction currency.
URL: https://secure.3gdirectpay.com/API/v6/
Usage
Use this method in order to create refund for paid transaction.
Response
The method will response with the result of your request
Variables to send:
Parameter | Data type | Description | |
Request | Text | refundToken | Mandatory |
CompanyToken | Token | Token you got from 3G to operate this API | Mandatory |
TransactionToken | Token | Transaction token as accepted from the createToken. | Mandatory |
refundAmount | Numeric | Requested refund amount. | Mandatory |
refundDetails | Text | Requested refund description. | Mandatory |
refundRef | Text | Refund reference. | Optional |
refundApproval | 1\0 | In case it being sent, refund will be checked by a checker. | Optional |
Request example:
<?xml version="1.0" encoding="utf-8"?> <API3G> <Request>refundToken</Request> <CompanyToken>68B90B5E-25F6-4146-8AB1-CV4GA0C41A7F</CompanyToken> <TransactionToken>246757AE-4D4F-7763-BFF5-326704703102</TransactionToken> <refundAmount>1.2</refundAmount> <refundDetails>Refund discription</refundDetails> </API3G>
Respond:
The server will respond for the refundToken request according to the following results:
Parameter | Data type | Description |
Result | 3 digits code | A code will be sent with the result of the request |
ResultExplanation | Text | Free text of the result |
Codes in the response:
Code | Explanation |
000 | Refund successful |
801 | Request missing company token |
802 | Wrong CompanyToken |
803 | No request or error in Request type name |
804 | Error in XML |
950 | Request missing transaction level mandatory fields/Data mismatch - field name |
999 | 'Refund failed - error description |
Respond example:
<?xml version="1.0" encoding="utf-8"?> <API3G> <Result>000</Result> <ResultExplanation>Refund successful</ResultExplanation> </API3G>