#baneetsharma
1 messages · Page 1 of 1 (latest)
Cna you share details on how you're saving/attached the card? What APIs are you using?
sure give me a minute or two
When customer enter his card we first hit https://api.stripe.com/v1/payment_methods
FWIW, this 0 amount on the 3DS modals is not something you can control
Ok, well you shouldn't be using that API
If your intention is to just start a subscription with payment information collected from a customer then you should be following this: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
the ives us payment method ID which we use it to create setup intent
$intent = $subsidiary->createSetupIntent([
'customer' => $customer->id,
'payment_method' => $request->payment_method_id,
'usage' => 'off_session'
]);
If your subscription includes an initial payment (i.e. no free trial) then you'll likely see that reflected in the 3DS modal as opposed to 0
@opaque lodge I ma using this https://stripe.com/docs/api/payment_methods/attach
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yep, and you shouldn't be. The guide I linked above is what you need to do
so above one will also be able to handle off-session payments?
Yes the pm_xxx generated in that flow will be usable for off-session payments
okay,
a the Please don't close this discussion for few more minutes I am just going through documentation, let me go through once and if I have some querries I will ask you
Sure, no problem
Hi @opaque lodge I think we need to follow this approach https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=subscription since my UI is like this where we collect card information before we have actually triggered create subscription api
AM I correct ?
Sure, that can work too if you prefer to collect details before creating the subscription/payment
So just confirming If I have understood the given document correctly, My new flow should be as follows:
The user selects his plan and enters his card details I will first create stripe customer and then will hit create subscription API with param values as suggested in the docs and in response will get client secret which I will pass to stripe.confirmPayment js function along with the payment element
and once I confirm the subscription from 3DS it will also save my card and will provide me with payment_method_id
Hi! I'm taking over this thread.
Hi @gloomy fog can you confirm if what I have said above is correct in my case ?
Yes that looks correct with the deferred flow:
- First collect payment details
- Then create the Customer/Subscriptions
- Finally confirm the Subscription
okay got it, I will try implementing it and if I have any querries I will ask you guys again.
Thankyou for the help