APIV2
Cancel a payment
AuthorizationBearer <token>
Merchant JWT bearer token
In: header
Scope: payments.delete
Path Parameters
paymentId*string
A unique identifier for the payment object.
Response Body
application/json
curl -X POST "https://example.com/payments/string/cancel"{
"merchantId": "string",
"id": "string",
"status": "APPROVED",
"isDynamicPricingEnabled": false,
"totalMoney": {
"amount": 100,
"currency": "AED"
},
"amountMoney": {
"amount": 100,
"currency": "AED"
},
"approvedMoney": {
"amount": 100,
"currency": "AED"
},
"refundedMoney": {
"amount": 100,
"currency": "AED"
},
"capturedMoney": {
"amount": 100,
"currency": "AED"
},
"refundIds": [
"string"
],
"expirationDate": "2019-08-24T14:15:22Z",
"customerId": "string",
"onBehalfOf": "string",
"lineItems": [
{
"item": {
"metaData": {
"property1": "string",
"property2": "string"
},
"referenceId": "string",
"description": "string",
"imageUrls": [
"https://www.randomurl.com"
],
"attributes": {
"size": "xs",
"color": "blue"
},
"sku": "string",
"amountMoney": {
"amount": 100,
"currency": "AED"
},
"name": "string",
"id": "string"
},
"quantity": 0,
"subtotalMoney": {
"amount": 100,
"currency": "AED"
},
"totalMoney": {
"amount": 100,
"currency": "AED"
}
}
],
"groupPaymentId": "string",
"multiCardId": "string",
"cardDetails": {
"card": {
"id": "string",
"cardBrand": "string",
"country": "AF",
"mask": "string",
"last4": "string",
"expMonth": 0,
"expYear": 0,
"cardholderName": "string",
"fingerprint": "string",
"bin": "string"
},
"cvvStatus": "CVV_ACCEPTED",
"avsStatus": "AVS_ACCEPTED",
"authResultCode": "string",
"verificationResults": "SUCCESS",
"threeDSecure": {
"eci": "string",
"xid": "string",
"cavv": "string",
"threeDSVersion": "string",
"directoryResponse": "string",
"authenticationResponse": "string",
"transStatusReason": "string",
"cardHolderInfo": "string",
"threeDSTransactionId": "string"
}
},
"shippingAddress": {
"addressLines": {
"addressLine1": "string",
"addressLine2": "string",
"addressLine3": "string"
},
"name": "string",
"city": "string",
"country": "AF",
"postalCode": "string",
"organization": "string",
"sublocality": "string"
},
"billingAddress": {
"addressLines": {
"addressLine1": "string",
"addressLine2": "string",
"addressLine3": "string"
},
"name": "string",
"city": "string",
"country": "AF",
"postalCode": "string",
"organization": "string",
"sublocality": "string"
},
"statementDescriptionIdentifier": "string",
"description": "string",
"referenceId": "string",
"metaData": {
"property1": "string",
"property2": "string"
},
"autocomplete": true,
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"gatewayVersion": 0.1,
"gatewayId": "string",
"gatewayName": "square",
"gatewayPaymentId": "string",
"airlineData": {
"market": "string",
"iataCode": "st",
"countryCode": "string",
"address": "string",
"tickets": [
{
"issueDate": "2019-08-24T14:15:22Z",
"ticketNumber": "string",
"passenger": {
"code": "string",
"countryCode": "string",
"title": "string",
"firstName": "string",
"middleName": "string",
"lastName": "string",
"email": "string",
"phoneNumber": "string",
"ageCategory": "BABY"
},
"legs": [
{
"flightNumber": "string",
"departureAirportCode": "string",
"arrivalAirportCode": "string",
"serviceClassCode": "st",
"carrierCode": "st",
"departureDate": "2019-08-24T14:15:22Z",
"departureTime": "string",
"arrivalDate": "2019-08-24T14:15:22Z",
"arrivalTime": "string",
"couponNumber": "string",
"fareBasisCode": "string"
}
]
}
]
},
"internalReferenceId": "string"
}