Delete invoice

The present API allows to delete created invoices.

The request with required parameters is to be formed on the side of merchant and to be transferred by POST method through HTTP protocol to URL https://api.wayforpay.com/api

 

Request parameters

 

Parameter

Description

Mandatory

transactionType

REMOVE_INVOICE

Yes

apiVersion

The protocol version. Default value: 1

Yes

merchantAccount

Seller’s identifier. This value is to be assigned to You from the side of WayForPay

Yes

orderReference

Unique number of invoice in the merchant’s system (Unique Number of created invoice)

Yes

merchantSignature

Signing of the request

Yes

 

Requests authentication

For the purposes of confirmation of data validity there should be generated and transferred in the request the HMAC_MD5 control signature using SecretKey of merchant.

The line which subjects to HMAC_MD5 is generated through catenation of parameters merchantAccount, orderReference, divided with “;” (semi-column) in coding UTF-8

 

Response parameters:

reason

Reason for refusal

reasonCode

Code of refusal

 

An example of request and response

Request:
{
"apiVersion": "1",
"transactionType": "REMOVE_INVOICE",
"merchantAccount": "test_merch_n1",
"orderReference": "INV-1479196343",
"merchantSignature": "bc54562dc1fa928b52fd3eb0e4d36937"
}

 

Response:
{
"reason": "Removed",
"reasonCode": 1100
}