#brel_api

1 messages · Page 1 of 1 (latest)

round briarBOT
#

đź‘‹ Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

đź”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1286650057453469717

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

viral yacht
#

It's just a native behaviour for the invoice page that is designed that way. If you want to set the payment method for the Customer post-payment, you'll need to make an additional API call to set invoice_settings[default_payment_method]

old shell
#

So invoice page behaves differently on background, different than paying a payment intent?

#

there is no way for payment intent payment to make that card default automatically?

viral yacht
#

It's just a helper function to set it as the default AFAIK. The actual payment facilitation is the same

viral yacht
old shell
#

yes, but I just realized the hosted url did that and was curious

#

ok

#

I have another question. What is the default payment_behavior while creating a subscription?

#

the default one, without specifying anything

viral yacht
#

allow_incomplete is the default

old shell
#

but when I create a subscription and I do not specify anything and the customer does not have a default payment method I get an error. Shouldn’t it allow the creation as incomplete?

#

It seems to me like the default is “error_if_incomplete”

#

but I cant be sure

viral yacht
#

No, you'd pass default_incomplete

round briarBOT
tired saffron
#

hi! I'm taking over this thread. let me know if you have other questions!

old shell
#

Hi soma,
can you please explain me what is the default payment_behaviour. Sometimes I get an error from stripe instead of the subscription being marked as incomplete and this makes me think that the default is “error_if_incompleted”. Can you tell me what is the default while creating a subscription

tired saffron
#

Sometimes I get an error from stripe instead of the subscription being marked as incomplete
can you share a Subscription ID (sub_xxx) with this issue so I better understand your ask?

old shell
#

I am refering during creation

tired saffron
old shell
#

I cant share an ID since I am talking about creation proccess

#

I just need to know the default payment_behaviour if not specified

tired saffron
#

I cant share an ID since I am talking about creation proccess
if you send a creation request to Stripe, and it failed, in the error message you get back a request ID req_xxx
I just need to know the default payment_behaviour if not specified
it depends on your API version. for the latest versions it's allow_incomplete

old shell
#

ok, I will find and send you. Meanwhile can I ask if there is any possibility for the customer to add coupon code or select other payment methods on hosted invoice url page?

tired saffron
#

to add coupon code
no
or select other payment methods
what do you mean by this? on the hosted invoice page the user will be able to enter their payment information

old shell
#

yes but I will already create the subscription as incomplete on my backend and the hosted invoce url will be generated for a particular customer. So why he cant select there one of his payment methods he may have added before?

tired saffron
#

if the customer has a default payment method set, then he doesn't need to use the hosted invoice page. the hosted invoice page is used when user wants to enter new payment information.

old shell
#

he can have payment methods but none default so on hosted invoce page I was thinking he having the possibility to select one

tired saffron
#

yes makes sense, but that's not how it works.

old shell
#

ok thank you

#

I have one last question

round briarBOT
old shell
#

On Test Env I see that if customer adds a new card with the same details, It gets registered as new payment method. Will this be the case for production also? So as an example the same customer added the same card on invoice hosted url and I see the same card replicated. I don’t think this is normal for live env

vast dawn
#

Yep this is expected