Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

This API enables you process refund to a customer for a transaction.

Event Based Webhooks are sent to merchants who have configured a webhook to receive notifications upon completion of a transaction refund. 

Note: Webhook notifications are sent when a refund has either succeeded or failed.

Endpoint

Endpoint

POST: https://sandbox.monnify.com/api/v1/refunds/initiate-refund

Please note that this endpoint is protected using OAuth2 Token. Visit Authentication  section of this document for details on OAuth2 Token.

Request

Initiate Refund Request
{
    "transactionReference": "tranRef",
	"refundReference":"merchantRefundRef",
	"refundAmount": 1000.56,
	"refundReason": "Order cancelled! (limited to 64 characters)",
	"customerNote": "An optional note to be sent to customer (limited to 16 characters)",
	"destinationAccountNumber": "Optional account number to send the refund amount to",
	"destinationAccountBankCode": "Optional bank code to identify the destination bank"
}


Response

Initiate Refund Response
{
   "requestSuccessful":true,
   "responseMessage":"success",
   "responseCode":"0",
   "responseBody":{
	  "refundReference": "refundReference",
      "transactionReference":"MNFY|0111231|123412342",
	  "refundReason": "Order was cancelled",
      "customerNote": "Refund-orderJ111",
      "refundAmount":1200,
      "refundStatus":"IN_PROGRESS",
      "refundType":"FULL_REFUND",
      "createdOn":"2021-04-20 16:21:37.179",
      "completedOn":"",
      "comment":"Transaction refund is in progress."
   }
}

Field Reference

FieldDescriptionConstraints

transactionReference

Unique identifier for the transaction generated by Monnify.

Mandatory

refundAmount

Amount to refund. Minimum value is N10, and maximum is total transaction amount. If not specified, total transaction amount will be refunded.

Optional - Defaults to transactionAmount.
refundReasonA note describing reason why this transaction is being refunded.Mandatory - limited to a 64 character sentence.
customerNoteAn optional note which will be serve as narration in credit to customer's bank account.Optional - If provided, it should be limited to a 16 character sentence.
refundStatusStatus of the refund. Possible values are IN_PROGRESS, FAILED, COMPLETED.
refundTypeFULL_REFUND or PARTIAL_REFUND. FULL_REFUND is refund amount is total transaction amount.
createdOnThe data/time refund was initiated.
completedOnDate and time refund was completed to customer.
commentComment describing status of the refund. If FAILED, comment will contain the reason for the failure.


refundReferenceUnique identifier for the transaction refund generated by the merchant. This value would be used to retrieve the details of a transaction refund.Mandatory - Unique reference generated by the merchant to identify the refund.
destinationAccountNumberOptional account number to send the refund amount to. Defaults to the customer account number on the transaction record.Optional - If provided, you must also provide the destinationAccountBankCode.
destinationAccountBankCodeOptional bank code for the destinationAccountNumber. This value would be used to identify the destination bank. Defaults to the customer bank code on the transaction record.Optional - If provided, you must also provide the destinationAccountNumber.

Response Codes

When refund is initiated, the following response codes may be returned.

Response CodeResponse Message

0

Request is received successfully and will be processed.

R1

Transaction with specified reference does not exist.

R2Refund not permitted for specified transaction.
R3Specified refund amount is above transaction amount.
R4Specified refund amount is below minimum refund amount.
R5Merchant does not have sufficient funds to process refund.
R6Customer account details are invalid.
R7No refund was initiated with the supplied refund reference.
R8supplied value has exceeded the maximum allowed number of characters.
R9Supplied refund reference already exists for the merchant.
R10Merchant account balance could not be retrieved.
R11Name inquiry network error.
R12The total amount of all refunds done on a particular transaction has exceeded the transaction amount.
M01System error. Contact support.
M02System error. Contact support.
  • No labels