#danatdoxyme
1 messages · Page 1 of 1 (latest)
{
"id": "seti_1MeVGrasMtrddddddddMZ1",
"object": "setup_intent",
"application": null,
"cancellation_reason": null,
"client_secret": "seti_1MeVGrasMtrddddddddMZ1_secret_NPJuLhyDK1SFdf3f3f343fUwHj",
"created": 1677122101,
"customer": "cus_JQFLn6yzhL9pat",
"description": null,
"flow_directions": null,
"last_setup_error": null,
"latest_attempt": null,
"livemode": true,
"mandate": null,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "card_1JQHtttAbPS5g6Zk6mEsTkyKa",
"payment_method_options": {
"card": {
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"single_use_mandate": null,
"status": "requires_confirmation",
"usage": "off_session"
}
When you call API to confirm a SetupIntent, Stripe will verify the card with card network. When the SetupIntent status is succeeded, it means that the card is verified successfully.
Does this response mean the card is still active and valid?
We are mainly using this with cancelled accounts to see if the card is valid before we enroll them in a campaign. I understand that it's not a perfect method for knowing if funds are available etc, but we at least want know the card is still active and valid
Yes it is valid, but it doesn't guarantee that it won't decline. There are still many reasons that a card decline may happen, for example, insufficient funds, or the customer cancels the card
customer cancels the card AFTER we validate?
Yes and it's entirely possible
of course
So your integration needs to handle card declines scenarios.
understood, thank you
Okay, so in the example payload above, the status we got is "requires confirmation". Would we want to use the setup intent to reactivate a subscription where we already have a card on file (just create a new subscription) or do we need to go through confrimation again?
Do we need to continue using the setup intent workflow or could we optionally create a subscription under the customer and then invoice collection is automatic but would fail if the card was now cancelled?
We always bill automatically by default for our subscriptions. So I was thinking just create a subscription, and then invoice will be generated than we handle the invoice if we can't collect payment?
I don't think confirming a SetupIntent would re-active a subscription, you need to pay the outstanding invoice to reactivate it. See subscription lifecycle here https://stripe.com/docs/billing/subscriptions/overview#subscription-lifecycle
Is there an example of what response I would get if the card is invalid? @quick tangle
https://stripe.com/docs/testing#invalid-data this is how you simulate an invalid card
I found an expired card and got the following but I don't see anything different from this response and the first one I provided above in the first thread where the card is valid and on file
{
"id": "seti_1MeWUrA345SoF5Zk6U1RpcYoB",
"object": "setup_intent",
"application": null,
"cancellation_reason": null,
"client_secret": "seti_1MeWUrA345SoF5Zk6U1RpcYoB"_secret_NPLBSLUVrom0y93h4IcBHYvwHClRRufSL",
"created": 1677126813,
"customer": "cus_L0szJj8ghkD3rnL",
"description": null,
"flow_directions": null,
"last_setup_error": null,
"latest_attempt": null,
"livemode": true,
"mandate": null,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "card_1Ki5DkAbPS938hZk6iHpUzp5v",
"payment_method_options": {
"card": {
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"single_use_mandate": null,
"status": "requires_confirmation",
"usage": "off_session"
}
You haven't confirmed this SetupIntent yet (its status is still requires_confirmation)
requires_confirmation means they have to get a text message?
that would be requires_action that means we need a text message or some other action right?
I guess I am trying to figure out what the next step is. Right now I'm testing in postman with a curl request. So what do I do now that I have the seti_
I notice requires_confirmation is "Optional"
requires_confirmation and requires_action are different. requires_confirmation means merchant need to confirm the intent, whereas requires_action means it requires actions from the customer (i.e., authenticate the payment aka 3ds)
Yeah. If I get "requres_action" I won't be able to do anything, we'll have to exclude those. How do I handle requires_confirmation, what do I do to confirm?
I create setup intent, then confirm
right?
So i tested with a card that I know is expired...
{{baseUrl}}/v1/setup_intents/seti_1MeWUrAbPSoFBZk6U1RpcYOB/confirm
{
"id": "seti_1MeWUrAbPSoFBZk6U1RpcYOB",
"object": "setup_intent",
"application": null,
"cancellation_reason": null,
"client_secret": "seti_1MeWUrAbPSoFBZk6U1RpcYOB_secret_NPLBSLUVrom0ZK4IcBHYvwHClRRufSL",
"created": 1677126813,
"customer": "cus_TszJIRMkD3rnL",
"description": null,
"flow_directions": null,
"last_setup_error": null,
"latest_attempt": "setatt_1MeWn5AbPSoFNZk6ZTH50LpQ",
"livemode": true,
"mandate": null,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": "card_1Ki5DkACPSoFBZk6iHpUzp5v",
"payment_method_options": {
"card": {
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"single_use_mandate": null,
"status": "succeeded",
"usage": "off_session"
}
status succeeded... the card is expired though
No, when you have requires_action, you need to handle it by bringing your customer back to your website, where you call stripe.confirmCardPayment() to start the 3DS authentication.
I don't see seti_1MeWUrAbPSoFBZk6U1RpcYOB in your account, are you using stripe-mock?
no I was modifying the ids
This is the one that I know is expired:
seti_1MeWUrAbPSoFBZk6U1RpcYoB
This is the one that I know is valid:
evt_1MeVGrAbPSoFBZk6h5ni6QH3
You need to use an invalid date, not expired date
What do you mean by use an invalid date?
For example 13 for month
Is that something I use in the payload?
I dont' know what you mean by use an invlid date, where do I use an invalid date
👋 Taking over this thread, catching up now
Here's the invalid data: https://stripe.com/docs/testing#invalid-data
Okay, but I am testing on a real account, and I am using a card id that I know is expired
This is the one that I know is expired:
seti_1MeWUrAbPSoFBZk6U1RpcYoB
This is the one that I know is valid:
evt_1MeVGrAbPSoFBZk6h5ni6QH3
When I confirm the one I know has an expired credit card, I get succeeded when I confirm the payment intent
Hi @copper portal the card object that you use to confirm this setup intent was created in 2022.
Can you tell me what are you trying to achieve here? Are you trying to verify the the card again with SetupIntent?
Yes, reverifying old cards so we can offer a oneclick resubscribe campaign
Then we will create a subscription and if the card doesn't work, the subscription will cancel after 24 hours
But before we do the campaign we want to check our cards and see which ones are still valid, and only reach out to those customers
100% of the time we are trying to validate a card. Not to charge the customer but to see if they still have an active card on file
OK. whether to accept or reject a card, it's entirely up to the card issuer. So it's possible that the card issuer accept it even though knowing the card is expired.
okay, intersting. I'll play around with those test cards and see what else I learn. thanks for your help Jack, have a great rest of your day