Get Refund Status

URL: /api/v1/tx/refundstatus?merchantId={merchantId}&refundId={refundId}&merchantRefundId={merchantRefundId}

METHOD: GET

DIRECTION: Integrator -> PM Gateway

Request

Parameter Name Type Mandatory Description
merchantId ASCII Yes Merchant Id in Elavon
refundId ASCII No RefundID, provided by PM Gateway. Should be always provided if known. Request is considered valid of at least one of refundId or merchantRefundId is provided. If both are provided, refundId will be used for locating the transaction.
merchantRefundId ASCII No Should be used in very rare cases, when client could not process Refund response and refundId is not known. It is client responsibility to ensure uniqueness of merchantRefundId. If refundId is not provided, PM Gateway will try to locate the refund in context of provided merchantId. If more than one refunds are found with the same id, Error will be returned.

http://{root domain}/api/1/tx/refundstatus?merchantId=1234m&refundId=92ec1400-5965-4196-9a87-604433365e33&merchantRefundId=b49c8898-f8c8-435a-828e-f87f5e

 

Response

Parameter Name Type Mandatory Description
merchantId ASCII Yes Merchant ID in Elavon. Max length is 16 symbols
refundId ASCII Yes RefundID , provided by PM Gateway. Should be always provided if known. Request is considered valid of at least one of refundId or merchantRefundId is provided. If both are provided refundId will be used for locating the transaction.
merchantRefundId ASCII No Should be used in very rare cases, when client could not process Refund response and refundId is not known. It is client responsibility to ensure uniqueness of merchantRefundId. If refundId is not provided, PM Gateway will try to locate the refund in context of provided merchantId. If more than one refunds are found with the same id, Error will be returned.

 

Error Codes

All error codes from Refund Response are valid, in addition the following error codes:

Error Code Description
ERR_TX_NOT_FOUND Requested transaction is not found in PM Database, or more than one transaction is found with the same merchantRefundId.

 

http://{root domain}/api/1/tx/refundstatus?merchantId=1234m&refundId=92ec1400-5965-4196-9a87-604433365e33&merchantRefundId=b49c8898-f8c8-435a-828e-f87f5e

Response Parameters

Parameter Name

Type

Mandatory

Description

status ASCII

Yes

Status of Refund request. One of :

  • PENDING - refund is being processed.
  • DECLINED - refund failed
  • SUCCEEDED- refund is successful

In case of error=ERR_TX_NOT_FOUND or error=ERR_INPUT, no status is returned

refundId ASCII

Yes

Refund identifier in PM. Always a valid refund identifier is returned. Possible values : [a-zA-Z0-9 -]. Max length 36 symbols. In case of error=ERR_TX_NOT_FOUND or error=ERR_INPUT, no refundId is returned
merchantRefundId ASCII

Yes

Value of merchantRefundId set in the request.
errorMessage UTF-8

 

Human readable message, up to 200 characters. Set in case of error code <> ERR_OK
error ASCII

Yes

Error code. Refer to possible error codes for more info.
payload JSON

 

Key - value json structure. Used to set payment type specific parameters. In case of error=ERR_TX_NOT_FOUND or error=ERR_INPUT, no payload is returned
fundState ASCII  

Define the funds status. Mandatory when status is set to SUCCEEDED. In case of error=ERR_TX_NOT_FOUND or error=ERR_INPUT, no fundState is returned

Possible values :

  • FUNDS_RECEIVED - shopper refunded successfully
  • FUNDS_REJECTED- shopper's account is not refunded. 
paymentMethod ASCII

  Yes 

Local payment method used by transaction. In case of error=ERR_TX_NOT_FOUND or error=ERR_INPUT, no paymentMethod is returned

 

Error Codes

All error codes from Refund Response are valid, in addition the following error codes:

ERROR

Description

ERR_TX_NOT_FOUND Requested transaction is not found in PM Database, or more than one transaction is found with the same merchantRefundId.

 

Example Response

JSON Encoded
{
  "status": "DECLINED",
  "refundId": "2f139d20-7a34-4c3f-a808-c5016c21d051",
  "merchantRefundId": "48afcb27-8ba5-4b36-aedf-4be2a8",
  "errorMessage": "\"Refund failed due to... \"",
  "error": "ERR_REMOTE_DECLINE",
  "paymentMethod" :"paysera",
  "payload": {
    "property1": "value1",
    "property2": "value2"
  }
}