Refund Payment
Refund of a payment is marked as a cancel for certain situations and a refund for other certain situations.
CANCEL: If the refund request is made on the same day the payment was made and there is no partial refund of this payment previously made,
while responding, refundType
returns CANCEL, id
information exists and the paymentTransactionRefunds
list is empty.
REFUND: If a partial refund has been made before, or if the refund request is made on a different day than the day the payment was made,
while responding, refundType
returns REFUND, id
information does not exist and paymentTransactionRefunds
list is full
(includes information about each partial refund).
URL
The endpoint and http method information to refund a payment are stated below.
Request Parameters
The parameters expected to be sent in the requests to be made to refund are listed under the table and sub-headings below.
ID of the payment that that requested to be refunded
"boomerang" value that can be sent with the request and received with the response. This value is not the main value at which the return will occur, but an informative value that can be used to link the return request with different requests. Usually, the order number is used that is stored in merchant own system.
Should the refund is charged by using merchant's balance? Can be used in case of insufficient sub-merchant balance in marketplace payment
Response Parameters
ID of the refund
Value of theconversationId
parameter sent in the payment initiation request
The date that the payment is refunded
See: Refund Status Type
Price of the refund
Bank price of the refund
Wallet price of the refund
Returns CANCEL
if cancelled and REFUND
if refunded
authCode value retrieved from bank for the refund
hostReference value retrieved from bank for the refund
transId value retrieved from bank for the refund
Currency of the refund. See: Currencies
ID of the payment of to be refunded
It is the object that contains information about the transaction of the refunded payment
Sample Codes
You can review the sample codes in the open source Craftgate API clients.