Where an authorisation has been submitted and the funds do not need to be settled, a Cancel request can be submitted to release the authorisation from the customer’s card. The request will need to include the reference for the original authorisation.
API examples
Cancel
POST /acceptor/rest/transactions/{instId}/13504712365/cancel
{}
HTTP/1.1 201
{
"processing": {
"authResponse": {
"gatewayReference": "8849361392630503",
"gatewayCode": "1",
"gatewayMessage": "CANCELLED OK",
"status": "AUTHORISED"
},
"route": "MCPE"
},
"financialServices": {
"dateOfBirth": "19870818",
"surname": "Smith",
"accountNumber": "123ABC",
"postCode": "BS20"
},
"transaction": {
"transactionId": "13504712366",
"status": "SUCCESS",
"type": "CANCEL",
"amount": 1000,
"consumerSpend": 0,
"currency": "GBP",
"transactionTime": "2014-01-06T21:01:05.720Z",
"receivedTime": "2014-01-06T21:01:05.720Z",
"relatedTransaction": {
"transactionId": "13504712365",
"merchantRef": "mer_txn_1234557"
},
"channel": "WEB"
},
"outcome": {
"status": "SUCCESS",
"reasonCode": "S100",
"reasonMessage": "Authorised"
}
}
API Endpoint
request body:
{ | |
transaction { | |
commerceType | string Possible Values: ECOM, MOTO, CNP |
channel | string Possible Values: WEB, MOBILE, SMS, RETAIL, MOTO, IVR, OTHER The Sales Channel for your Customer’s cancel. If not provided the it will be inherited from the original transaction. |
merchantRef | string |
description | string |
} | |
} |
response:
{ | |
clientRedirect { | Information about where to send your customer in the case of 3DS or a Callback. |
frame | string Possible Values: CONTAINER, TOP The redirect type when the transaction is set to suspend and redirect to a new URL. |
pareq | string Returned when the transaction is suspended for 3DS authorisation. |
url | string The URL the Customer should be redirected to. |
} | |
fraudGuard { | Information about the Payment. |
score | float The score assigned by FraudGuard. Refer to FraudGuard documentation for further details. |
geoLocation { | |
ipCountry { | |
country | string The three-character ISO code representing the country of origin, determined by the IP address. |
ipValues | string Possible Values: PROXY, SATELLITE, EUROPE, APAC Categorisation of the IP address used. |
} | |
ipCity | string The origin city of the transaction request, determined by the IP address. |
ipRegion | string The origin state or province of the transaction request, determined by the IP address. |
distanceFromIpToBilling | int The physical distance from the billing address to the location determined from the IP address. |
} | |
channelRisk { | |
freeEmailProvider | boolean Whether or not the email address provided in the transaction request is hosted by a free provider. |
openProxyRisk | float A rating of how likely it is that the transaction request originated from behind an open proxy. |
} | |
recentActivity { | |
last24Hours { | |
attemptsViaIp | int How many transaction requests have originated from this IP address in the last 24 hours. |
attemptsOnCard | int How many transaction requests have used this card in the last 24 hours. |
} | |
} | |
identityMorphing { | |
againstAddress | int Measure of identity morphing against the address. |
againstEmail | int Measure of identity morphing against the email address. |
againstCard | int Measure of identity morphing against the card details. |
againstIp | int Measure of identity morphing against the IP address. |
} | |
} | |
transaction { | |
transactionId | string Our ID for the transaction. |
merchantRef | string Your reference for the transaction. |
merchantDescription | string The description of the transaction provided in the request. |
status | string Possible Values: SUCCESS, FAILED, PENDING, EXPIRED, CANCELLED, VOIDED The current state of the transaction. |
type | string Possible Values: PAYMENT, PREAUTH, PAYOUT, REFUND, CAPTURE, CANCEL, REPEAT, CASH_ISSUE, CASH_PAYMENT Indicates the type of the transaction. |
amount | float Indicates the requested amount of the transaction. |
consumerSpend | float Indicates the actual amount of the transaction. This will be zero for any type of INITIALIZE transaction, deferred transactions, and rejected transactions. |
transactionTime | string The date and time we processed the transaction in ISO-8601 format. |
receivedTime | string The date and time we received the transaction in ISO-8601 format. |
commerceType | string Possible Values: ECOM, MOTO, CNP The Commerce Type of the transaction. |
channel | string Possible Values: WEB, MOBILE, SMS, RETAIL, MOTO, IVR, OTHER The Sales Channel for your Customer’s cancel. If not provided the it will be inherited from the original transaction. |
relatedTransaction { | Details of the authorisation that was cancelled. |
transactionId | string Our ID for the transaction that was cancelled. |
merchantRef | string Your reference for the transaction that was cancelled. |
} | |
} | |
processing { | Information about the authorisation status of your transaction. |
route | string The name of the processing engine your transaction was submitted to. |
voidSuccessful | boolean Indicates if the transaction was voided by a Post Authorisation callback. |
authResponse { | |
gatewayReference | string The reference received from the processing engine. |
gatewaySettlement | string The date the processing engine will settle the transaction. in YYYY-MM-DD format. |
gatewayCode | string The code for the status received from the processing engine. |
gatewayMessage | string The message received from the processing engine. |
gatewayStatus | string The status received from the processing engine. |
} | |
} | |
customer { | Information about the Customer. |
id | string Our ID for the Customer. |
merchantRef | string Your reference for the Customer. |
} | |
financialServices { | Information about the financial services. |
dateOfBirth | string The Customer’s date of birth. |
surname | string The Customer’s surname. |
accountNumber | string The loan account number provided by the merchant, to the Customer. |
postCode | string The postal code of the Customer’s billing address. |
} | |
outcome { | Information about the overall outcome of the request. |
reasonMessage | string A message indicating the overall outcome of the request. This is where we’ll provide detailed reasons for any errors. |
status | string Possible Values: SUCCESS, FAILED The overall outcome of the request. |
reasonCode | string A code indicating the overall outcome of the request. Refer to Errors for more information. |
} | |
} |