Skip to main content

Overview

The Cancel Payment Intent endpoint allows you to cancel a pending payment intent before the terminal processes the card payment or the intent expires. Once cancelled, the terminal will be notified and the payment request is withdrawn. Common use cases:
  • Customer decides not to pay at the terminal
  • Order was entered with incorrect amount or details
  • User navigates away from the payment screen in your application
  • A new payment intent needs to replace an existing one
Cancellation is permanent and irreversible. Once a payment intent is cancelled, it cannot be reactivated. Create a new payment intent if payment is still needed.

Authentication

This endpoint requires API key authentication using the x-api-key header.

Cancellation Rules

You can only cancel a payment intent if all of these conditions are met:
1

Status is PENDING

The payment intent must be in PENDING status. You cannot cancel payment intents that are already CONFIRMED or CANCELLED.
2

Payment intent belongs to your organization

You can only cancel payment intents created by your organization.
If a terminalCode was provided when creating the payment intent, cancelling it also notifies the terminal that the payment request has been withdrawn.

Request Format

API reference: POST /payment-intent/{id}/cancel
string
required
The unique identifier (UUID) of the payment intent to cancel.

Response Format

The endpoint returns an empty JSON object on success:

Examples

Cancel a payment intent

Cancel with error handling

Error Responses

error
Cannot cancel payment intent - The payment intent is not in PENDING status.Common reasons:
  • Payment intent status is CONFIRMED (already paid)
  • Payment intent status is CANCELLED (already cancelled)
error
Payment intent not found - No payment intent with the specified ID exists in your organization.
error
Unauthorized - Missing or invalid API key.

What Happens After Cancellation

After a payment intent is successfully cancelled:
  1. Status Change: The status changes from PENDING to CANCELLED
  2. Terminal Notification: The associated terminal (if any) is notified
  3. Return to Your App: If the payment intent was created with a redirectAppId, the terminal returns to that app after showing the cancellation screen
  4. Irreversible: The cancellation cannot be undone
  5. New Intent Required: If payment is still needed, create a new payment intent

Next Steps

Create Payment Intent

Create a new payment intent to replace the cancelled one

API Reference

View the full API reference for the cancel endpoint