#LucidLaw

1 messages · Page 1 of 1 (latest)

fluid merlinBOT
keen sorrel
#

Hi there!

#

So in your flow the customer already had an existing payment method when you created the subscription?

sage lichen
#

Yes correct

#

3d card is already attached to the customer

#

as a default

keen sorrel
sage lichen
#

so what means I need to create an intent first

#

before I call subscribe API?

keen sorrel
#

No, why are you saying this?

#

When you create a new subscription, add expand: ["latest_invoice.payment_intent"] to the API call. In the reponse you will directly get the client_sercet of the PaymentIntent, so you can confirm it on the frontend to do the 3DS flow.

sage lichen
#

Okay wait I'm checking the docs now, sorry we're pretty new to stripe

keen sorrel
sage lichen
#

Okay wait

#

I can't seems to find the option of adding latest_invoice.payment_intent in creating subscription

keen sorrel
#

Have you tried? Did you get an error message? If so can you share the request ID (req_xxx)?

sage lichen
#

We are currently developing all the APIs for the mobile app by the way, so we are using APIs only

#

"When you create a new subscription, add expand: ["latest_invoice.payment_intent"]"

where can I find this? what will I pass?

keen sorrel
sage lichen
#

We are not using that

#

we are using this API

keen sorrel
#

Exactly, that's what the link I shared with you is using:

sage lichen
#

we are using the PHP curl

#

I sent the APIs we've use

keen sorrel
#

we are using the PHP curl
Are you using PHP or CURL? These are two different things.

sage lichen
#

Sorry CURL

keen sorrel
#

With curl it's probably something like this: -d "expand[]"="latest_invoice.payment_intent"

sage lichen
#

okay wait

#

it works

#

thank you!

#

how come its not on the docs?

weak copper
#

why isn't what in the docs exactly?

#

and to clarify, now that you have the PaymentIntent, what are you going to do with it? how do you intend to handle 3D Secure? With our frontend libraries or not?

sage lichen
#

the expand parameter

#

Good question and exactly what I want ask too, initially I was thinking my next steps are the following. (Pleas correct me)

weak copper
sage lichen
weak copper
#

incorrect

sage lichen
#

thank you!

#

what should be best

weak copper
#

you can not parse the field yourself

sage lichen
#

Okay wait checking

#

where can I get the CLIENT_SECRET?

#

sorry confuse with this part

weak copper
#

it's in the PaymentIntent

#

subscription->latest_invoice->payment_intent->client_secret

sage lichen
#

ah see it thank you

#

okay wait

#

Okay, I need to do the testing and code it myself for me to fully understand the process

#

will this thread will be closed?

#

or I can message later on?

weak copper
#

it'll be locked in an ~hour or so but you can always ask in the main channel

sage lichen
#

got it