Cancel Stripe Payment is an action used with Kuika's Stripe integration. This action allows you to securely cancel an incomplete payment transaction at the user's request. It is particularly useful when an incorrect amount has been entered, a different payment method is desired, or the user has changed their mind.
Technical Features
Compatible with Stripe Integration: Operates on “Payment Intent” objects initiated through Stripe but not yet approved.
Web and Mobile App Support: Works on both web and mobile applications.
Real-Time Cancellation: The cancellation process is performed instantly using the PaymentIntent ID sent through Stripe.
Cancel Stripe Payment Action Application Steps
Log in to the Kuika platform.
Open your project from the Apps screen.
Go to the UI Design module.
Select the UI element that will trigger the cancellation process (e.g., “Cancel Payment” button).
Click on the +ADD ACTION menu in the Properties panel on the right.
Select the button and add the Payment Stripe > Cancel Stripe Payment action from the + ADD ACTION menu according to the trigger event you want (Initial Actions, OnClick, OnBlur, etc.).
Configure the following field in the settings that opens:
Payment Intent: Specifies the ID of the payment transaction that has been initiated on Stripe but has not yet been completed.This value is usually a unique ID starting with pi_ generated by the Stripe API. It can be dynamically retrieved from the form, the transaction details screen, or the outputs of previous actions.
Close button to complete the process.
Use Case: Payment Cancellation in Shopping Cart
A user arrives at the payment screen but realizes at the last moment that they have entered the payment amount incorrectly.
Scenario Flow:
The Cancel Stripe Payment action is assigned to the OnClick event associated with the button.
The action is executed with the PaymentIntent ID created on Stripe that has not yet been completed.
The payment is canceled, and the transaction is set to “cancelled” on Stripe.
The message “Payment canceled, please try again” is displayed to the user.
The user can update their transaction by selecting a new payment method.
Dynamic PaymentIntent Retrieval: The PaymentIntent ID created during the payment process can be retrieved from the result of the previous action and dynamically passed to this action.
Redirect After Cancellation: A Redirect action can be defined to redirect the user back to the payment screen after a successful cancellation.
Logging and Notification: An informational email can be sent to the admin or user after the cancellation process. The action result can also be recorded in the transaction logs.
Technical Risks
Completed Payments Cannot Be Cancelled: This action is only valid for initiated but uncompleted Stripe payments. The Refund action should be used for approved transactions.
Incorrect PaymentIntent ID: If an incorrect or empty PaymentIntent value is provided, the transaction will not be executed and an error will be returned.
Need to Retry: If the cancellation process fails due to a user network disconnect, the user should be given the option to try again.
Cancel Stripe Payment allows users to recover incorrect payments and enjoy a flexible payment experience. It works seamlessly with Kuika and Stripe integration, allowing you to manage your transactions in a secure and transparent manner for both users and your system.