Payment refund

The refund can be partial or full and can only be made once.

If the payment was partially refunded and later the need came to refund the rest of the amount, you will have to contact the maib ecomm support team.

API endpoint (POST)

https://api.maibmerchants.md/v1/refund

Request parameters

ParameterRequiredTypeDescription

payId

YES

String

The identifier of the transaction to be refunded.

refundAmount

NO

Number(decimal)

Amount to be returned to Costumer. Format: X.XX

E.g: 10.25 (currency=USD) means $10 and 25 cents.

It can be less than or equal to the transaction amount.

If this parameter is not present, the full transaction amount will be refunded.

Example

{
"payId": "f16a9006-128a-46bc-8e2a-77a6ee99df75",
"refundAmount": 10.25
}

Response parameters

ParameterTypeDescription

result

Object

Object containing transaction data.

  • payId

String

Transaction identifier assigned by maib ecomm.

  • orderId

String

Order ID generated by Merchant website/app.

  • status

String

Refund status.

OK - successfully refunded.

REVERSED - the transaction has previously been refunded; repeated refund are not allowed.

  • statusCode

String

Transaction status code

  • statusMessage

String

Transaction status information message

  • refundAmount

Number(decimal)

Amount returned to Costumer. Format: X.XX

ok

Boolean

Request/transaction processing status.

true - no errors

false - an error occurred (error details will be in errors)

errors

Array

Request/transaction processing errors. Errors table

  • errorCode

String

Error code

  • errorMessage

String

Error description

  • errorArgs

Object

Object contains parameters with error details

Example

{
"result": {
"payId": "f16a9006-128a-46bc-8e2a-77a6ee99df75",
"orderId": "123",
"status": "OK",
"statusCode": "400",
"statusMessage": "Accepted",
"refundAmount": 10.25
},
"ok": true
}

Last updated