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

Integration

Production

https://sandbox.payneteasy.eu/paynet/api/v2/void/ENDPOINTID

https://gate.payneteasy.eu/paynet/api/v2/void/ENDPOINTID

https://sandbox.payneteasy.eu/paynet/api/v2/void/group/ENDPOINTGROUPID

https://gate.payneteasy.eu/paynet/api/v2/void/void/ENDPOINTGROUPID

Request Parameters

Note

Request must have content-type=application/x-www-form-urlencoded.

Warning

The following characters must be escaped in the parameter values: & + .

Parameter Name

Description

Value

login

Connecting Party login name.

Necessity: Mandatory
Type: String
Length: 20

orderid

Unique order identifier assigned by Payneteasy system.

Necessity: Mandatory
Type: String
Length: 20

client_orderid

Unique Connecting Party identifier.

Necessity: Mandatory
Type: Numeric
Length: 10

amount

This optional parameter specifies amount to be reversed.

Necessity: Mandatory
Type: String
Length: 10

currency

Currency the transaction is charged in (See: Currency codes). Sample values are: USD for US Dollar EUR for European Euro.

Necessity: Conditional
Type: String
Length: 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 Payneteasy gateway system).
Necessity: Conditional
Type: String
Length: 128

comment

A brief description of reason.

Necessity: Mandatory
Type: String
Length: 50

Response Parameters

Note

Response has Content-Type: text/html;charset=utf-8 header. All fields are x-www-form-urlencoded, with (0xA) character at the end of each parameter’s value.

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 Payneteasy.

merchant-order-id

Connecting Party order id.

serial-number

Unique number assigned by Payneteasy 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.payneteasy.eu
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

Endpointid or groupid

input ENDPOINTID or ENDPOINTGROUPID

login
client_orderid

input Invoice Number

orderid
amount
currency
merchant_control

input Control Key

comment

String to sign
Signature