#ahjaydog-ach

1 messages ยท Page 1 of 1 (latest)

hasty silo
#

Hey! Yes, Checkout mode: 'subscription' supports recurring payments with ACH

#

{any-prefix}+test_email@{any_domain} I could not get to work
What is the expectation here?

timber crater
#

oh ok because the docs said it did not work so i was not sure

#

hold on. I saw it in a youtube video

#

1 - determine compatibility first bullet point

#

but then i see to the right subscription mode yes?

#

He does it at around 13:30

#

but I could not get it to work or recreate what he did

hasty silo
timber crater
#

great thanks

#

Does that mean I can get a job at stripe now :p

hasty silo
#

Can you share a Checkout Session ID where you tried the test email?

timber crater
#

yea hold on

#

you can see what i did for customer

#

"id": "ppage_1L9iXHIeTJrsS1reGzrvB2na",

#

I think that is it... if you scroll down that link below to events and logs it is the last event

hasty silo
#

It's ok, I can find it from the PI

timber crater
#

ok

#

Does the webhook need to be successful? It could be that was a time when it failed

hasty silo
#

Hmm, I'm not sure

timber crater
#

Yea i tried a few different things with {any-prefix}+test_email@{any_domain} even things like a@a.com+test_email@a.com but it didn't like the 2 @ signs

#

And another interesting thing I found is if you use instant mode I could not enter a routing/account number manually

timber crater
#

Any luck?

meager canyon
#

Hello ๐Ÿ‘‹
Taking over here as ynnoj had to step away
Catching up on the threads but can you summarize your issue for me?

timber crater
#

sure

#

so i cannot get 13:30 in the video to work or {any-prefix}+test_email@{any_domain} in checkout

#

and for some reason in checkout i could not manually input routing/account number during instant verification mode

meager canyon
#

Gotcha. Looking into the email thing first

and for some reason in checkout i could not manually input routing/account number during instant verification mode
Can you share a screenshot of the flow?

#

rdringo+test_email@usbvap.com was the email right?

timber crater
#

yes that was the email

#

but I wanted to send the test for manual ACH

#

The flow was create a checkout ACH session, pay manually with routing/account numbers, input rdringo+test_email@usbvap.com into the email field of checkout

#

This is done with instant checkout. I am going to use automatic but instant I had problems with. I wanted to pretend I was the customer and get an microdeposit email and enter the pin

#

Because I did not find it easy to immediately go to the enter microdeposit pin as if i was the customer

meager canyon
#

Gotcha. taking a look

timber crater
#

ok

#

I have an outstanding invoice link my customers can go to after they complete checkout which can enter the pin but i was hoping checkout would automatically redirect me to this pin page

#

But if they can get an email just like the video shows, that would be fine too. I just want to see what it looks like when I do it

meager canyon
#

is your test page publicly accessible? If so, can you share the link?

timber crater
#

yea 1 sec

#

tell me what to do and i'll do it

#

or should i recreate and tell you what i did?

meager canyon
#

yeah just wanted to check the flow as well as see if I can receive the email

timber crater
#

ok i will recreate it and tell you what i did

#

So on my site i login as that rdringo user

#

create an ACH checkout

#

now I see a blank checkout page where I can enter email, full name, bank account but using instant, I see no manual step

#

"verification_method": "instant",

#

i'll show screenshot

#

that is thee 1 problem but let me get to what happens during the test email but using the regular test institution success

#

i click subscribe

#

and i get no email for me to manually input a pin

#

well actually wait a sec i can't bbc i did the test instituion

#

my bad let me do a manual automatic

#

"verification_method": "automatic",

meager canyon
#

NP. Just curious, if this is your domain? if not, can you try with a gmail account?

timber crater
#

no it isn't i don't want to use a gmail

#

but it should still go through

meager canyon
#

it should typically go through, yes.

timber crater
#

and no luck with the email to input any pin

#

I would have to go here then as the customer

#

well actually i don't get any outstanding invoice

#

now i can enter the pin

#

but i was hoping this would be an automatic redirect from checkout

#

i wanted to see if the email can be sent to the test like in the video so i could see a link like that to enter the pin

meager canyon
#

Oh okay, let me see if we've changed our flow since releasing the video

timber crater
#

ok thanks

#

but you sort of see what problems I am having? No manual input for instant and no way to see a test email like the docs and video suggest

#

and it is kind of hard for a customer to remember to enter a pin if they don't get an email or instantly redirect to it

#

Here is a screenshot of the invoice pin page because i voided the link one i sent you

#

in another video cj seems to use payment intent to redirect to a pin page but there doesn't seem to be a way to do it in checkout'?

#

he does it around 40:00

#

40:21 is when you see it on the site

#

that is an entirely different page compared to the invoice page though

#

i can get to it though from the invoice page but it requires my customer to remember to do this

meager canyon
#

Okay so let's step back here for a moment

timber crater
#

ok

meager canyon
#

Just to summarize the issues and make sure I didn't miss anything,

  1. The email isn't being sent with +test_email but works without the postfix
  2. You're not able to manually enter the bank details for microdeposit verification?
timber crater
#

1 - i am expecting to get a test email using the prefix. I cannot get a test email when I do it. Regularly entering a normal email works as usual but it does not send a test.

#

that is expected though entering a normal non test email

#

the whole point of the prefix was to send a test email which is not working it seems

meager canyon
#

if i used the actual rdringo@usbvap.com email i get it hold on i'll show
Sorry I'm confused. Earlier you said the above
so are you getting the emails?

timber crater
#

2 - "verification_method": "instant", i do not see on checkout "enter bank details manually instead (takes 1-2 business days)

#

i am not getting the emails for entering a valid email or a test prefix email.

#

But I expect that with a regular email because it is not a test email

#

test email it should be sending an email like in the video

#

but it isn't

#

regular email = rdringo@usbvap.com
no email sent (expected because not a test) - unless you think this is wrong and it should send

#

that is not sending an email but in the video it shows it sending...

meager canyon
#

Okay so with instant verification, that's expected behavior

"verification_method": "instant", i do not see on checkout "enter bank details manually instead (takes 1-2 business days)

timber crater
#

oh wow, why though?

#

you mean to not show enter bank details manually?

meager canyon
#

yes

timber crater
#

i thought with instant you had to enter manually and do the pin

#

automatic i thought would bypass that unless it didn't catch it and you had to enter a pin if automatic fails

meager canyon
#

Entering bank details manually is for microdeposit flow where you'd see amount appear on your bank statement

timber crater
#

ok but automatic won't show the microdeposit?

#

or actually automatic does show it then sorry

meager canyon
#

automatic does show it

timber crater
#

ok

meager canyon
#

checking about the email

timber crater
#

ok thanks

#

and after that please check if there is a way in checkout to automatically redirect to that pin page

meager canyon
#

that's something you'd need to handle on your end

timber crater
#

eww so it isn't possible in checkout? I have to use an invoice link, or use customer portal, or that test email?

meager canyon
timber crater
#

hmm so if i listen to the payment intent in the webhook i can redirect to it?

meager canyon
#

Not the invoice, but hosted_verification_url

timber crater
#

So in the webhook if I have -> if event.type == 'checkout.session.completed': I can do it?

#

But that is a webhook though... the customer could leave the entire website

meager canyon
#

on your redirect you're injecting the CHECKOUT_SESSION_ID as a query param in the URL, right?

timber crater
#

return render(request,'memberships/stripe_checkout.html',{'stripe_public_key':settings.STRIPE_PUBLIC_KEY,'session_id':checkout_session['id'], })

#

in my django view i have that for checkout

meager canyon
#

Yes, so you'd retrieve the checkout session and expand payment_intent on it and use hosted_verification_url to redirect the users to microdeposit page. Flagging that it isn't the ideal usecase for microdeposits as they'd take about 1-2 days to appear on the statement

#

in livemode

timber crater
#

that is my checkout creation code. Not my webhook

#

I would do what you just said within here, not the webhook?

meager canyon
#

yup so when checkout session is successful, you'd be redirected to success page correct?

timber crater
#

yes

meager canyon
#

that success page URL should have a checkout session ID in the params

timber crater
#

ah ok. All I am doing though in that URL is this: def SuccessView(request):
return HttpResponse(render(request, "memberships/stripe_success.html"))

meager canyon
#

yup, you can configure your success page to make a request to your server and retrieve this checkout session using the ID you've received (remember to expand the payment_intent property)

and then your server can send the object back to your front-end code which should have hosted_verification_url

#

Also, for the micro-deposit test emails to work your account would need to be fully activated.

timber crater
#

ahh

#

that is why then

meager canyon
timber crater
#

what should i say to support?

meager canyon
#

the micro-deposit test emails are not being sent and they can work with the right team to look into why that is

#

Is your account fully activated?

timber crater
#

oh so it is not just a problem i am having, you are also having it?

#

No not fully activated

meager canyon
#

Yeah, I'd recommend activating it fully first and checking if that resolves it

timber crater
#

yea im not going to do that unless i go live this is my test environment

#

but i trust it will work then if activated

meager canyon
#

yup it will ๐Ÿ™‚

timber crater
#

ok cool

#

I am still not sure how to expand this payment intent you are talking about though

meager canyon
#

I have to step away now but my awesome colleague @knotty brook can help you with any further questions

timber crater
#

def SuccessView(request, pass_something_here?)

#

ok thanks hanzo

#

hi snufkin i just want to redirect after a successful checkout to that pin page but not sure how to do it in python it has been a while

knotty brook
timber crater
#

right that i remember how to do

#

but idk how to do this expand object. I do this? def SuccessView(request, pass_something_here?)

knotty brook
#

Okay so you retrieve the checkout session in this function, correct?

#

def SuccessView() isn't a Stripe function so I don't know what you are doing there. I can help you with using the Stripe Python library.

timber crater
#

hold on sorry was on a work phone call

#

i'll show you more of my code

#

i create the checkout from membershipselectview

knotty brook
#

And can you summarize what you want to do in SuccessView?

timber crater
#

what hanzo said

#

redirect from the success page to the ach pin page

#

or even put a link on the success page somewhere

#

but automatic redirect would be cool

knotty brook
#

Okay so you need to retrieve the Checkout Session (with expanded Payment Intent) in your SuccessView.

timber crater
#

yes and that idk how to do

knotty brook
#

Okay so in the redirect URL you get from the Checkout Session has the client secret as a query parameter. You can use that to look up the Checkout Session

timber crater
#

ok so let me see

#

memberships/success/?session_id=cs_test_a1S3MAB3s4KIUVobrIigycMP8Km9cpVLnwXpSiTGdKeksz2pUo3av5Vyts

#

That is my success page URL

#

You are saying extract that id from there?

knotty brook
#

Yup and that session_id has the value you are looking for

timber crater
#

{{ request.get_full_path }} i would use then in django to get the URL then get everything after the equals sign

#

There isn't another way to do it besides that?>

knotty brook
#

The SuccessView is server side, right? So you should have the full request object

timber crater
#

yes

knotty brook
#

You should review the Django docs on how to access query params in the request object. They're some of the better docs I've ever read

timber crater
#

yea it has beene 3 months since i coded and forgot everything

#

request.path maybe

#

here we go

#

ok so then i get that id then how do i expand?

knotty brook
timber crater
#

ok let me try

#

print(request.GET['session_id']) gave me the session id

#

stripe.checkout.Session.retrieve(request.GET['session_id']) gave me the API call

#

So you say to do this? stripe.checkout.Session.retrieve(request.GET['session_id'],expand=['payment_intent'])

knotty brook
#

Yup

timber crater
#

ok so I look for what in here?

knotty brook
#

The result returned is the Checkout Session with the full Payment Intent, correct?

#

Can you share the Payment Intent ID?

timber crater
#

that is after the expand

knotty brook
#

Oh wait, this is for a subscription?

#

So in that case, to get the payment intent you'd need to pass expand=['subscription.latest_invoice.payment_intent'

timber crater
#

yes

#

ah ok big difference

#

And in here I get what?

knotty brook
#

I'm trying to understand what @meager canyon was referring to

timber crater
#

Yea i only see hosted_invoice url

#

not verification url

knotty brook
#

But the user has already paid, correct? That's what the Checkout form was for

timber crater
#

Unless I need to do a manual automatic ACH? I think I did test institution that does it for you

#

Yea I will try doing a manual automatic ACH

#

This one I think

#

Ok I got it. How would I get it if it were not a subscription and instead is a one time payment?

dusky basin
#

๐Ÿ‘‹ stepping in here as Snufkin needs to step away.

#

This is a pretty long thread, mind summarizing where you are at?

timber crater
#

hey. New record for longest thread? :p

dusky basin
#

Looks like using Checkout with ACH?

timber crater
#

yes

dusky basin
#

๐Ÿ˜†

#

What challenge are you running into specifically?

timber crater
#

I want to get the microdeposits hosted verification url for one time payments, not subscriptions

#

would it be what snufkin said above already?

#

expand=['payment_intent'] for the 1 time payment

dusky basin
#

Yep

timber crater
#

ok i'll have to try that when i get to that point. Not quite there yet

dusky basin
#

Let me know if you run into any challenge when you try that!

#

But yeah the flow works the same... just the PaymentIntent will be directly associated with the Session instead of the Subscription's Invoice

timber crater
#

ok cool makes sense

#

oh another unrelated question i figured out a way but idk if it is the best way

#

i want to be able to tell the difference between a checkout with ACH and checkout with card in a webhook

#

So what I did was only create a checkout for 1 of those objects

#

checkout_session.payment_method_types[0] == 'us_bank_account'

#

checkout_session.payment_method_types[0] == 'card'

#

Instead of having payment_method_types=['us_bank_account','card'] I just have 1 of them in the array

dusky basin
#

You should only do it that way if you want to limit the type of payment method the customer can pay with.

#

I wouldn't recommend that

#

Instead, you would retrieve the PaymentIntent that is returned from checkout.sesseion.completed

#

And then you can see what type of payment method was used with that PaymentIntent

timber crater
#

ok i see

#

so using your way i can have 1 checkout where the customer picks out their payment method? Right now I have 2 links where they choose / can use only 1 payment type

dusky basin
#

Yep

timber crater
#

interesting

dusky basin
#

I wouldn't recommend two links as bad experience for customer if they need to go back

#

And switch payment methods

timber crater
#

ok i may or may not change it idk yet.

#

Is my current way flawed in any other way?>>

dusky basin
#

No that works if you prefer it.

#

But if you want to add more payment methods in the future it will also be a lot more work.

timber crater
#

ok because on my payment page i have the user select in a form which one they want to use

#

yea true idk

dusky basin
#

Yeah, that works if you want, but not how I would do it.

timber crater
#

ok gives me a few things to think about thanks