#mrelliot69

1 messages · Page 1 of 1 (latest)

terse thunderBOT
#

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.

twilit patio
#

👋 how may I help?

gray prism
#

heyy

#

so regarding my last topic i was told that i could use setup_future_session with offsession but from what your colleage told me yeasterday that is not possible with setupintents

#

also another question when i was using sources insted of pm i attached the paramter source to the customer when i was creating a custommer, how i can do that now with pm? or can i continue to use the source paramter?

twilit patio
#

it's setup_future_usage not setup_future_session

gray prism
#

exacly i spelled wrong

twilit patio
twilit patio
gray prism
gray prism
#

thats why we used the source

twilit patio
gray prism
#

im not implementing payment intents

twilit patio
#

where you collect the PaymentMethod and then create the Customer and then the SetupIntent

#

this is not PaymentIntents

gray prism
#

only setup intents to use payment methods

#

let me check

#

i dont have the customer id at the moment that i create the setup intent

#

thats why i explainnned before we used sources

#

i know i can use the attach method to attach to the custommer, but i think if i do that the default source will not be set

twilit patio
#

so there's an extra step that is not documented in the docs I shared but I did mention it just after

twilit patio
#

creating the customer

#

before creating the SetupIntent and passing in the customer ID

gray prism
#

i think i'm reppeating myself over and oer, i cannot do that approach since i only have the custommer after, thats our flow and that will not change

#

what i need to know is how i define a default payment method for a custommer

#

and how i can check what is the default payment method

twilit patio
#

you collected the Payment Method

#

I'm still not sure why creating the Customer at that step is so problematic for you

gray prism
#

because we have multiple payment methods on our system and we only create the custommer if the custommer uses stripe meaning that that are 2 different instances on the code

gray prism
#
  1. what i need to know is how i define a default payment method for a custommer
  2. and how i can check what is the default payment method
twilit patio
#

I need to understand you use-case in order to be able to help you

gray prism
#

i already explainned that on my messages

twilit patio
#

would you mind walking me through the whole use-case without implementation details?

gray prism
#

what you need clarification on

#

so i can describe it

twilit patio
gray prism
#

our implementation generates the setup intent when the pages loads,
then if a custommer clicks add new card, if a custommer on stripe is already stored we use that custommer to create the pm if not we create the custommer and attach the pm

#

thats basically it

twilit patio
#

then the flow I described will do that

#

you don't have to generate the SetupIntent when the page loads

#

you can just present the PaymentElement

gray prism
#

i do because the confirmCardPayment requires that do init

twilit patio
#

then you haven't read the doc I sent you

#

I urge you to go back

#

and forget what you already know

#

just read the doc

#

and see whether this fits your needs or not

gray prism
#

i see you mean do a ajax request to get the secret

#

that way when the elements is submited i do a retrive to get the secret with the custommer generated

#

is that it?

twilit patio
#

yes

gray prism
#

but if i pass the custommer to the setup intent what that will do?

#

attach a default source to the custommer?

twilit patio
#

it will attach the Payment Method to the Customer

#

you need to forget about the sources since this is something that we're in the midst of deprecating

gray prism
#

i already forget what it but i need a way to replace that , otherwise my system will break

gray prism
#

thats why im asking how i define the default payment method

twilit patio
#

if what you're looking for is a way to define a default payment method to pay the billing invoices automatically

#

with the payment method that was generated

gray prism
#

i have custom recurring payments on my system not stripe invoices

twilit patio
#

Subscriptions use the invoices as an underlying way to collect the payments

gray prism
#

i not use subs from stripe

twilit patio
#

so basically this would work either for one-off or recurring invoices

gray prism
#

i have my own system

#

thats from the beginning im asking how i can define the default payment method, therefore i can used after to charge my clients

twilit patio
#

so basically you're just using the PaymentIntents afterwards to pay the recurring price?

gray prism
#

im migrating the manage of cards to setup intents;
to charge im using charges;
and then i have recurring payments on my system that when renews i need to access the default payment method

twilit patio
#

you should also move away from Charges

#

to PaymetnIntents

gray prism
#

why? from what i see on docs charges are still supported

#

and stripe only advised us to migrate that managment of sources

gray prism
twilit patio
#

The Charges API doesn’t support the following features, many of which are required for credit card compliance:

Merchants in India
Bank requests for card authentication
Strong Customer Authentication
these are the reasons why you should move away from the Charges API

gray prism
gray prism
#

?

indigo trench
#

hi! I'm taking over this thread.

#

can you clarify what is your remaining question?

gray prism
#

the question is exacly the one that i tagged

#

i dont know which clarification you need more than the questions that i tagged

#

anyone there?

indigo trench
#

please be patient, Discord is busy.

#

so you want to collect a payment method for a customer, and set it as the default payment method?

gray prism
gray prism
indigo trench
#

are you creating Invoices or Subscriptions? if not, then setting a default payment method in Stripe would be useless.

gray prism
#

before we used the source parameter to set the default but rn with payment methods i dont know and the docs dosent mention that

indigo trench
#

in this case you don't need to use default payment method at all. when a customer needs to make a payment:

  1. list their exisitng payment method with https://stripe.com/docs/api/payment_methods/customer_list
  2. then create a PaymentIntent and set the payment_method property to one you retrieved in the previous step
gray prism
#

i saw that on the docs, but that will not give me the default payment method, will give all the payment methods and i will select the last or the first, meaning that i will never charge the card that the custommer selected from the list on their profile

#

we use charges to charge the pm but its yeah then is just use the pm retrived

indigo trench
gray prism
#

alright, because i was not using the invoices/subs i didnt wanted to use that parameter but if that is the only way to do it, i guess we will that route
im using charges but i think that will work with charges to

indigo trench
#

im using charges but i think that will work with charges to
wait, the Charge API doesn't work with PaymentMethod.

#

so you have to use PaymentIntent

gray prism
#

what you mean dont work

#

i already tried and the charges are suceceffuly

#

stripe only asks us to migrate the payment methods from sources

indigo trench
#

there's no payment_method property when creating a Charge

#

so you can't use PaymentMethod and Charge together.

gray prism
#

right but you use the source to pass the token of pm

indigo trench
#

Source and PaymentMethod are two completely different things. If you want to use PaymentMethod, you have to use PaymentIntents.

gray prism
#

why is that? since the charge is processed

#

and stripe didnt told our platform to migrate to payment intents

indigo trench
gray prism
#

right, but can you explain why i need to migrate from charges to py if the charges work with payment methods? the only thing that is not supported is the authentication of cards

indigo trench
#

why i need to migrate from charges to py
I have no idea why you are doing this migration. but yes in general we recommend using PaymentIntent since they support more payment methods and 3DS.

gray prism
#

im doing this migration because the royal bank of canada is blocking payment from our custommer clients because the platform is from us, so strip told us that in order to solve this we could use setup intents with on_behalf_of, that way we could specify the connected account of canada and the bank will not complain

gray prism
indigo trench
#

what works with Charge? can you try to be more precise in your questions?

gray prism
#

payment methods are charged with charges api

#

that was what i was reffering to

#

one thing is advise because of 3ds other thing is charges dont work with payment methods and we require py to work only with pm

#

thats what im trying to clarify

#

since i did other integrations and charges worked with pm

indigo trench
#

since i did other integrations and charges worked with pm
The Charges API doesn't support PaymentMethod objects.

gray prism
#

alright will need to check that then, ty

indigo trench
#

happy to help 🙂