#fredzamo.card-details
1 messages · Page 1 of 1 (latest)
Hey there! Can you tell me some more about your integration? Which APIs are you using to handle payment information?
Hi!
our actual flow is:
- create Stripe card (javascript)
- create a setup intent using HTTP request (https://api.stripe.com/v1/setup_intents) with params = {"usage": "off_session"}
- then pass the client_secret back to javascript
we use handleCardSetup but depending on card the 3d secure is started
Ok, great. So you'll be using the Payment Methods API which creates objects like pm_xxx during the process
You can check the card details on the Payment Method object: https://stripe.com/docs/api/payment_methods/object#payment_method_object-card
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Can you share a Setup Intent ID?
yes we use Payment Methods API but the fact is that I'd like to get information before any transaction, and seems that handleCardSetup force a transaction as 3d secure is started
I'm actually using test cards. for instance 4000 0027 6000 3184 (https://stripe.com/docs/testing)
I'll test and provide you, just a moment
Sure!
{'application': None,
'cancellation_reason': None,
'client_secret': 'seti_1JuZmlGJC44jyeNGUJjmt8NK_secret_KZjFW2H7TAYFY3IOZ6qxvlo8JItspcs',
'created': 1636623695,
'customer': None,
'description': None,
'id': 'seti_1JuZmlGJC44jyeNGUJjmt8NK',
'last_setup_error': None,
'latest_attempt': None,
'livemode': False,
'mandate': None,
'metadata': {},
'next_action': None,
'object': 'setup_intent',
'on_behalf_of': None,
'payment_method': None,
'payment_method_options': {'card': {'request_three_d_secure': 'automatic'}},
'payment_method_types': ['card'],
'single_use_mandate': None,
'status': 'requires_payment_method',
'usage': 'off_session'}
here is an example of setup_intent request
as you can see 'status': 'requires_payment_method',
so as I understood handleCardSetup ask for verification
handleCardSetup is actually deprecated, you should be using confirmCardSetup: https://stripe.com/docs/js/setup_intents/confirm_setup
Complete reference documentation for the Stripe JavaScript SDK.
To be clear, no payment will actually be processed with a Setup Intent
yes ok, but is not possible to avoid 3d secure ? or use another method to retrieve just card information?
or which is the correct method call sequence to obtain card information without any payment process? (if possible avoiding 3d secure)
Sorry, had to step away for a moment!
but is not possible to avoid 3d secure
For that particular card, no. Authentication must be deemed as required (which it for that test card you're using)
What you want to do is likely just create a Payment Method from Stripe.js: https://stripe.com/docs/js/payment_methods/create_payment_method
Complete reference documentation for the Stripe JavaScript SDK.
That will create a Payment Method object that can be used with either Payment Intents or Setup Intents in the future
oh thank you seems that this do the trick
let me do some test
but thank you for now
Np! Will leave this thread open
just one question
the Payment Method object is not stored in stripe? I mean can I call it multiple times?
What do you mean by 'call it'?
If wanted to, sure! That'll create multiple Payment Method objects
Worth noting that the PM object can only be used once for a payment unless attached to a customer
ok