v1

latestOpenAPI 3.0.02026-07-26167441.9 MB

Cancel Payment

post/payments/{payment_id}/transactions/{transaction_id}/cancel

Path parameters

payment_idstring required

The unique identifier of the payment (UUID, 36 chars).

transaction_idstring required

The unique identifier of the transaction (UUID, 36 chars).

Request body

descriptionstring

Description of the cancellation.(MAX 255; MIN 3)

reason'DUPLICATE' | 'FRAUDULENT' | 'REQUESTED_BY_CUSTOMER'

Reason for the cancellation. Values can be DUPLICATE, FRAUDULENT, and REQUESTED_BY_CUSTOMER.

merchant_referencestring required

Identification of the payment transaction defined by the merchant (MAX 255; MIN 3).

Response

200

idstring
typestring
statusstring
categorystring
merchant_referencestring
created_atstring
updated_atstring
response_codestring
response_messagestring
{"stackTrail":"paths:/payments/{payment_id}/transactions/{transaction_id}/cancel:post:responses:200:content:application/json:schema:properties:customer_payer","oasType":"schema","type":"unknown"}
simplified_modeboolean
receiptboolean
{"stackTrail":"paths:/payments/{payment_id}/transactions/{transaction_id}/cancel:post:responses:200:content:application/json:schema:properties:receipt_url","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/payments/{payment_id}/transactions/{transaction_id}/cancel:post:responses:200:content:application/json:schema:properties:receipt_language","oasType":"schema","type":"unknown"}

Example response

{
  "id": "438bea6c-9061-4416-b824-469c3c05868d",
  "type": "CANCEL",
  "status": "SUCCEEDED",
  "category": "CARD",
  "amount": {
    "currency": "USD",
    "value": 30000
  },
  "created_at": "2024-06-06T14:03:08.384014Z",
  "updated_at": "2024-06-06T14:03:08.453617Z",
  "provider_data": {
    "id": "YUNO_TEST_PAYMENT_GW",
    "status": "SUCCEEDED",
    "status_detail": "SUCCEEDED",
    "response_code": "SUCCEEDED",
    "raw_response": {
      "message": "provider response"
    },
    "iso8583_response_code": "00",
    "iso8583_response_message": "Approved or completed successfully"
  },
  "response_code": "SUCCEEDED",
  "response_message": "Transaction successful",
  "payment": {
    "id": "2d6f75c1-c4bc-4d2d-80ec-0af4d12c85da",
    "description": "Test",
    "country": "US",
    "status": "CANCELED",
    "sub_status": "CANCELED",
    "merchant_order_id": "0000023",
    "created_at": "2024-06-06T14:01:34.286228Z",
    "updated_at": "2024-06-06T14:03:08.484781Z",
    "amount": {
      "currency": "USD",
      "value": 30000
    }
  }
}