#shubham_docs
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1232281819370750023
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- shubham_docs, 23 hours ago, 11 messages
hi! what context do you want to retrieve the saved payment methods in? some backend function, a frontend UI, something else?
I want to display the masked card information to the user in UI so he can select a defualt card for processing payments
I don't want to be liable for PCI compliances too.
Is there a way to do that?
is this UI in your Android app?
Yes, We are currently processing payments using the Paymentsheet
I want a Stripe UI to display all saved payment methods for a user so he can select defaults etc
The PaymentSheet already supports that, just pass a customer and ephemeral key.
Is this during the checkout process?
I want this to displayed as a separate action. I only want t show the list of Payment Methods and select default. The payment will be processed later.
Also, is there a way to charge the default payment method without rendering the payment sheet UI to the user
all that is possible yes
Okay Thanks. I'll check this out
sure, you just call the SDK function to confirm a PaymentIntent directly with a known PaymentMethod ID.
I generated setup intent and ephemeral key using customer sheet.
The response for succesfully adding payment menthod using Customer Sheet & setup intent does not have a payment method ID. Where to find that?
retrieve the SetupIntent object and it's on the paymentMethod field
Okay, I'll check this
The setup intent I'm able to retrieve shows customer as null.
Does that affect my ability to charge the payment method?
[16:41] Rohit Jain
{
"id": "seti_1P8hD8SA4Qahl4YHfpTLMIEU",
"object": "setup_intent",
"application": null,
"automatic_payment_methods": {
"allow_redirects": "always",
"enabled": true
},
"cancellation_reason": null,
"client_secret": "seti_1P8hD8SA4Qahl4YHfpTLMIEU_secret_PyeWyScTxACIxknNOXEfXKj3BdWyAHh",
"created": 1713870510,
"customer": null,
"description": null,
"flow_directions": null,
"last_setup_error": null,
"latest_attempt": "setatt_1P8hDISA4Qahl4YHFthgxVBA",
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1P8hDISA4Qahl4YHXJk2Aj9V",
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"single_use_mandate": null,
"status": "succeeded",
"usage": "off_session"
}
you should be creating the SetupIntent with a customer so the payment method actually gets saved to that customer.
that's in step 2 of the guide you posted.
I am passing the customer id in the payment sheet currently while adding the payment method .
I have to explicitly call the attach to customer API or it gets attached to the customer directly if I pass the customer ID while adding the card in setup intent
I called the attach API and it works
sure, but you are not passing a Customer on the backend when you create the SetupIntent. See Step 2 of the guide you linked in your initial question.
it's better to just set the Customer when you create the SetupIntent, then you don't have to call attach.
Is it possible to bypass this UI and directly charge the user on clicking a button in our custom UI?
yep, I already answered that above