This endpoint initiates the refund request from the merchant:

HTTP Method

Post

Note:

URL (UAT)

https://uatpg.pay10.ae/pgws/merchant/refund

Note:
The transaction request support requests with data in JSON format.

URL (Production)

https://pg.pay10.ae/pgws/merchant/refund

Note:
The transaction request support requests with data in JSON format.

Request Parameters

📘

*Abbreviations: NU - Numeric, CH – Character, AN – Alphanumeric

Field NameDescriptionRequiredTypeMinMaxExample
PAY_IDPay ID is a unique merchant identifier provided by Pay10YESNU1616160234578452178
ORDER_IDMerchant reference numberYESAN150PAY10_823647263
AMOUNTTotal Sale AmountYESNU312100
CURRENCY_CODE3-digit code of the currencyYESNU33356
TXNTYPEType of TransactionYESAN210STATUS
PG_REF_NUMId generated by Pay10. Use for further communication with Pay10 for tracking the full orderYESNU1616150611417421129
REFUND_FLAGR is a refund flagYESCH11Y
REFUND_ORDER_IDGenerated during refundYESAN620REFUNDID0108323811

This is an example string of a payment request before it is hashed:

📘

{ORDER_ID=PAY10_144644225~REFUND_FLAG=R~AMOUNT=100~PG_REF_NUM=1879120328175249~REFUND_ORDER_ID=REFUND_ID01042218323811~CURRENCY_CODE=784~TXNTYPE=REFUND~PAY_ID=100912012518012}


Now use AES256 Encryption to encrypt the above string.

This is the expected result of the hash value:

📘

ENCDATA=KMlw0myCSYz3ILnhUrzNlF5logncK7o82XTqXUf/b/5l+271u87tVNPl5PrcVYv3VyoqMiodQ57IwFV2bY+4PhWElrH2jdAwaMdVE0ICnvSlnINP5lXGwrLNP5INziM3SCfYuU7ne/AFaUYZ2R5GPEnkJyx31ysbwuiU+UvB0urzvERc0R/nXE9iJ3uAVxVUudNkLwxG4IiJMUuFaS6pj4YsyUu2k6O1OT00oPbNQeU=

Final Request String:

📘

{"PAY_ID":"1009120125180122","ENCDATA":"KMlw0myCSYz3ILnhUrzNlF5logncK7o82XTqXUf/b/5l+271u87tVNPl5PrcVYv3VyoqMiodQ57IwFV2bY+4PhWElrH2jdAwaMdVE0ICnvSlnINP5lXGwrLNP5INziM3SCfYuU7ne/AFaUYZ2R5GPEnkJyx31ysbwuiU+UvB0urzvERc0R/nXE9iJ3uAVxVUudNkLwxG4IiJMUuFaS6pj4YsyUu2k6O1OT00oPbNQeU="}


After posting a created request a response is received

Receive Decrypted Response:

📘

{"PAY_ID":"1009120125180122","ENCDATA":"KMlw0myCSYz3ILnhUrzNlF5logncK7o82XTqXUf/b/5l+271u87tVNPl5PrcVYv3VyoqMiodQ57IwFV2bY+4PhWElrH2jdAwaMdVE0ICnvSlnINP5lXGwrLNP5INziM3SCfYuU7ne/AFaUYZ2R5GPEnkJyx31ysbwuiU+UvB0urzvERc0R/nXE9iJ3uAVxVUudNkLwxG4IiJMUuFaS6pj4YsyUu2k6O1OT00oPbNQeU="}

Now Again AES256 will be used to decrypt the response.

Refund Status

This endpoint will be used to get the status of the refund initiated:

HTTP Method

Post

Note

URL (UAT)

https://uat.pay10.com/pgws/refund/requery

Note:
The transaction request support requests with data in JSON format.

URL (Production)

https://secure.pay10.com/pgws/refund/requery

Note:
The transaction request support requests with data in JSON format.

Request Parameters

📘

*Abbreviations: NU - Numeric, CH – Character, AN – Alphanumeric

Field NameDescriptionRequiredTypeMinMaxExample
PAY_IDPay ID is a unique merchant identifier provided by Pay10YesNU1616160234578452178
ORDER_IDMerchant reference numberYESAN150PAY10_823647263
REFUND_ORDER_IDGenerated during refundYESAN620REFUNDID0108323811

This is an example string of a payment request before it is hashed:

📘

{ORDER_ID=37170171~PAY_ID=1009120902164952~REFUND_ORDER_ID=3213132313213}

Now append salt at the end of the string.

📘

{ORDER_ID=37170171~PAY_ID=1009120902164952~REFUND_ORDER_ID=32131323132131518b6433cc24337}


After completing the above-mentioned process, you will have to call SHA 256 algorithm and pass the parameter string to the same and the SHA will return you the desired result as below.

This is the expected result of the hash value:

📘

Hash value = A08FD314FDDF5B14A304EC978600AAEF03C92ACE86FD06982C61B5056FC07DFC

This is the expected final post request:

📘

{"PAY_ID": "1102111026150307", "ORDER_ID": "37170171", "REFUND_ORDER_ID": "20221212174211",

"HASH": "6797F1842DEB4F3EBAEAD53E1BAFD5A535D322B9FA3893F201FDB03933EEAE09"}

Now, the response one will receive if data found:

📘

{RESPONSE_DATE_TIME=2023-03-25 10:44:54, RESPONSE_CODE=000, REFUND_FLAG=R,MOP_TYPE=1027, PG_TXN_MESSAGE=SUCCESS, STATUS=Captured, PG_REF_NUM=5179120325104453, AMOUNT=100, RESPONSE_MESSAGE=SUCCESS, REFUND_ORDER_ID=20221212174211, RRN=ARI3790714,ACQ_ID=ARI3790714, TXNTYPE=REFUND, SURCHARGE_FLAG=Y, PAYMENT_TYPE=NB, PAY_ID=1102111026150307, ORDER_ID=37170171}

And the response one will receive if data not found:

📘

{ PAY_ID=1102111026150307, ORDER_ID=37170171, RESPONSE_CODE=300, RESPONSE_MESSAGE=NO DATA FOUND, REFUND_ORDER_ID=20221212174212, HASH=7CAB90F17E7C7CE664EB6823E3DC38F44B7CF5E7876697D5E0B025AEF2563E7E}

Response Code for Valid Refund Transaction

Response CodeMessageStatus
004Refund Declined/ payment Declined/ Transaction DeclinedDeclined
007Refund Rejected / payment Rejected / Transaction RejectedRejected
013Total refund amount greater than sale amountREFUND_REJECTED
014Refund Amount should be less than today's Captured AmountREFUND_DENIED
016In case of Full Refund, Refund Amount shall be equal to the Sale AmountREFUND_FLAG_AMOU NT_NOT_MATCH
022Refund Failed/ Payment Failed/ Transaction FailedFailed at Acquirer
000PendingREFUND_INITIATED
000SUCCESSCaptured