3.18. /api/v2/void
Introduction
Void can only be processed for Sale and Capture transactions in the final successful status (See Statuses). To make a void request send an HTTPS POST request to the URLs and the parameters. Use SHA-1 for authentication.
API URLs
Note
Integration  | 
Production  | 
|---|---|
https://sandbox.goldenapple.com.cy/paynet/api/v2/void/ENDPOINTID  | 
https://gate.goldenapple.com.cy/paynet/api/v2/void/ENDPOINTID  | 
https://sandbox.goldenapple.com.cy/paynet/api/v2/void/group/ENDPOINTGROUPID  | 
https://gate.goldenapple.com.cy/paynet/api/v2/void/void/ENDPOINTGROUPID  | 
Request Parameters
Note
Warning
The following characters must be escaped in the parameter values: & + “.
Parameter Name  | 
Description  | 
Value  | 
|---|---|---|
login  | 
Connecting Party login name.  | 
Necessity: MandatoryType: StringLength: 20 | 
orderid  | 
Unique order identifier assigned by GoldenApple system.  | 
Necessity: MandatoryType: StringLength: 20 | 
client_orderid  | 
Unique Connecting Party identifier.  | 
Necessity: MandatoryType: NumericLength: 10 | 
amount  | 
This optional parameter specifies amount to be reversed.  | 
Necessity: MandatoryType: StringLength: 10 | 
currency  | 
Currency the transaction is charged in (See: Currency codes). Sample values are: USD for US Dollar EUR for European Euro.  | 
Necessity: ConditionalType: StringLength: 3 | 
control  | 
Checksum generated by SHA-1. Control string is represented as concatenation of the following parameters: 
1. Request parameter: login 
2. Request parameter: client_orderid 
3. Request parameter: orderid 
4. merchant_control (Control key assigned to Connecting Party account in the GoldenApple gateway system). 
 | 
Necessity: ConditionalType: StringLength: 128 | 
comment  | 
A brief description of reason.  | 
Necessity: MandatoryType: StringLength: 50 | 
Response Parameters
Note
Parameter Name  | 
Description  | 
|---|---|
type  | 
The type of response. May be async-response, validation-error, error. If type equals validation-error or error, error-message and error-code parameters contain error details  | 
paynet-order-id  | 
Order id assigned to the order by GoldenApple.  | 
merchant-order-id  | 
Connecting Party order id.  | 
serial-number  | 
Unique number assigned by GoldenApple server to particular request from the Connecting Party.  | 
end-point-id  | 
Entry point used for processing this transaction.  | 
error-message  | 
If status is error this parameter contains the reason for decline or error details.  | 
error-code  | 
The error code is case of error status.  | 
Request Example
POST /paynet/api/v2/void/39914 HTTP/1.1
Host: sandbox.goldenapple.com.cy
User-Agent: curl/7.83.0
Accept: */*
Content-Length: 123
Content-Type: application/x-www-form-urlencoded
Connection: close
login=Test
&client_orderid=55
&orderid=6862995
&comment=Service not provided
&control=246e0a2074f9e4b84cff59b2567ed48ec3aab87d
Success Response Example
HTTP/1.1 200 OK
Server: server
Date: Tue, 16 Aug 2022 06:57:40 GMT
Content-Type: text/html;charset=utf-8
Connection: close
Vary: Accept-Encoding
X-XSS-Protection: 1
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000
Content-Language: en-US
Strict-Transport-Security: max-age=31536000
Content-Length: 138
type=async-response
&serial-number=00000000-0000-0000-0000-000002ddae76
&merchant-order-id=55
&paynet-order-id=6862995
&end-point-id=39914
Fail Response Example
HTTP/1.1 200 OK
Server: server
Date: Tue, 16 Aug 2022 07:21:37 GMT
Content-Type: text/html;charset=utf-8
Connection: close
Vary: Accept-Encoding
X-XSS-Protection: 1
X-Content-Type-Options: nosniff
Strict-Transport-Security: max-age=31536000
Content-Language: en-US
Strict-Transport-Security: max-age=31536000
Content-Length: 148
type=validation-error
&serial-number=00000000-0000-0000-0000-000002ddae78
&merchant-order-id=Test
&error-message=INVALID_CONTROL_CODE
&error-code=2
Postman Collection
Request Builder
| String to sign | 
|---|
| Signature | 
|---|
 
             
 				
            
              
            
          |