Credit Card

Payment Void

Payment Void is an optional service to assist credit card users in cancelling transactions. This feature can be used if the transaction has not reached the settlement stage, so funds will not be deducted from your account. 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/voidpayment
Production
https://api.espay.id/rest/creditcard/voidpayment

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/voidpayment HTTP/1.1
Host: sandbox-api.espay.id
Connection: keep-alive
Content-Length: 250
Content-Type: application/x-www-form-urlencoded
Accept: */*

rq_uuid=SGWMOVICfcf63291-9681-4934-8103-fe9598b5fddd
&rq_datetime=2021-10-12 15:17:00
&comm_code=SGWMOVIC
&trx_id=MOV12102111506156
&amount=10000
&signature=ec7a711b2fff5ca0d48419991f5f471dbe2ade63b5fb12eaf7ea2a0044171a36
		
               














Sample Response

{
    "rq_uuid":"SGWMOVICfcf63291-9681-4934-8103-fe9598b5fddd",
    "rs_datetime":"2021-10-12 15:17:16",
    "trx_id":"MOV12102111506156",
    "status_transaction":"V",
    "error_code":"0000",
    "error_message":"Success"
}	
                




CURL PHP
Scroll to Top