#ilyeselb

1 messages · Page 1 of 1 (latest)

wheat beaconBOT
hoary sun
#

You don't need to create a PaymentIntent directly. The subscriptoin will create invoice and you can get the paymentIntent from the invoice.

azure bone
#

so how the flow should be ?

wheat beaconBOT
azure bone
#

on checkout payment (payment element) should i create the subscription with status incomplete ?

#

before making the payment then update it

hoary sun
azure bone
#

actually we have alerady a working solution , but we use setupIntent then we retreive the payment element and create subscription , we did it this way because we had a problem before , we were creating subcritpion and retreive intent from it but we had a problem on update subscription with coupon

#

now we have a issue with user using 3D secure payment

#

so asked one of you dev

#

and he told me this

blissful yarrow
#

Hi! I'm taking over this thread.

azure bone
blissful yarrow
#

And both flows should work. It completely depends on your needs.

#

now we have a issue with user using 3D secure payment
Can you clarify what is the issue exactly?

azure bone
#

when we pay with 3d secure , we have invoice failed issue , it only happen with 3d ecure payments

#

so its not update the subscription status and the invoice statue

blissful yarrow
#

Is it for the first payment of the subscription, or following payments?

azure bone
#

the first one

blissful yarrow
#

Can you share a subscription ID (sub_xxx) with this issue?

azure bone
#

okay t will just take 3 minute

#

sub_1NNAV9GyOBDbEOMCCu85WKRo

#

this one is on test mode

blissful yarrow
#

Can you explain your current flow?

azure bone
#

you mean to test i used ths card

blissful yarrow
#

After you create the Subscription, what are you doing?

azure bone
#

we create subscription after payment or with the payment we can say we pass PM to create subscription,if subs create success the payment is a success, if not means the payment has failed

blissful yarrow
#

Oh so first you create a SetupIntent, and then just after you create a subscription with that payment method? That's not something we recommend doing.

azure bone
#

yes thats we do

blissful yarrow
#

Is there a reason for doing it this way?

azure bone
#

we did this because creating a subscrptiion before payment ,didnt allow us to update the subscritpion with coupon

blissful yarrow
#

Got it! So your flow is:

  1. Collect payment method with SetupIntent
  2. Ask coupon from customer
  3. Create the subscripton with the payment method from setp 1 and with coupon from step 2
    Is this correct?
azure bone
#

yess

#

thats our flow if user usecoupon

blissful yarrow
#

It's not possible to swap step 1 and 2? First ask for a coupon and then collect the payment method?

azure bone
#

no its not possible thats the flow that we need to follow , coupon and payment element on a same page

blissful yarrow
azure bone
#

yes so for the flow of the flow of the beginning , how does it work exaclty

#

how do i display the paymentElement ?

blissful yarrow
#

Have you read the guide? It expains everything.

azure bone
#

no i mean should i use create intent

blissful yarrow
#

It's a new flow that allows you to use the Payment Element without any SetupIntent or PaymentIntent.

azure bone
#

before showing the paymentElement

blissful yarrow
#

No

azure bone
#

okay so for the items and price i should set them mannualy not from the invoice

#

thanks

#

have a nice day

blissful yarrow
#

Happy to help 🙂

azure bone
#

i have a small question , how can i display the paymentElement without payment intent ?

#

i don't see any thing mentioning it on the docs

blissful yarrow
#

See this code? It doesn't use any PaymentIntent, but it's enough to mount the Payment Element.

azure bone
#

okay i see

#

so i dont use the price id or any thing just put the mode the amount and currency