#shubham_docs

1 messages ¡ Page 1 of 1 (latest)

silent plankBOT
#

👋 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.

patent gullBOT
#

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.

woeful crow
#

hi! what context do you want to retrieve the saved payment methods in? some backend function, a frontend UI, something else?

thin plover
#

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?

woeful crow
#

is this UI in your Android app?

thin plover
#

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

woeful crow
#

The PaymentSheet already supports that, just pass a customer and ephemeral key.

thin plover
#

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

woeful crow
#

all that is possible yes

thin plover
#

Okay Thanks. I'll check this out

thin plover
#

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?

woeful crow
#

retrieve the SetupIntent object and it's on the paymentMethod field

thin plover
#

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"
}

woeful crow
#

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.

thin plover
#

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

woeful crow
woeful crow
thin plover
#

Okay Sure, Got it.

#

Let me try it once

#

Many Thanks, This works

thin plover
# woeful crow

Is it possible to bypass this UI and directly charge the user on clicking a button in our custom UI?

woeful crow
#

yep, I already answered that above