Cancel Payment Session

POST [BASE_URL]/v2/payments/{id}/cancel

cancellation can be done if the Payment Session status is "REQUIRE_CONFIRMATION" or "REQUIRE_PAYMENT_METHOD"

Request

Request Body

{
  "cancellationReason": "REQUESTED_BY_CUSTOMER"
}

Detail Parameter Request

Parameter
Data Type
Requirement
Description

cancellationReason

String

M

Reason to cancel Payment Session

Response

Response Body

{
  "code": "00",
  "message": "Success",
  "data": {
    "id": "f5011fb2-e205-46ad-ac20-481429ba1d32",
    "clientReferenceId": "1743343932",
    "amount": {
      "value": 10000,
      "currency": "IDR"
    },
    "autoConfirm": false,
    "mode": "REDIRECT",
    "redirectUrl": {
      "successReturnUrl": "https://merchant.com/success",
      "failureReturnUrl": "https://merchant.com/failure",
      "expirationReturnUrl": "https://merchant.com/expiration"
    },
    "paymentMethod": null,
    "statementDescriptor": "Pivot",
    "status": "CANCELLED",
    "createdAt": "2025-03-30T14:12:12Z",
    "updatedAt": "2025-03-30T14:12:28.231875669Z",
    "expiryAt": "2025-03-30T14:12:28.231875669Z",
    "paymentUrl": "https://payment.pivot-payment.com/detail?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1dWlkIjoiZjUwMTFmYjItZTIwNS00NmFkLWFjMjAtNDgxNDI5YmExZDMyIiwiaXNzIjoiYmFja2VuZC1wb3J0YWwiLCJleHAiOjE3NDM0NjU1NDV9.DsupgNf0F-IfinTSvQd_2Y6iEIrk8Mr7WcNGATGtYqs",
    "chargeDetails": null,
    "cancelledAt": "2025-03-30T14:12:28.231875669Z",
    "cancellationReason": "REQUESTED_BY_CUSTOMER",
    "metadata": {
      "invoiceNo": "INV001"
    }
  }
}

Detail Parameter Response

Parameter
Data Type
Requirement
Description

Payment Session

Object

M

Last updated