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

The path in API URL should not be hardcoded, as it may be changed in future.

Integration

Production

https://sandbox.solidpayments.com/paynet/api/v2/void/ENDPOINTID

https://gate.solidpayments.com/paynet/api/v2/void/ENDPOINTID

https://sandbox.solidpayments.com/paynet/api/v2/void/group/ENDPOINTGROUPID

https://gate.solidpayments.com/paynet/api/v2/void/group/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 Solid Payments system.

Necessity: Mandatory
Type: String
Length: 20

client_orderid

Unique Connecting Party identifier.

Necessity: Mandatory
Type: String
Length: 128

amount

Amount to be voided. The amount has to be specified in the highest units with . delimiter. For instance, 10.5 for USD means 10 US Dollars and 50 Cents. If this parameter is omitted, the transaction is voided as a whole. If amount is passed, currency must be passed too.

Necessity: Optional
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. Mandatory if amount is passed.

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 Solid Payments gateway system).
amount and currency are not part of the control string, even if they are passed in the request.
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 Solid Payments.

merchant-order-id

Connecting Party order id.

serial-number

Unique number assigned by Solid Payments 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.solidpayments.com
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

Open API Collection

Open this method in the OpenAPI Reference

View in OpenAPI

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