Refund API ??
-
Refunds are reversal transactions in which money is returned to the customer's source account.
-
A refund can only be issued in the case of a successful or settled transaction.
Refunds are reversal transactions in which money is returned to the customer's source account.
A refund can only be issued in the case of a successful or settled transaction.
Check Order Refund Request , Order Refund Response Object and samples
Order Refund Request , Order Refund Request Sample, Order Refund Response , Order Refund Response Sample
Use the below url to create refund for order in your (backend) server.
Production URL: paygapi.payg.in/payment/api/order/Refund
Required headers:
Header Name | Header Value |
Authorization required |
basic PayGAuthentication PayGAuthentication = base64encoded(MerchantAuthenticationKey:MerchantAuthenticationToken:M:MerchantKeyId) OR generate Authorization Header value in PayG Dashboard. |
Content-Type required |
application/json |
OrderKeyId required |
integer | Id generated based on the create order request from PayG and should be stored in your system for status, verification or any communication with PayG. |
Merchantkeyid required |
integer | Please get this merchantkeyid from PayG Dashboard |
PaymentType required |
string | Please get this merchantkeyid from PayG Dashboard |
PaymentTransactionId required |
string(10) | Unique Id generated for that particular Request and it should not be repeated, alphanumeric only. |
RefundAmount required |
decimal(18,2) | Refund Amount - This amount will be shown to user for refund payment. |
RedirectUrl | url | Redirect url given by the merchant after transaction |
OrderKeyId |
string(30) |
Id generated based on the create order request from PayG and should be stored in your
system for status, verification or any communication with PayG. |
MerchantKeyId |
integer | Id which is obtained on MerchantRegistration |
UniqueRequestId |
string(20) | Echo from request |
OrderAmount |
decimal(18,2) | Transaction Amount |
OrderStatus |
string(10) | Status of the order. Please refer for Order Status Codes |
OrderStatusText |
string(50) | Order Status Text ex: created, completed-approved transaction,cancelled payment by user. Please refer Order Status Code for any programming decision |
PaymentTransactionId |
string(50) | Id generated for that transaction |
PaymentResponseCode |
int | Payment Status of the order. Please refer for Payment Response Codes |
PaymentApprovalCode |
string(20) | Unique number identifying the Approved transaction |
PaymentResponseText |
string(50) | eg: created, completed-approved transaction,cancelled payment by user |
PaymentMethod |
string Specified Values | Transaction processed as |
PaymentAccount |
string(50) |
Payment processed account detail. Data depending on PaymentMethod.
if processed as UPI - then VPA /UPI ID, Credit/DebitCard - then Card number first 6 and last 4 of card , Netbanking - then BankName, Wallet - then Wallet Name like PayTM, PhonePe etc |
PaymentProcessUrl* |
url | PayG payment url for customer to pay, you need to redirect to this url for payment processing. |
OrderType | string(20) | Echo from request |
OrderId | string(20) | Echo from request |
OrderNotes | string(100) | Risk and Security Notes - if you see detail in this, make sure to address with business team as soon as possible |
PaymentDateTime | datetime | Time & Date of the payment |
UpdatedDateTime | datetime | Updated time & date of the payment |
OrderPaymentCustomerData | object of CustomerData | if user have changed their customer data on payG payment page while transaction processing, updated data will be provided in this. |
Authorization: basic YTVhZWNlNTg3NWEwNDA0NGJmZjQ5MWRlNzM0MWVmNGE6ZTJkYTI2MTYxYjRiNDhmYzk1YjU5ZGFmMjE5MWZiMzM6TTo3Nzcx
Content-Type: application/json
{
"OrderKeyId": "18258220120M8792Uf3f5b5a14p",
"MerchantKeyId": "8792",
"PaymentType": "NetBanking",
"PaymentTransactionId":"724333",
"RefundAmount":"100"
}
{
"OrderKeyId":"210923M8340Uf3f5b5c13h",
"MerchantKeyId":8340,
"UniqueRequestId":"f3f5b5c13h",
"OrderType":"PAYMENT",
"OrderAmount":100.0,
"OrderId":null,
"OrderStatus":null,
"OrderPaymentStatus":0,
"OrderPaymentStatusText":null,
"PaymentStatus":0,
"PaymentTransactionId":null,
"PaymentResponseCode":0,
"PaymentApprovalCode":null,
"PaymentTransactionRefNo":null,
"PaymentResponseText":null,
"PaymentMethod":null,
"PaymentAccount":null,
"OrderNotes":null,
"PaymentDateTime":null,
"UpdatedDateTime":null,
"PaymentProcessUrl":"https://uat.payg.in/payment/payment?orderid=210923M8340Uf3f5b5c13h",
"OrderPaymentCustomerData":{
"FirstName":"ravi",
"LastName":null,
"Address":null,
"City":null,
"State":null,
"ZipCode":null,
"Country":null,
"MobileNo":"7337327109",
"Email":"test@gmail.com",
"UserId":null,
"IpAddress":null
},
"UpiLink":null,
"OrderPaymentTransactionDetail":null,
"UserDefinedData":{
"UserDefined1":"",
"UserDefined2":null,
"UserDefined3":null,
"UserDefined4":null,
"UserDefined5":null,
"UserDefined6":null,
"UserDefined7":null,
"UserDefined8":null,
"UserDefined9":null,
"UserDefined10":null,
"UserDefined11":null,
"UserDefined12":null,
"UserDefined13":null,
"UserDefined14":null,
"UserDefined15":null,
"UserDefined16":null,
"UserDefined17":null,
"UserDefined18":null,
"UserDefined19":null,
"UserDefined20":null
}
}