#asim_1

1 messages · Page 1 of 1 (latest)

hidden sableBOT
#

Hello! We'll be with you shortly. 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.

  • asim_1, 32 minutes ago, 19 messages
  • asim_1, 5 days ago, 19 messages
  • asim_1, 6 days ago, 12 messages
  • asim_1, 6 days ago, 14 messages
shell echo
#

The card details aren't on the actual Setup Intent, but instead the Payment Method (pm_xxx) generated by the Setup Intent

torn dagger
#

In Android, if I retrieve the setup intent, the payment method is empty (null)

shell echo
shell echo
torn dagger
#

seti_1OZVDCC0wiqTfzk5GnlVU0O0_secret_POHmFMxXblDtMgzCtQup3KP3DbH3gTI

shell echo
torn dagger
#

You mean I'm not displaying a payment sheet?

#

Because I am. And I select a card on it.

shell echo
#

That seti_xxx would suggest otherwise. What code are you calling specifically to present the Payment Sheet?

torn dagger
rugged dagger
#

Hey! Taking over for my colleague. Let me catch up.

torn dagger
#

Alright.

rugged dagger
torn dagger
#

you mean stripe.retrieveSetupIntent?

rugged dagger
#

No retrieve is for getting the SetupIntent details

torn dagger
#

You mean create a charge using the setup intent?

#

Charging part works fine, tested it. But when I create the intent, it should show me what card the user chose right?

rugged dagger
#

After you present the payment sheet presentPaymentSheet

#

and complete putting the card details and submit

#

do your success callback being called? onPaymentSheetResult ?

torn dagger
#

yes, success is called.

rugged dagger
# torn dagger

This steps seems to display the result of the card yes

torn dagger
#

Even paymentMethodId is coming properly. Just the payment method object itself is null.

torn dagger
rugged dagger
#

Can you debug your integration and share with me the values ?

torn dagger
rugged dagger
#

OK thanks this is your code,

#

now let's debug it and inspect the value of paymentSheetResult at runtime

torn dagger
rugged dagger
torn dagger
rugged dagger
#

Can you share the related SetupIntent Id?

#

Or the customerId ?

torn dagger
#

seti_1OZVe3C0wiqTfzk55WayN8T5_secret_POIEOonZpQuXfDV6zYysdP6nvnxDvSt

rugged dagger
#

Coll now this SetupIntent is succeeded

#

And now you have a PaymentMethod attached to it pm_1OZI0DC0wiqTfzk5YYBfKFbw

rugged dagger
torn dagger
#

It was empty.

#

App crashed as a result.

#

Let me try again.

rugged dagger
#

You are missing an expand probably in that case

#

Or you are fetching the wrong payment_method id

#

can you share the API request you are doing ?

torn dagger
#

its a private API. You want to see its response?

rugged dagger
#

What you mean by private API ?

#

How are you retrieving the payment method details ?

#

What Stripe API call you are making ?

torn dagger
#

Within my android app, in the onSuccess method.

#

Its part of the stripe android library

rugged dagger
#

OK you aer using the public key in that case to retrieve the the payment methd details

#

You should have just the id of the payment method I think using that method

rugged dagger
torn dagger
#

paymentMethod is null.
paymentMethidId has a value.

rugged dagger
#

Yes that's explain it so.

#

You need to make a call from you backend

#

You'll get all the details

#

and then return it to your Mobile App

torn dagger
#

won't this return ALL payment methods?

#

so I need to search for the payment method ID from the setup intent and compare it to the list returned by the above API?

rugged dagger
#

That method doesn't make a Stripe API call

torn dagger
#

Let me clarify.

rugged dagger
#

when retrieving the setp_intent

hidden sableBOT
torn dagger
#

My setup intent has an attached paymentMethodId (the one the user chose). I want the last4 for that payment method.

So my backend should retrieve all the payment methods for the user and then compare the paymentMethodId from my setup intent to the list of PMs from the customer to find the relevant payment method?

rugged dagger
#

So my backend should retrieve all the payment methods for the user and then compare the paymentMethodId from my setup intent to the list of PMs from the customer to find the relevant payment method?
No, you have the PaymentMethod ID after completing the SetupIntent (when you said paymentMethidId has a value.), you make a single API call from your backend in order to fetch the details of that payment method and return it to your mobile app

torn dagger
#

Oh ok ok got it.

#

I'll give that a shot. Thanks