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: apiv2.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 |
string | 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. |
| MID required |
string | Please get this MID from PayG Dashboard |
| PaymentType required |
string | Identifies the type of the payment., eg: CreditCard/DebitCard/upi,etc |
| PaymentTransactionId required |
string | PaymentTransactionId generated for specific transaction provided by PayG system and it should not be repeated. |
| RefundAmount required |
decimal(18,2) | Refund Amount - This amount will be shown to user for refund payment. |
| RefundFlagParam optional |
string(1) | Notation of C and R RefundFlag. |
| RefundUniqueRequestId optional |
alphanumeric(30) | Pass Unique Id to identify Refunds |
| OrderKeyId |
string |
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 | Echo from request |
| OrderType | string | Echo from request |
| OrderAmount |
decimal(18,2) | Transaction Amount |
| PaymentTransactionId |
string | Id generated for that transaction |
| PaymentResponseCode |
integer | Payment Status of the order. Please refer for Payment Response Codes |
| PaymentTransactionRefNo |
string | Refunded amount Transaction reference number. |
| PaymentResponseText |
string | eg: created, completed-approved transaction,cancelled payment by user |
| PaymentMethod |
string Specified Values | Transaction processed with eg: CreditCard, DebitCard, UPI etc |
| PaymentAccount |
string |
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 digits of card, Netbanking - then BankName, Wallet - then Wallet Name like PayTM, Freecharge etc. |
| OrderRefundTransactionId |
integer | Transaction ID generated for refund. |
| RefundPaymentResponseCode |
integer | Refund Payment Response Code eg: 1,2,4 .. |
| RefundPaymentResponseText |
string | Refund payment response text eg: Transaction Successful, Declined/Failed, Pending etc. |
| RefundFlag |
string | When amount is Partially refunded then RefundFlag is showing "C" and When amount is Fully refunded then RefundFlag is showing "R" |
| RefundDateTime |
string | Date & Time for refund transaction. |
| PaymentDateTime | datetime | Time & Date of the payment |
| UpdatedDateTime | datetime | Updated time & date of the payment |
Authorization: basic YTVhZWNlNT4466tbfb47zM0MWVmNGE6ZTJkYTI2MTYxYjRiNDhmYzk1YjU5ZGFmMjE5MWZiMzM6TTo3Nzcx
Content-Type: application/json
{
"OrderKeyId": "18258220120M8792Uf3f5b5a14p",
"MID": "Your MID - Provided by PayG",
"PaymentType": "CreditCard",
"PaymentTransactionId":"723333",
"RefundAmount":"100",
"RefundFlagParam":"C",
"RefundUniqueRequestId":"gvfdcssrd4567776"
}
{
"OrderKeyId": "1176022656723M10404U3d73c9044feb4985621eab",
"MerchantKeyId": 13804,
"UniqueRequestId": "1234tuyuntty",
"OrderType": "PAYMENT",
"OrderAmount": 20.00,
"PaymentTransactionId": "786232",
"PaymentResponseCode": 1,
"PaymentTransactionRefNo": "995984648728",
"PaymentResponseText": "Approved",
"PaymentMethod": "CreditCard",
"PaymentAccount": "411111XXXX1111",
"OrderRefundTransactionId": 786233,
"RefundPaymentResponseCode": 1,
"RefundPaymentResponseText": "ACCEPTED",
"RefundFlag": "R",
"RefundDateTime": "2026-08-05T17:31:29.2893791+05:30",
"PaymentDateTime": "8/5/2026 5:30:41 PM",
"UpdatedDateTime": "8/5/2026 5:29:24 PM",
}
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.
Once refund initiated, you can check the status if refund transaction.
Check Refund status Request ,Refund status Response Object and samples
Refund status Request , Refund status Request Sample, Refund status Response , Refund status Response Sample
Use the below url to create refund status for order in your (backend) server.
Production URL: apiv2.payg.in/payment/api/order/RefundStatus
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. |
| UniqueRequestId optional |
string | Unique Id generated for that particular Request and you can also check refund status API using UniqueRequestId. |
| MID required |
string | Please get this MID from PayG Dashboard. |
| TransactionId optional |
integer | original PayG TransactionID |
| RefundUniqueRequestId optional |
alphanumeric(30) | Refund status can be checked using this parameter also |
| 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 |
| OrderType | string(20) | Echo from request |
| OrderAmount |
decimal(18,2) | Transaction Amount |
| OrderId | string(20) | Echo from request |
| OrderStatus |
string(10) | Status of the order. Please refer for Order Status Codes |
| OrderPaymentStatus | integer | Status of the order., eg: 0,1,2,3,4,5,6,7 |
| OrderPaymentStatusText | string | Status of the order., eg: Paid |
| PaymentStatus |
integer | Status Code of the payment., |
| PaymentTransactionId |
string(50) | Id generated for that transaction |
| PaymentResponseCode |
integer | Payment Status of the order. Please refer for Payment Response Codes |
| PaymentApprovalCode |
string(20) | Unique number identifying the Approved transaction |
| PaymentReasonCode |
integer | Code for transaction failure/approval. |
| PaymentTransactionRefNo |
string | Refunded amount Transaction reference number. |
| 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 |
| CardType |
string | Type of card eg: rupay, visa, mastercard etc. |
| CardLevel |
string | Level of card eg: Domestic, platinum etc. |
| 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 |
| PaymentProcessUrl* |
url | PayG payment url for customer to pay, you need to redirect to this url for payment processing. |
| CustomerData | object of CustomerData | Customer data passed in oreder creation will be provided in this. |
| ProductData | object of ProductData | Product data passed in oreder creation will be provided in this. |
| 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. |
| OrderPaymentTransactionDetail | object | Transaction Details for Order for specific OrderKeyId. |
| 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 |
| TransactionId |
integer | Id generated for that transaction |
| ResponseCode |
integer | Payment Status of the order. Please refer for Payment Response Codes |
| ResponseText |
string(50) | eg: created, completed-approved transaction,cancelled payment by user |
| TransactionAmount |
decimal(18,2) | Transaction Amount |
| TransactionType |
String | Charge/Refund |
| TransactionReferenceNo |
String | Transaction reference number for Charge/Refund. |
| RefundFlag |
string | When amount is Partially refunded then RefundFlag is showing "C" and When amount is Fully refunded then RefundFlag is showing "R" |
| RefundUniqueRequestId | alphanumeric(30) | Refund status can be checked using this parameter also |
| UserDefinedData | object of UserDefinedData | User Defined Data passed in oreder creation will be provided in this. eg: "UserDefined1": "null", "UserDefined2": null etc. |
| Id | integer | Id generated for specific orderkeyid. |
Status Sample
Authorization: basic YTVhZWNlNTg3NWEwNDA0NGJmZjQ5MWRlNzM0MWVmNGE6ZTJkYTI2MTYxYjRiNDhmYzk1YjU5ZGFmMjE5MWZiMzM6TTo3Nzcx
Content-Type: application/json
{
"OrderKeyId": "114075260327M13791U302fb7a9766trfed",
"MID": "Your MID - Provided by PayG",
"TransactionId": 783390,
"RefundUniqueRequestId": "TEST202601145" //optional
}
{
"OrderKeyId":"114075260327M13791U302fb7a9766trfed",
"MerchantKeyId":21456,
"UniqueRequestId":"SEAMU09644",
"OrderType":"PAYMENT",
"OrderAmount":110.00,
"OrderId":null,
"OrderStatus":"1",
"OrderPaymentStatus":0,
"OrderPaymentStatusText":"Paid",
"PaymentStatus":0,
"PaymentTransactionId":"783390",
"PaymentResponseCode":1,
"PaymentApprovalCode":"",
"PaymentReasonCode":null,
"PaymentTransactionRefNo":"559563036675",
"PaymentResponseText":"Approved",
"PaymentMethod":"Upi",
"PaymentAccount":"upi.approve@paygdigitals",
"CardType":null,
"CardLevel":null,
"OrderNotes":"6.0",
"PaymentDateTime":"3/27/2026 5:48:24 PM",
"UpdatedDateTime":"3/27/2026 5:50:29 PM",
"PaymentProcessUrl":null,
"CustomerData":{
"CustomerId":"152433",
"CustomerNotes":"Mens clothing",
"FirstName":"Avinash",
"LastName":"Kushwaha",
"MobileNo":"8787665319",
"Email":"paygmail@paymail.com",
"EmailReceipt":false,
"BillingAddress":"Thane",
"BillingCity":"Thane",
"BillingState":"Maharashtra",
"BillingCountry":"India",
"BillingZipCode":"400606",
"ShippingFirstName":"Avinash",
"ShippingLastName":"Kushwaha",
"ShippingAddress":"Lodha thane",
"ShippingCity":"Thane",
"ShippingState":null,
"ShippingCountry":"India",
"ShippingZipCode":"400606",
"ShippingMobileNo":"9996669698"
},
"ProductData":"{'PaymentReason':'OnlineOrder for OrderNo- 1234'}",
"OrderPaymentCustomerData":null,
"UpiLink":null,
"OrderPaymentTransactionDetail":[
{
"OrderKeyId":"114075260327M13791U302fb7a9766trfed",
"MerchantKeyId":21456,
"TransactionId":783390,
"ResponseCode":1,
"ResponseText":"Approved",
"TransactionAmount":110.00,
"TransactionType":"Charge",
"TransactionReferenceNo":"559563036675"
},
{
"OrderKeyId":"114075260327M13791U302fb7a9766trfed",
"MerchantKeyId":21456,
"TransactionId":783391,
"ResponseCode":1,
"ResponseText":"Transaction Successful",
"TransactionAmount":20.00,
"RefundFlag":"R", //optional
"RefundUniqueRequestId":"TEST202601145", //optional
"TransactionType":"Refund",
"TransactionReferenceNo":"879765766645"
},
{
"OrderKeyId":"114075260327M13791U302fb7a9766trfed",
"MerchantKeyId":21456,
"TransactionId":783392,
"ResponseCode":1,
"ResponseText":"Transaction Successful",
"TransactionAmount":30.00,
"RefundFlag":"R", //optional
"RefundUniqueRequestId":"TEST202601146", //optional
"TransactionType":"Refund",
"TransactionReferenceNo":"409965337654"
}
],
"UserDefinedData":{
"UserDefined1":null,
"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
},
"SplitPaymentResponse":null,
"Id":114075
}