#farhan-subscription-paymentmethod
1 messages · Page 1 of 1 (latest)
Whether or not the user is present and just initiated the transaction
So when you are on a site and click "Pay", that is on session
But if you save your card now and are told that you will be charged $10 at some point when you have left the site, that is off session
Does that clarify what you want to use in your situation?
actually I want to subscription on my website but it return status incomplete
"id": "sub_1NaOGMEMaWP6ZjJoMoyGEgJm",
Can you please check why It returns "imcomplete"?
With the way you are creating these subscriptions, incomplete is the default state for a subscription until its first payment is made.
For that specific subscription, it looks like the bank requested 3DS on the first payment for that subscription but 3DS was never completed
Okay so looking at your request logs it looks like you created a SetupIntent, confirmed it, then used the payment method from that setupintent on your subscription
An important thing to know here is that banks have complete control over when they request 3DS. The bank can request 3DS on any setup or payment, even if the cardholder just did 3DS
Server is a bit busy so I will have to come back in a minute, but the two main suggestions here would be:
- Make sure your integration can handle 3DS when a bank requests it for subscription payments.
- Get rid of the SetupIntent step, you can just create a Subscription and use its invoice's PaymentIntent to take your first payment and save the card
is it because of this $intent = $stripe->setupIntents->create(['usage' => 'on_session']); ?
The bank can request it either way
On session is appropriate here because the user initiated the transaction
If i have to get rid of the SetupIntent step, what changes will I have to make?
We have a good doc to demonstrate this. Instead of a SetupIntent, you create the subscription and use its first invoice's payment intent to collect payment details https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#create-subscription
farhan-subscription-paymentmethod
if I have to make sure your integration can handle 3DS, whichchanges will i have to make?
@slate coral use our official integration path and it will work. The doc we linked you do takes care of it all and you can use https://stripe.com/docs/testing#cards for various test cards
I mean I have to integrate 3DS
I have to Make sure your integration can handle 3DS when a bank requests it for subscription payments.
I understand, and the docs we gave you show you exactly how to implement payment method collection so that it's compatible with 3DS. So that's the next step, go through those docs and use it in Test mode to understand how it works overall!
https://stripe.com/docs/testing#cards you mean this link?
https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#create-subscription this link my colleague gave you earlier
but that was for, Instead of a SetupIntent, you create the subscription and use its first invoice's payment intent to collect payment details
If you use SetupIntents, it works the same conceptually really. You create it, use PaymentElement to collect card details and confirm it client-side and it handles 3DS as needed
Previously I followed this document https://stripe.com/docs/js/setup_intents/payment_method
stripe
.confirmCardSetup('{SETUP_INTENT_CLIENT_SECRET}', {
payment_method: {
card: cardElement,
billing_details: {
name: 'Jenny Rosen',
},
},
})
.then(function(result) {
// Handle result.error or result.setupIntent
});
But it does not implement 3DS I think, it makes my tranasaction status to "incomplete", for example this one "id": "sub_1NaOGMEMaWP6ZjJoMoyGEgJm",
That definitely handles 3DS
then why my transaction was incomplete, what mistake I can be making there?
this is a real Live mode transaction with a real card. Are you testing in production?
yes with 7 pounds i made this transaction
well you should never test in production, this is forbidden by our terms of services.
but amount was never deducted from my card
I'd recommend switching to Test mode with Test API keys and using our official Test cards for this such as the ones at https://stripe.com/docs/testing#regulatory-cards for 3DS
Now even if you do 3DS upfront, it's still possible for the bank to ask 3DS for later payment. In that case, you get the customer back "on session" in your app/website and get them to go through 3DS