Credit Card

Payment Refund

Payment Refund is an optional service to assist credit card users in requesting a refund. This service allows you to apply for a refund on transactions that have already reached the settlement stage. Learn more Credit Card

Flow

You send the required parameters to make a request, and Espay Payment Gateway will respond in JSON format.

Headers

Key Value
Method
HTTP Post
Connection
keep-alive
Content-Length
250
Content-Type
application/x-www-form-urlencoded
Accept
*/*

API URL

Environment URL
Sandbox
https://sandbox-api.espay.id/rest/creditcard/refundpayment
Production
https://api.espay.id/rest/creditcard/refundpayment

Request Parameters

Parameter Type Mandatory Description
rq_uuid
String (64)
Y
Request identifier. A unique ID used to identify messages.
rq_datetime
String (19)
Y
Date and time of the transaction request from the merchant's server.

Format:
yyyy-MM-dd hh:mi:ss

Example:
2024-03-14 07:49:28
comm_code
String (32)
Y
Merchant code from Espay team.

Example:
SGWYESSISHOP
trx_id
String (32)
Y
Transaction ID from Espay.
amount
String (20)
Y
Total amount.

Example:
150000
signature
String (64)
Y
Code used to validate transactions. Learn Signature.

Response Parameters

Parameter Type Mandatory Description
rq_uuid
String (4)
Y
Request identifier. A unique ID used to identify messages.
rs_datetime
String (32)
Y
Date and time of the transaction response from the Espay server.
trx_id
String (32)
Y
Transaction ID from Espay.
status_transaction
String (32)
Y
Transaction status.

Format:
  • Success: S
  • Failed: F
error_code
String (4)
Y
Response code.

Format:
  • Success: 0000
  • Failed: 9999
error_message
String (32)
Y
Response description.


































Sample Request



POST /rest/creditcard/refundpayment HTTP/1.1
Host: sandbox-api.espay.id
Connection: keep-alive
Content-Length: 250
Content-Type: application/x-www-form-urlencoded
Accept: */*

rq_uuid=SGWMOVIC0c7f0065-c706-4b65-863d-689ab495a67a
&rq_datetime=2021-10-12 15:17:00
&comm_code=SGWMOVIC
&trx_id=MOV12102111361093
&amount=300000
&signature=2c9a29f21e7f33356abb69fe6857ea267070f2559e2463c078310f1ddcc5e06c
		
		
		
               











Sample Response


{
    "rq_uuid":"SGWMOVIC0c7f0065-c706-4b65-863d-689ab495a67a",
    "rs_datetime":"2021-10-12 15:17:19",
    "trx_id":"MOV12102111361093",
    "status_transaction":"S",
    "error_code":"0000",
    "error_message":"Success"
}
		
		
                




CURL PHP
Scroll to Top