Get Customer Payment Methods is an action used within Kuika's Stripe integration. This action allows you to securely query and display the payment methods (credit card, debit card, etc.) associated with a user's Stripe account.
Listing payment methods registered on Stripe is critical for applications that want to offer recurring payments or fast payment experiences.
Technical Features
Stripe Customer Data: Lists payment methods registered via Stripe.
Web and Mobile Application Support: Can be used in both web and mobile applications.
Real-Time Querying: Payment methods are retrieved instantly.
User Interaction: Allows the user to select which card to pay with.
Get Customer Payment Methods Action Application Steps
Log in to the Kuika platform.
Select your project from the Apps screen.
Go to the UI Design module.
Select the screen component where the user will see their payment methods (e.g., “My Saved Cards” button).
Click the +ADD ACTION menu in the Properties panel on the right.
Select the button and add the Payment Stripe >Get Customer Payment Methods action from the + ADD ACTION menu according to the desired trigger event (Initial Actions, OnClick, OnBlur, etc.).
When this action is triggered, all registered payment methods are queried through the Stripe customer ID of the user who has logged into the system.
(i) Stripe Customer ID must be created when the user registers with the system and assigned to the user profile. This ID must be retrieved dynamically from the system or transferred from the output of the previous action.
You can display the card details to the user by linking the action output to a list (e.g., Table, Select Box, etc.). Information such as the payment card image, expiration date, and last 4 digits of the card are obtained as a result of the action.
Usage Scenario: Selecting Payment with a Registered Card
Scenario: When a user arrives at the subscription payment screen, they want to quickly complete the transaction by selecting one of the payment cards they have previously added.
Scenario Flow:
The user clicks the “Select Card” button.
The Get Customer Payment Methods action associated with this button is executed.
The card information received from Stripe is listed.
The user selects the appropriate card.
The payment with the selected card is completed using the Charge Payment Method action.
Get Customer Payment Methods Action Advanced Customizations
Automatic Payment with Registered Cards: After listing, the transaction can be initiated with the default card without the user making a selection.
Saved Card Update: If the user wants to add a new card, a new card can be introduced with the Setup Intent action.
Secure Listing: Stripe returns only the last 4 digits of the card number and the expiration date. It should be displayed with masking in the UI.
Technical Risks
Missing Stripe Customer ID: If the user's Stripe Customer ID is not defined in the system, card details cannot be listed.
Empty Card List: If the user has never added a payment method before, an empty result may be returned. A guiding message should be displayed to the user in this scenario.
Authorization Errors: If the Stripe API access key is invalid or missing, the action may not work. The API connection settings in the Kuika project should be checked.
Get Customer Payment Methods is an important step in providing a fast and secure payment experience for users. With this action, which is fully compatible with Stripe, you can list registered cards, redirect users according to their preferences, and speed up the payment process.