#naveedfaraz_57185

1 messages · Page 1 of 1 (latest)

past rootBOT
brazen lava
#

Hi, let me help you with this.

#

No, invoice_settings.default_payment_method is not used for PaymentIntents.

#

You need to set payment_method parameter manually.

celest iron
#

then how do i create a payment without sending in payment method, as i would not know the saved cards in the stripe

brazen lava
#

But again, I don't know if NetSuite follows the same flow

celest iron
#

could you please let me know how to use this through postman.

#

nothing is happening on the frontend, its all backend, so first i am trying through postman

brazen lava
#

You can click on curl tab to see the raw request examples.

celest iron
#

getting this error when i am trying to confirm the payment intent

#

eventhough i have set this "automatic_payment_methods[enabled]"=true

brazen lava
#

Ok, let's take a step back. What are you trying to achieve?

celest iron
#

sure, we are using stripe only for card payments, right now i am in test stripe account. we are going to integration our NetSuite application to connect to Stripe to create payments for customers. In order to do this i am trying the connect first in Postman. Customers are already there and cards are saved on there stripe accounts. Now i am trying to create a paymentintent with the default card through postman

#

this is creating a paymentintent but getting the reponse as "requires_payment_method"

#

but we would not know the payment method and would like to use the default card.

brazen lava
#

You need to set the payment_method property. Are you providing the Customer object to the PaymentIntent?

celest iron
#

yes i am sending the customer id

#

If you see the above screenshot, there is already a card saved on this customer

brazen lava
#

Could you please paste here the customer object ID?

celest iron
#

cus_Oin4QY8QVWHqgF

brazen lava
celest iron
#

i tried this but this is not giving me the default card details if there are multiple cards.

#

i am getting all of the card details in the response, but how do we identify which one is default one.

brazen lava
#

So you don't even need to list the Payment Methods.

celest iron
#

Ok, i tried fetching the customer object for few its giving me default source as the correct card but for this customer "cus_Oin4QY8QVWHqgF" i am getting both default source and default payment.

#

But on the stripe record there is only one card as default

#

and one extra card

brazen lava
#

Sources is a legacy concept. Please use the default_payment_method

celest iron
#

Ok then for many i am not getting the default payment method, for example see this customer "cus_OnHrye0aGDfYXh"

#

there is a default card for this one.

brazen lava
#

For those you can use the default_source. But if default_payment_method is present it will be marked as Default in the Dashboard.

past rootBOT
celest iron
#

what if both are null ?

#

even when there are cards set on the customer

karmic quest
#

What's the issue/question?

celest iron
#

if you read the latest msg in the thread, i am trying to get the default payment method of a customer using postman by connecting to the API

#

there is no front end, i am trying to first set it through postman

karmic quest
#

Then as my colleague explained, you'd use the GET /v1/customers/:id endpoint and look at the invoice_settings[default_payment_method] field

#

If that is null, then there is no default payment method

celest iron
#

how do we create a paymentintent and confirm without specifiying a payment method ?