#dev-help

1 messages · Page 116 of 1

vocal wagon
#

sure I retrieve the session with

stripe_library.api_key = STRIPE_KEYS['secret_key']
session = stripe_library.checkout.Session.retrieve(
            request.GET.get('session_id'))
customer = stripe_library.Customer.retrieve(session.customer)
#

and I create the session with:

checkout_session = stripe_library.checkout.Session.create(
                idempotency_key=idempotency_key,
                payment_method_types=['card'],
                line_items=[{
                    'price_data': {
                        'unit_amount': self.amount * 100,
                        'currency': 'eur',
                        'product_data': {
                            'name': "Charge for {}".format(self.advertiser.user.username),
                        }
                    },
                    'quantity': 1
                }],
                client_reference_id=self.advertiser.id,
                metadata={
                    'advertiser_id': self.advertiser.id
                },
                mode='payment',
                # success_url=settings.SECURE_SITE_URL + 'advertiser/payment/success/?session_id={CHECKOUT_SESSION_ID}',
                success_url='http://localhost:8080/advertiser/payment/success/?session_id={CHECKOUT_SESSION_ID}',
                # cancel_url=settings.SECURE_SITE_URL + '/payment/error/',
                cancel_url='http://localhost:8080/advertiser/payment/error/',
            )
meager hawk
#

and session.metadata is nil when you try to access it?

vocal wagon
#

if I print the checkout_session after the creation there is the advertiser_id but if i print it after the retrive I get "metadata":{},

tiny bone
#

I want to add card details on stripe with this ui,please send me code for this

vocal wagon
#

ok I removed the customer fetch and now I can access the metadata

#

I didn't need it so it's ok for me

meager hawk
#

@vocal wagon really strange. Can you do this and share the output?

from pprint import pprint
pprint(vars(session.last_response))

but ok.

vocal wagon
#

@meager hawk thank you for the help!

meager hawk
#

@tiny bone I can't give you code for an entirely custom integration based on just a screenshot, I'm sorry.

tiny bone
#

ok then suggest any url for this in asp.net core

#

and suggest for custom integration

meager hawk
#

https://stripe.com/docs/payments/accept-a-payment , but you need to do your own research here, no one can just give you a fully working example code. We have a .NET library for example(fully documented). If you have specific questions once you start developing things let me know.

tiny bone
#

ok thanks

distant pelican
#

I have a stripe customer setup, they submit their card details with stripe elements to setup a subscription.

I then want them to be able to purchase single use items with the same card without entering their details again is this possible?

I have tried adding
setup_future_usage: "off_session" to the confirmCardPayment in elements as the API docs say but when I try make a new PaymentIntent on this customer the status is still "requires_payment_method"

Going to the customer portal I can see the subscription and its card as the default payment method

What am I doing wrong?

meager hawk
vocal wagon
distant pelican
#

pi_1J8Q75It5Wc5dByWPfl2srbt

#

sorry for the customer that has a card its a different pi

meager hawk
#

@vocal wagon hello there! Do you have a development/coding question I can help you with? (I'm afraid I don't speak German too).

distant pelican
#

this customer had subscription created with a card and should've been saved for off_session

#

then tried to complete a paymentIntent but get requires payment method

meager hawk
#

hmm I can't find that PaymentIntent, did something get cut off in the copy and paste?

distant pelican
#

Yeah sorry on two different pcs i tried typing it manualyl

meager hawk
#

if you have an example I can look but there's at least a few things to mention

  • status:requires_payment_method might mean you didn't attach a PaymentMethod, or that there was a decline
  • for the former, it's not enough to specify just a Customer ID, you also need to pass the payment_method:pm_xxx Id explicitly, we don't look at invoice_settings or have any concept of a "default"
  • for the latter, it might be that you did not pass off_session:true so the payment required 3D Secure and was declined
vocal wagon
#

👀

meager hawk
#

so as I said there's a few things this could be, an example would clear it up

distant pelican
#

pi_1J8QO0It5Wc5dByWfNphg2QR

#

this one?

meager hawk
#

yep

#

so for that one it's my second bullet point:
for the former, it's not enough to specify just a Customer ID, you also need to pass the payment_method:pm_xxx Id explicitly, we don't look at invoice_settings or have any concept of a "default"

#

you have to pass PaymentMethod to the PaymentIntentCreateOptions there

distant pelican
#

(tbf you can set the card as default in the customer portal haha)

#

ok so if i get the paymentmethod from the customer and then add it to createoptions that should work?

meager hawk
#

the default is only for invoice/recurring payments

#

for one-off payments we require you to tell us which card to charge so there's no confusion!

distant pelican
#

alright cheers will try it and get back to you with result 🙂

distant pelican
#

yes! it worked

#

had to do some refactoring while in there - but thanks for help!

meager hawk
#

great!

cloud pasture
#

Whats a more reliable way(then webhooks) to see if a transaction / payment intent is successful

meager hawk
cloud pasture
#

Yea i know the intentId, i save it in transaction table locally

#

So basically i can later on run a crons server to check for uncomplete transactions

meager hawk
#

you can but really webhooks are better, you just update your database with the new state that we push you instead of having to poll the status with a cron job

cloud pasture
#

But i think i will add an untrustworthy field that table that tells me only to check transaction that got something from client side

#

How are webhooks reliable ?

#

what happened if there was communication error ?

#

what happened if for some reason the webhooks request didnt work .

#

thats un reliable

meager hawk
#

they get retried multiple times over 72 hours.

#

if your server is unreachable for that long you have bigger problems 😓

cloud pasture
#

🙂

#

Ah so thats why responding with ok is important ?

meager hawk
#

yes that's how we know you acknowledge getting the event, anything else is a failure and we retry, it's documented at that link

cloud pasture
#

So you guys stop sending the same request ?

#

nice

#

will read though it now

clear sun
#

Hello,
What card reders can I use with stripe in the UK?

meager hawk
hallow lake
#

Hi, I am saving my card using confirmCardSetup, the problem is that it is saving card id as pm_xx instead of card_xx whereas if I do from dashboard then it is saved as card_xx. So, how can I save card id as card_xx using confirmCardSetup?

meager hawk
clear sun
#

I have saw a few apps that we can use on IOS but it seems very unprofessional.

hallow lake
#

@meager hawk yes, it does not show card info when I retrieve the customer

meager hawk
#

if you're looking at e.g. customer.sources, that is legacy

hallow lake
#

basically, I using this approach to make the new card as default using ```stripe.Customer.modify(cus_id, card_id

meager hawk
#

that is a legacy approach too, you shouldn't be using default_source at all (or customer["sources"] ). That's all deprecated and you should use the PaymentMethods API.

hallow lake
#

okay can you tell me how to make a payment source as default using PaymentMethods API

meager hawk
#

you don't, since that's not a concept any more, there is no default method for one-off payments

#

to charge a saved card you'd do https://stripe.com/docs/payments/save-during-payment?platform=web#web-create-payment-intent-off-session

when you are ready to charge your customer off-session, use the Customer and PaymentMethod IDs to create a PaymentIntent. To find a card to charge, list the PaymentMethods associated with your Customer.
When you have the Customer and PaymentMethod IDs, create a PaymentIntent with the amount and currency of the payment.
for one-off payments we require you to tell us which card to charge so there's no confusion!

hallow lake
#

I ll be using the latest card to charge invoices every month. If I dont make it default then it would charge the previously set default card

hallow lake
#

okay thanks

vocal wagon
#

Hi. We are using stripe-klarna in our products based on sources. We currently face the issue that the klarna drop in is in english and the language cannot be changed. Do you have any suggestions? We're already setting locale and purchase_country

meager hawk
vocal wagon
#

thanks I will check

robust relic
#

I am testing a webhook with the Stripe CLI using the following command:
stripe trigger checkout.session.async_payment_succeeded

It gives me the following error:
"The payment method type provided: bacs_debit is invalid. Please ensure the provided type is activated in your dashboard (https://dashboard.stripe.com/account/payments/settings) and your account is enabled for any preview features that you are trying to use."

I don't see a way to enable bacs_debit from the dashboard. Could you please tell me how to do that?

bold basalt
#

@robust relic hello, which country is your Stripe account based in ?

bold basalt
#

@robust relic gotcha, afaik bacs_debit is available in the UK, I'd talk to Stripe Support at https://support.stripe.com/contact , see if they know of a way to let other accounts access it

charred hornet
#

Hello! I am wondering if it's possible to configure a prorated charge on a subscription with a checkout session?

robust relic
bold basalt
#

@robust relic you could use sepa_debit on a CheckoutSession, that would fire async.payment_succeeded as that is a delayed notification payment method.

robust relic
bold basalt
#

@robust relic yeah I don't think there's a good way to test async_payment_succeeded with mode: subscription. You can mock it out on your end, the object you get back in webhook event will still be a CheckoutSession object, with all the fields you would expect if it were a mode: subscription CheckoutSession.

bold basalt
#

@rapid tide you don't create a payment in that case. What does your payment flow look like? Are you collecting a customer's card during a $0 payment?

crisp dome
#

Hey I’ve changed my number so I can’t get the code to login. What can I do?

bold basalt
frosty coyote
#

Hey, we seem to be getting an insufficient balance error response, but from what we can tell the balance is available for the refund.. req_cBcAe0vKiMoH5x

stark tide
#

@frosty coyote that request uses an idempotency key, so retrying the request will echo the same response as the first time the request was processed

#

it's possible what's going on there is that the first time it was tried, there actually wasn't enough balance, and even though there is now, you're getting the same canned response from the idempotency replay

frosty coyote
#

ok, that would only be valid for 24 hours right?

stark tide
#

yeah

#

(with the caveat that idempotency keys are expired after at least 24h have passed, not after exactly 24h)

frosty coyote
#

yeah, thats no problem just making sure i pass on relevent info to the team

#

Ok, that worked, they switched the idemotency key and it went through. Thanks

stark tide
#

np!

frosty coyote
#

We need to try get our retries and idemptency stuff sorted. Before i joined they accidentaly double charged a bunch of people and it was a nightmare fixing it. So now they're so afraid of these issues. We need to get it into a place this is all automatic and we don't need to worry about it

stark tide
#

tbc, the only case where it's helpful to retry requests with the same idempotency key is if the last time the request timed out or returned an HTTP 5xx

frosty coyote
#

Thankfully it was partner organisations that had the issue rather than actual customers, but it was still a nightmare

stark tide
#

if you get back anything else (2xx/4xx), subsequent retries won't change the result (at least until the idempotency key expires after 24h)

frosty coyote
#

Yeah, I need to get my head into the reason why these retries are needed. The one today, insufficient funds is pretty straight foward. However I know they are manually retrying a bunch, and I need to find out why, and how we can make it so a human doesnt need to be involved.

#

I know the other day, 429's made us need to retry a bunch. However, other than exceptional circumstances, it shouldnt really need someone to do anything

stark tide
#

ah sorry, you reminded me that 429s can also be retried with the same idempotency key

#

I misspoke before

frosty coyote
#

yeah, I think they're very rare though. We've never seen them other than the problems the other day. One off events like that is easy enough to handle, if I get the max retries setup we should never see them, we don't make tonnes of transctions a second

stark tide
#

tbc, some 429s / 500s will replay with an idempotency key, but not all

#

it's that it's never helpful to retry a 200/400 with the same idempotency key

#

tbc - the real use case for idempotency keys is network failure, where you get back no response

#

(and you have no way to tell whether the request made it to stripe or not)

#

if you get back some sort of failure response, but need to retry the request for some reason, the best rule is to retry with a different idempotency key

frosty coyote
#

Yeah the problem with that is, if it did go through and we arent aware, it actions twice

#

Which is what happened before and now various members of the team are pretty scared of that scenario.

#

Most (maybe 95%) of our stripe calls go through an internal micro service, thats very strict about recording what happened. Any relevent webhooks we receive are just stored in their entirety so that we can unpick problems if we need to

stark tide
#

wdym by "we aren't away"?

frosty coyote
#

we arent aware*

stark tide
#

oh like a 5xx?

#

yeah, error handling for those is a bit rough

frosty coyote
#

well just for any reason if we haven't managed to record a response. I can't be precise as I don't know what the cause of the double charge was.

#

However, I know when I joined the project one of the key targets was to make this microservice very transparent so that problem never happens again, and if it does that we can work out how to fix it.

stark tide
#

gotcha

#

that'd fall in essentially the same bucket as network problem imo

frosty coyote
#

I think they ended up just refunding everyone and taking a financial hit

stark tide
#

what I mean is if you got a response back from stripe, recorded it, and decide that you need to run the request again for some reason, it's ~never helpful to rerun the request with the same idempotency key

frosty coyote
#

Yeah the problem we have is if we re-run and it has actioned it twice. We need to find a way to stop that happening, at the moment, idempotency pretty much ensures that for us.

#

Ithink we need to build something into our service to make sure we fix that

robust relic
#

I am trying to implement Stripe Checkout for Subscriptions (in the US) and have a few questions about the difference between it and Elements. Does Stripe Elements support more payment types than Stripe Checkout for subscriptions? Are there going to be updates for Checkout to support more payment types?

thorny jasper
#

Hello, german support pls

bold basalt
#

@robust relic Elements supports almost all payment methods but yes Checkout is quickly adding support for all payment methods too.

thorny jasper
#

my englich is lidelbit

bold basalt
#

@robust relic "about the difference between it and Elements" -> the major difference is Checkout gives you a lot out of the box, and is quicker/easier to integrate

#

@thorny jasper Stripe Support can help you in German language

stark tide
#

@frosty coyote sure, you need to be careful about how you handle changing the idempotency key (eg: before retrying, commit a change to your db which changes the key to some new value, then begin retrying with the new key until you get back an affirmative answer)

robust relic
thorny jasper
stark tide
#

@frosty coyote there's some middle ground here between "wantonly duplicating requests" and "retries having no effect", is all I'm trying to get at 😛

frosty coyote
#

Yeah thats exactly it. We should be able to figure something, just as is the "normal" way.. its never the focus.

#

always something more important to do 😄

bold basalt
#

@robust relic yes but not all payment methods support Subscriptions currently (some don't) and you might still hit the same limitation there where your US account won't be able to create payment methods that aren't supported in your region

upbeat grove
#

Hope someone can carry own this.
In our project we have a platform where people can share ideas and people can fund those ideas. Basically it's a non-profit platform for community to find funds for local work

mighty hill
#

@upbeat grove Hello! How can I help?

upbeat grove
#

Just trying to figure out. Direct vs Destination charges for connect.
We have a platform for people to share their ideas and collect funds for charity work

mighty hill
#

@upbeat grove There are many factors that go into the decision of which charge type to use, and we have documentation to help you make the right choice here: https://stripe.com/docs/connect/charges#types

Do you have a specific question about those docs or about your situation?

upbeat grove
#

no it's more about my situation

session = stripe.checkout.Session.create(
                payment_method_types=['card'],
                line_items=[{
                    'name': 'Stainless Steel Water Bottle',
                    'amount': 1000,
                    'currency': 'pln',
                    'quantity': 1,
                }],
                payment_intent_data={
                    'application_fee_amount': 500,
                },
                mode='payment',
                success_url='https://example.com/success',
                cancel_url='https://example.com/cancel',
                stripe_account="acct_1J6O4W2XeRtNInC6",
            )
#

I am doing direct charges and was wondering if it fits my situation. looking at things i feel like it does but according to docs. Direct charges are not for marketplace platform

mighty hill
#

@upbeat grove That code won't work as-is; the stripe_account parameter belongs in a separate argument, not alongside the parameters you pass along in the body of the request.

#

@upbeat grove To clarify, that code (once corrected) will create a direct charge, but I can't tell you if that's the right type of charge for your business.

upbeat grove
#

that's the other thing. It worked, I was able to charge the customer and the funds were counted for that business (stripe_account)

mighty hill
#

@upbeat grove Can you paste that Charge ID in here so I can look it up?

upbeat grove
#

ch_1J88Rt2XeRtNInC6uD8gG9ia

mighty hill
#

@upbeat grove Thanks! Hang on...

upbeat grove
#

I was told stripe_account is available for all methods

mighty hill
#

@upbeat grove You can specify a stripe_account for almost any API method, that's correct, I just thought the syntax you had was incorrect.

#

@upbeat grove Oh, you're using dj-stripe... maybe it's doing something to make that work. I thought you were using our official Stripe Python library directly.

#

@upbeat grove Or, actually, maybe that's the way our Python library works? 😅

upbeat grove
#

I am using official library . I do have dj-stripe models install for webhook

#

i copied from here

mighty hill
#

@upbeat grove Oh, yeah, my fault. That's not how our other libraries work, so it threw me off. Sorry about that! I don't use Python very often, if you couldn't tell. 🙂

#

@upbeat grove Okay, so you're creating direct charges successfully, so what other questions do you have?

upbeat grove
#

anyways, i don't have issue in using anything. I just need to find out if direct will fit the business or not. I will trying reading more article or watch dev chat on youtube 😆

north surge
#

Hey! I'm having an issue with stripe checkout and CORS, would somebody be able to help me out?

mighty hill
#

@upbeat grove I don't know your business so I can't advise you generally, but I'm happy to answer specific questions if you have them.

#

@north surge Hello! What's the issue?

upbeat grove
#

btw how do you know I am using DJ-stripe 😆

north surge
#

Hey, so I'm successfully creating a stripe checkout session and passing the URL back from the server using a 303 request response. Then the client fetches and returns this error:

Access to XMLHttpRequest at 'https://checkout.stripe.com/pay/cs_test_[[...]]' (redirected from 'http://localhost:3000/api/create-checkout-session/') from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

mighty hill
#

@upbeat grove I looked up the request that created that Checkout Session and saw it came from dj-stripe.

#

@north surge I'm not sure exactly what you mean. Can you explain what the "it" is in the "it fetches and returns this error"?

mighty hill
#

@north surge The client what though? Are you talking about the web browser? Your JavaScript code?

#

@north surge To put it another way, I'm not clear if you're using your JavaScript to redirect to the server URL that in turn responds with a 303 that sends your customer to the Checkout URL, or if you're hitting the 303 URL in your JavaScript code, getting the URL there, and then redirecting?

north surge
#

Right, so I'm using axios to make the request, and it appears to handle the 303 automatically, I'm actually not sure what happens under the hood

mighty hill
#

@north surge Can you share the code that's handling the redirect process?

north surge
#

I'm not currently handling the redirect process at all, but I'm seeing a network request to the checkout URL which then throws the CORS error

mighty hill
#

@north surge You're seeing a network request to the checkout URL from what?

north surge
#

I think browsers automatically handle a 303 redirect?

mighty hill
#

@north surge They do, yes, but your JavaScript code may not be. It's very difficult to assist without seeing the code in question; are you unable to share it?

north surge
#

Yeah it's literally just an axios request

#

one second

#

export const createCheckoutSession = async (formFields) => { return axios({ method: CREATE_CHECKOUT_SESSION.METHOD, url: CREATE_CHECKOUT_SESSION.ROUTE, data: formFields, headers: { "Access-Control-Allow-Origin": "*", }, }).then((data) => { return data; }); };

#

Do I need to manually handle the redirect here?

mighty hill
#

@north surge Is CREATE_CHECKOUT_SESSION.ROUTE the URL that returns the 303?

north surge
#

yes

mighty hill
#

@north surge Yeah, that won't work. You should basically remove all this code and replace it with something like window.location = CREATE_CHECKOUT_SESSION.ROUTE

stark tide
#

you're redirecting an ajax request; that won't redirect the browser to that url, it'll make the ajax request try to request the url it's redirected to

#

and that in turn is being blocked by your CORS policy

mighty hill
#

@north surge The code you have above is trying to fetch the data at that URL and use the results in your code, but when the URL is accessed your server responds with the 303 which basically says "the data you're looking for isn't here, it's over there" and "over there" is the Checkout Session's URL, so your JavaScript code tries to load the actual Checkout page and can't due to it being a cross-origin request, so it fails.

#

@north surge Even if it succeeded you would get the HTML from the Checkout page, which would do you no good.

north surge
#

Ah, okay I understand

#

I should be able to fix from here. Thanks for the help!

mossy wren
#

Hello Stripe folks. I'm testing a couple webhooks and wanted to know how you recommend testing payout.paid/failed and invoice.payment_failed hooks?

mighty hill
mossy wren
#

Great, thanks @mighty hill! I tried the Stripe CLI but I don't believe it supports the payout events.
For payment failed, I'll surely use the test cards you've provided.
For payout events, how would I be able to create a failed payout to one of the Connect account?

mighty hill
#

@mossy wren See the last link I shared above.

mossy wren
#

Ah, just saw the last link you provided. Perfect, thank you V much.

tulip pelican
#

Podem pedir para o pessoal do suporte resolver o problema do meu dinheiro parado com vocês?

cerulean pineBOT
#

:question: Have a question about your account @tulip pelican?
While we're sorry to disappoint, this Discord is intended for technical questions and developer chat—we're not able to help with account specific questions. For help with your account please reach out to Stripe support directly at https://support.stripe.com/contact

tulip pelican
#

Eles não resolvem meu problema

#

tem alguém ai que pode ajudar estou a mais de 60 dias com meu dinheiro parado.

#

e uma tremenda falta de respeito

mossy wren
#

@mighty hill may need your help on the payout. I attempted to create a payout for my test user acct_1J8An9RHcurDxsvD. I've used the only debit card's id as the destination of the payout, but I'm receiving an error message:
StripeInvalidRequestError: No such external account: 'card_1J8V4SRHcurDxsvDqLnQq0VJ'
Am I using the right external account id?

sick talon
sick talon
mossy wren
#

@sick talon Great, I missed that step. Thank you so much.
I just realized I have insufficient funds in my Stripe account for this transfer. I'm in the test environment - what do you recommend me doing to allot test funds for this payout?

sick talon
#

(for the charge, and then payout from the available balance to anywhere)

mossy wren
#

@sick talon I'll give that a try right now, thank you!

#

@sick talon My apology, I think I'm missing a step. I've successfully charged the card ending in 0077 n amount of dollars. I've attempted to create a payout again, but still encountering the insufficient fund in stripe account for transfer.

sick talon
mossy wren
#

Ah, that is the step I'm missing. The concept is coming together now, I'll give this a try right now. Thank you.

rotund juniper
#

$request->user()->asStripeCustomer()->subscriptions;
i found this method
they said that this method is working
but i dont want to use request

sick talon
rotund juniper
#

no i want to retrieve all subscriptions of user but avoiding using customer id

#

is it possible

sick talon
rotund juniper
#

okkk

icy osprey
#

Hi, I introduce myself, I'm Michael, I don't know English very well, so I use the google translator. my question is can you create a plan like this example use case (https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#installment-plans), for a checkout ?.
I have not managed to do it, I want my clients to be able to pay a sum for the months provided, but I have only managed to make the recurring payment, but according to me, the recurring payment is infinite and does not stop, in summary I want to do the example that they I show, in a checkout session, in advance thank you devs

sick talon
icy osprey
#

Hello, thank you very much for answering, exactly, in my development you want to sell packages, for example, a package is worth $ 90 to pay in 3 months, so I want the subscription to create the payment of $ 30 each month and after paying the 3 months the charge to the card is stopped

sick talon
dense beacon
#

Hey guys, can anyone tell me the best way to update a card source's expiration date?

It looks straight forward for a Card object
https://stripe.com/docs/api/cards/update

but we are creating cards through the Sources api
https://stripe.com/docs/api/sources/update

Currently we are just creating an entirely new Source w/ the new expiration date. We also forgot to delete the old card in Stripe, which seemed to be causing some issues — charges were being declined on the new cards... which is why i'm here. We are now deleting the old, expired cards to see if that helps but... is there a better way?

I'm thinking the only move is stay how it is, or use the new Payments api - does this sound right? Thanks

sick talon
dense beacon
warm nimbus
#

How can I check the product name on any request?

bold basalt
#

@warm nimbus hello, can you say more? like what do you mean "on any request"?

warm nimbus
#

what request should I make to verify the product name?

bold basalt
#

@warm nimbus I'm still not clear what you mean, like what do you mean to "verify" product name?
Like what does that entail? fetching a Product from the API? something else?

warm nimbus
#

I get a webhook that sends me the "Charge" id. How do I check which product was sold?

bold basalt
#

@warm nimbus what integration are you using, Checkout? or PaymentIntents?

bold basalt
#

@warm nimbus well PaymentIntent and Product don't have a link. PaymentIntents are just created for an amount not for a Product. So there's no link between a Product or a PaymentIntent in the API.
It is possible if you're using Checkout or Invoices/Subs but not for PaymentIntents

warm nimbus
#

But how can I get the product name through the api,(The product you create in the dashboard)?

bold basalt
pale belfry
#

Hello, I'm currently trying to implement Connect Express (amazon, Lyft, Etsy model) into my react, firebase, Node stack.

#

Any tips on following the docs, other examples out there, or other content that might help?? Super thanks

bold basalt
#

@pale belfry hello! not sure if you're stuck somewhere, there isn't a single doc I can send you as there's "a lot" that comes with connect. Where are you at right now? have you picked what fund flow you are going to use? How far have you built your integration?

pale belfry
#

Hi @bold basalt , by fund flow do you mean, "payment to the platform, then payout the sellers every 7 days?"

bold basalt
pale belfry
#

I am at the beginning, I basically want the "Sign up" button to lead to Stripe connect

#

And then have each product under the SellerID result in a weekly payout to the Seller

bold basalt
#

@pale belfry have you considered what account type you're going to use? or no

pale belfry
#

@bold basalt Thanks for the help, what do you mean though by account type? They will have a "Seller" account, different from a regular "user"

bold basalt
#

@pale belfry ok so taking a step back: there's a LOT that goes into setting up Connect, so it would help to take a step back and consider what Connect account types are, what the right fund flow for you is, etc.
You should carefully read through https://stripe.com/docs/connect/accounts
and https://stripe.com/docs/connect/charges
those will answer lots of questions for you and show you all the right code snippets that you need to integrate

pale belfry
#

@bold basalt Okay thank you, I'm going to think that this may be something on the order of days instead of hours then :(. Okay I will reference our conversation here, and we may have other key questions over the course of this.

bold basalt
#

@pale belfry definitely order of days, if not weeks (in my opinion), Connect is really powerful but it is an intensive integration.

warm nimbus
bold basalt
#

@warm nimbus which webhook event?

warm nimbus
#

One that triggers when the product is paid for

bold basalt
#

@warm nimbus no the webhook event depends on what your integration is using , like are you listening to invoice.paid? payment_intent.succeeded ? checkout.session.completed? charge.succeeded?
Depends on how your integration is built, what webhook event is listens to

warm nimbus
#

I'm reading "charge.succeeded", but I don't get the product id so I can search

bold basalt
#

@warm nimbus yes that is expected, you mentioned you are using PaymentIntents right?
PaymentIntents are only created for an amount: 1000 or some amount, they are not linked to any Product. So there's no link between a Product <> Charge/PaymentIntent. If you were using a CheckoutSessions, there is a link to Price and therefore Product, but not just when integrating PaymentIntents on their own. Does that help?

pliant raven
#

Здравствуйте, оплатил покупку на aimjunkies.com , но им оплата не пришла

#

Hello, I paid for the purchase on aimjunkies.com , but they did not receive the payment

bold basalt
#

@pliant raven hello, this is not the right channel for those questions, please reach out to the merchant/business you purchased from, for help with that.

pliant raven
#

they said to contact you

bold basalt
#

@pliant raven you would have to contact them and they would have to work with Stripe Support (if they even use Stripe, that is) to figure out if a payment was made or not and why.
For context, this is a channel for software developers who are interested in using Stripe to build an integration, we don't have any access to answer account related questions.

warm nimbus
bold basalt
#

@warm nimbus let's start here, as I'm not clear on your integration, so it will help me understand better.
Can you share just the code snippet for how you are creating a PaymentIntent in your code? Just that code snippet (so like the 5-6 lines)

warm nimbus
#

let's step by step...

#
  1. I created a product.
#
  1. I clicked on this link and paid... What is the wehook that sends me the product data (id, metadata) when it was paid?
bold basalt
#

@warm nimbus ahh ok so you aren't using PaymentIntents directly, you are using PaymentLinks, which is basically Checkout

#

@warm nimbus in that case, the right webhook event is checkout.session.completed

warm nimbus
#

Why are you having high transparency?

bold basalt
#

@warm nimbus do you mean the font color on the UI?

warm nimbus
#

Yes, it is lighter, as if it were disabled.

bold basalt
#

@warm nimbus it is faded out cause it was selected, so it made it into the list that is just behind that dropdown

carmine lintel
#

Hello all - I just realized that I have an issue with payouts to connected accounts. The entire amount of the payment is transferred, but my account is charged the Stripe fee

#

So I'm losing money on the payments. Viewing as the connected account, no fee appears on their end

#

how do I transfer the amount less the Stripe fee?

bold basalt
#

@carmine lintel hello, not sure I'm great at Payout fees, what type of Connect accounts are those? Express? Custom?

carmine lintel
#

Standard

bold basalt
#

@carmine lintel what fund flow are you using? Destination Charges?

carmine lintel
#

I set the transfer_data.destination to the connected account ID

#

when the paymentIntent is created

bold basalt
#

@carmine lintel yeah that is Destination Charges, the platform is responsible for Stripe fees in that case. This is covered here: https://stripe.com/docs/connect/destination-charges
You probably want to take an application_fee on each Charge to cover for the Stripe fee

carmine lintel
#

Would the same logic apply to an invoice where the transfer_data.destination is set?

bold basalt
#

yes

carmine lintel
#

could I simply subtract the stripe fee from the purchase total?

#

and transfer the reduced amount?

bold basalt
#

@carmine lintel yes, or you can specify application_fee_amount on the Invoice

carmine lintel
#

got it. thank you

#

@bold basalt super helpful as always! thank you!

true stag
#

Hi All, I have a php cron setup to run some transfers, and I know the script is being called because I coded in an email to myself when it runs. Today the script was called but the transfers didn't happen, but when I called the script manually the transfers did happen! It seems the issue has to do with the script being called as a cron instead of manually. Any ideas?

rugged coyote
#

Hi there i have a question. It is my first time developing with Stripe. I'm on VS2019 Enterprise. When i Debug i can not see the Card for Payment. I have try it with Edge, Chrome and also Safari.

bold basalt
#

@rugged coyote hello, check the browser console log, there might be warnings or errors that tell you what the issue is

rugged coyote
#

why the card is not loading?

bold basalt
#

@true stag hello, not sure, you might need to debug that but I'm on the same page as you, some issue with the cron not actually running end to end possibly.

#

@rugged coyote try what I mentioned above with debugging

true stag
#

@bold basalt hi! I hope you're well. Yes that's what I thought as well but on calling it manually ran end to end without issue. php error reporting on and got no errors or warnings. I'm stumped!

dim hearth
true stag
dim hearth
warm nimbus
true stag
dim hearth
warm nimbus
#

yeah

dim hearth
# warm nimbus yeah

Those events are really just stubs to test that things are hooked up properly - they're not really a good indicator of all the information that will come through on a real webhook event. Have you tried using one of your test payment links? That should trigger a real webhook event in test mode that you can take a look at

long swan
#

I found something wierd, not sure if this is a known issue but it seems like metadata isn't properly showing up in the dashboard

dim hearth
#

@warm nimbus Another thing to note (which @bold basalt ) already mentioned - On a checkout session line_items is expandable, and you won't get it back by default. You need to re-retrieve the checkout session's line items (https://stripe.com/docs/api/checkout/sessions/line_items) and pass expand: ['data.price.product'] in the API call to get the Prices and their Products

rugged coyote
dim hearth
long swan
#

its test mode

#

the send/receive for the event shows the metadata (its called bot_id) in the JSON, but its not showing up in the dashboard UI

#

its on the last event on the "Events and Logs" timeline, and its in the request and response so it looks like stripe got it, not sure if something failed in saving it or maybe the dashboard is just having issues

dim hearth
long swan
#

huh

dim hearth
# long swan huh

Is there a specific part you're confused by, or would it help if I just rephrased the whole thing in a bit more detail?

long swan
#

so i'm using the go sdk

#

and I was initially doing checkoutSession.AddMetadata("bot_id", botid)

I tried checkoutSession.PaymentIntentData.AddMetadata("bot_id", botid) (which is what I think i'm supposed to do?) but now i'm getting some kind of memory error

#

so when I do session.New(checkoutSession) to create the session, it creates the checkout session and payment intent at the same time?

dim hearth
long swan
#

ok I think I might have figured it out

dim hearth
#

Yes, a Checkout Session will have an associated payment intent

long swan
#

ok nvm didn't fix it...I tried checkoutSession.PaymentIntentData.Metadata["bot_id"] = botid but that also didn't work so i'm not sure how this is supposed to work...from what i've read it sounds like the PI is automatically created so I just need to edit the underlying PI to match what I need

dim hearth
# long swan ok nvm didn't fix it...I tried `checkoutSession.PaymentIntentData.Metadata["bot_...

You'd want something like this:

params := &stripe.CheckoutSessionParams{
  SuccessURL: stripe.String("https://example.com/success"),
  CancelURL: stripe.String("https://example.com/cancel"),
  PaymentMethodTypes: stripe.StringSlice([]string{
    "card",
  }),
  LineItems: []*stripe.CheckoutSessionLineItemParams{
    &stripe.CheckoutSessionLineItemParams{
      Price: stripe.String("price_xxx"),
      Quantity: stripe.Int64(2),
    },
  },
  Mode: stripe.String(string(stripe.CheckoutSessionModePayment)),
  PaymentIntentData: &stripe.CheckoutSessionPaymentIntentDataParams{
    Metadata: map[string]string{
      "attr1": "val1",
    },
  },
}
s, _ := session.New(params)
long swan
#

ooooh that makes more sense

#

i'm wondering if I should redo some of this though, i'm not sure if my integration is structured properly

long swan
#
SubscriptionData: &stripe.CheckoutSessionSubscriptionDataParams{
                Metadata: map[string]string{
                    "bot_id": strconv.Itoa(int(currentBot.ID)),
                },
            },

also does not work, it does a similar thing where everything goes through but metadata doesn't show up

dim hearth
long swan
#

yeah mode is subscription

#

here's my full block

elfin marsh
#

Hello

#

I have a problem

#

(node:9972) UnhandledPromiseRejectionWarning: Error: Invalid integer: 07/03/21

#
        const { invoice } = await client.stripe.invoices.create({
          collection_method: "send_invoice",
          due_date: '07/03/21',
          customer: invoiceItem.customer,
        });
#

I tried Date.now() + ..

#

but nothing works

long swan
#
   checkoutSession := &stripe.CheckoutSessionParams{
            SuccessURL: stripe.String("DOMAIN/premium?stripe-status=success"),
            CancelURL:  stripe.String("DOMAIN/premium?stripe-status=failed"),
            PaymentMethodTypes: stripe.StringSlice([]string{
                "card",
            }),
            Mode: stripe.String(string(stripe.CheckoutSessionModeSubscription)),
            LineItems: []*stripe.CheckoutSessionLineItemParams{
                &stripe.CheckoutSessionLineItemParams{
                    Price:       stripe.String("price_12345"),
                    Quantity:    stripe.Int64(1),
                    Description: stripe.String("Premium for " + currentBot.Name),
                },
            },
            Customer:            stripe.String(user.StripeCustomerID),
            AllowPromotionCodes: stripe.Bool(true),

            SubscriptionData: &stripe.CheckoutSessionSubscriptionDataParams{
                Metadata: map[string]string{
                    "bot_id": strconv.Itoa(int(currentBot.ID)),
                },
            },
        }
elfin marsh
#

Can someone tell me

#

which date I should put

#

I want it like 5 days after this moment

#

and how to get that

long swan
#

iirc stripe libs have like a datetime wrapper

elfin marsh
long swan
dim hearth
long swan
#

^^^^

elfin marsh
#

Thank you! @dim hearth

long swan
#

I think the datetime built into js has a way to get it as unix time if you need something specific

dim hearth
# long swan ``` checkoutSession := &stripe.CheckoutSessionParams{ SuccessURL:...

Yeah so you need to remove PaymentIntentData entirely, and replace it with SubscriptionData:

checkoutSession := &stripe.CheckoutSessionParams{
    SuccessURL: stripe.String("https://domain/premium?stripe-status=success"),
    CancelURL:  stripe.String("https://domain/premium?stripe-status=failed"),
    PaymentMethodTypes: stripe.StringSlice([]string{
        "card",
    }),
    Mode: stripe.String(string(stripe.CheckoutSessionModeSubscription)),
    LineItems: []*stripe.CheckoutSessionLineItemParams{
        &stripe.CheckoutSessionLineItemParams{
            Price:       stripe.String("price_123456789"),
            Quantity:    stripe.Int64(1),
            Description: stripe.String("Premium for " + currentBot.Name),
        },
    },
    Customer:            stripe.String(user.StripeCustomerID),
    AllowPromotionCodes: stripe.Bool(true),

    SubscriptionData: &stripe.CheckoutSessionSubscriptionDataParams{
        Metadata: map[string]string{
            "bot_id": currentBot.ID,
        },
    },
}
long swan
#

I did, sorry I copied the code from before the change

#

updated the code block

#

with that updated code its doing the same thing as before where the metadata doesn't show up in the UI

#

now it looks like the metadata is blank in the JSON too...

elfin marsh
#
        const customer = await stripe.customers.create({
            email: 'mail@google.com',
        })

        const invoiceItem = await stripe.invoiceItems.create({
          customer: customer.id,
          amount: 2500,
          currency: "usd",
          description: 'description here',
        });

        const { invoice } = await stripe.invoices.create({
          collection_method: "send_invoice",
          days_until_due: 5,
          customer: invoiceItem.customer,
        });

        console.log(invoice);
undefined
#

what's wrong here?

dim hearth
# long swan with that updated code its doing the same thing as before where the metadata doe...

Yeah, so that code will get the metadata into the subscription - but in general we don't copy metadata over between objects so if you want it to be passed from the subscription to each payment intent you need to write some additional code to do that. If you want every payment intent for that subscription to have that metadata, you should listen for the payment_intent.created webhook event, retrieve the invoice and associated subscription, and update the payment intent with the correct metadata at that point.

long swan
#

hmm

dim hearth
elfin marsh
#

invoiceItem and customer are working

#

but undefined is invoice

#

when i try to console log invoice

#

it says undefined

long swan
#

would that data be passed to the webhooks associated with that subscription though (cancel/renew/etc)? thats really all I need it for...

#

I just need to know which bot to renew/cancel when I get an incoming webhook

dim hearth
elfin marsh
#

huh

#

typical me hahaha

#

thank you again

#

byew

#

btw

#

how to get

#

URL of invoice?

#

invoice.url?

long swan
#

wow thats cool, the api docs automatically fill the invoice with test data from your most recent invoice

#

never noticed that before...nice touch

dim hearth
long swan
#

its a pretty simple subscription integration

#

i've done these before, the only catch is the multiple bot thing (where users can subscribe/unsubscribe to premium for multiple different bots using the same customerid/account)

#

btw I noticed one small thing, my description doesn't seem to be working...

#

is it getting overridden by the price id thing? i'm just trying to add something to let users know which bot they are subscribed to on the payment page/reciepts/emails (hopefully) without needing to do a new product for everything

dim hearth
elfin marsh
#

thanks

#

you are very helpful man

#

nice job

dim hearth
long swan
#

perfect, and I can just renew the correct bot based on metadata

#

out of curiosity, am I supposed to do a timestamp (30ish days in the future) and just extend it every renew, or just store a Premium bool and set it to true/false based on cancel/extend? i've seen it done both ways...

dim hearth
long swan
# dim hearth Can you elaborate on that - in this scenario do you just have a monthly subscrip...

thats my thought process, since you're paying at the beginning of the month for that month of service, it seems most logical to just extend a date by the amount of time the user is paying for (maybe plus a few days just to give them some extra time if card gets declined or what have you)...so if the cancelation webhook fails or there is some other reason that their service doesn't cancel properly, they don't get free premium access forever

#

i've also seen it done where a bool is just stored for the premium state - so if I get a "update" webhook from stripe, I would check if the subscription is still active (if it is, bool is true, otherwise false) - and on cancellations/delinquent subscription webhooks it would also get set to false

#

idk if there are any real pros/cons to those approaches seeing as webhook reliability has been fantastic for me, just wondering if stripe had any "reccomended" way to handle this on the backend since thats what i'm about to go write 🙂

dim hearth
# long swan thats my thought process, since you're paying at the beginning of the month for ...

There really are a number of ways you can do this - the approach you currently have (just add x days to the current cancellation date) will work fine, but something to be aware of is that cancellation that does not perfectly line up with the timestamp for the end of the billing cycle could result in a very small proration. Another approach would be to have the subscription set cancel_at_period_end: true and flip it to false whenever a customer has chosen to renew for another month. When the next month comes around, you'd flip it back to true.

long swan
#

based on how my system is designed, having it set to false is a relatively disruptive action (the user would have to go back in and make some changes to re-enable everything) so i'd like to avoid unneccesarily causing extra work...I don't have any existing system, just wondering if anything was recommended by stripe but it sounds like whatever works is fine

#

i'm considering doing the true/false thing just because its a lot less work for me as far as validation for "is this user premium" - checking a bool is a lot easier than (even if I set it up as a function) comparing dates and I will have to build a setup anyways to trigger additional actions when i'm already updating that bool, so that will be helpful for other stuffs

dim hearth
long swan
#

ooh, that should really be in the docs...

#

how would you recommend I do this then?

#

i'd like to tell people what bot they are subscribing to/canceling so its clear in receipts and so on

#

i'd rather not create a significant amount of products just so the name can be unique for everyone, but that is basically the only approach I could figure out

elfin marsh
#

@dim hearth

#

here me again haha

#
invoice.receipt_url

this is null
#

I found it on docs, but I got a object of invoice

#

but field for receipt url is null for some reason

dim hearth
elfin marsh
#

i did console.log(invoice) and it sends me a object

#

but propety receipt_url is null

dim hearth
elfin marsh
#

recipet_url

#

at the right side look yellow marked

dim hearth
elfin marsh
#

okay let me try with hosted_invoice url

#

I need to get link for customer to pay through it

#

@dim hearth

          console.log(invoice.hosted_invoice_url);
Console: null
#

it returning me a null value

dim hearth
elfin marsh
#

invoice is not finalized because we need to get a link first to pay that haha

#

I dont know did you understand me

#

when invoice is generated

#

I need link of that so customers can pay

dim hearth
# elfin marsh invoice is not finalized because we need to get a link first to pay that haha

An invoice needs to finalized first before anyone can pay it. You can see a little flow chart here: https://stripe.com/docs/invoicing/overview
If an invoice hasn't been finalized that means it's still a draft and you (as the merchant) can still make changes to it. Once an invoice is finalized it'll change to a status of open and you can't make any changes to the amount due and the customer is able to pay

elfin marsh
#

but then how to get link of invoice?

#

when it generate an invoice for a customer

#

how customer can pay?

#

I'm making a Discord bot

#

where you type command which product you want to buy

#

then bot generates you an invoice

#

when you pay it, bot will do something

#

I think i found a resolve

#

sec

#

Finally got it mna

#

thank you

#

I finalized it with api request then I got url

#

so that's what you said

#

perfect thanks

gritty spindle
#

Because of attaching 9995 failed, so I couldn't update the new source, right? It remembers the previous one (the successfully one). Is there any way I can clear the source or update them, otherwise the payment still is being processed unexpectedly.

bleak breach
gritty spindle
#

Then the next time, if the source is valid, it can be added successfully, isn't it?

bleak breach
#

When you attach a source to a customer, Stripe will do an authorization check on that source. If it succeeds then the source is attached and becomes the customer's default

gritty spindle
#

Is possible to retrieve sourceId that is attached to specific customer if I have the customerID ?
Nevermind, I found it, saw the default_source here.

sudden forge
#

So is it possible to allowing user to cancel their own subscription. So when I am making a web app I don’t want user to contact me to cancel their subscription but I want them to do it. Is there documentation for JavaScript

#

I am able to process the monthly subscription payments but just wanting user to cancel it by themself other then contacting me

lucid raft
#
  1. or you can use Customer Portal, Stripe'
sudden forge
#

Thanks let me see these docs and see which one will work best for me. Thank you @lucid raft

lucid raft
#

np

cloud pasture
#

How long does payment intent lasts ?

mellow spear
#

@cloud pasture What do you mean?

cloud pasture
#

So i start a paymentIntent

#

but didnt confirm it

#

how long will it wait for confirmation ?

#

@mellow spear

mellow spear
#

I don't know off the top of my head; I'm looking.

#

There isn’t a timeout from Stripe’s side. A Payment Intent can sit in the requires_confirmation forever. However the longer you wait the more likely it is that the bank will decline the charge

cloud pasture
#

I see

#

thanks

#

Hmm i think that since i create a new intent every time purchase is being made i will cancel the local intent/stop expecting confirmation after a day

mellow spear
#

👍

cloud pasture
#

because my intents and confirmation are done almost together

old relic
#

Hello,
Can someone suggest me how can I create "Subscription Schedule" from "Subscription with checkout"?
Actually, I want to create monthly subscription plan for 12 month, after that 12 month, It will automatically complete the subscription.
Its possible by "Subscription Schedule", But there is no documentation how can I create "Subscription Schedule" with Stripe checkout session.

bleak breach
old relic
#

Is there any other option ?

bleak breach
#

Subscription schedules can only be created via the API or dashboard

old relic
#

Not for Subscription schedule,
creating monthly subscription plan for 12 month.

bleak breach
#

If your goal is to create a subscription with a billing cycle of 12 months, that can be done with Checkout

old relic
#

I can't find option to specify the number of iteration in checkout subscription .

bleak breach
#

Are you trying to create a subscription that will automatically cancel after 12 months?

old relic
#

Yes

bleak breach
toxic lily
#

Hey, Dev team! miscellaneous question: I want to start to learn a programming language for using Stripe, any recommendation? I heard that Python and Php are widely used and are so intuitive

bleak breach
toxic lily
#

Those are compatible with Stripe Elements, right?

lucid raft
#

Stripe Elements is JavaScript UI library used in your frontend. Python, PHP and JavaScript all have their own web framework you can use to build a simple web app on which you can use the Element in the UI side

toxic lily
lucid raft
toxic lily
#

If I don't have a web domain yet, do you have any advice on any free-to-use web hoster? Just to have a temporal base to run a test integration

lucid raft
#

You can use ngrok to tunnel your localhost web server so that it could be accessed publicly for testing. https://ngrok.com/

gritty spindle
bleak breach
bleak breach
#

Also I highly recommend you use the PaymentMethod API instead of Sources. Sources is deprecated in favor of PaymentMethods

gritty spindle
#

It has been delayed for one payment. Like after the source is detached, then immediately still unexpected successful, but the next payment is failure as what I want. I am planning to migrate to PaymentMethod as well.

bleak breach
#

How are you creating this charge? Via the API or this is via an Invoice created by a subscription?

gritty spindle
#

Via Invoice using createSource() API

brittle summit
#

Hi everyone,

#

I want to know that how can I create a plan with lifetime interval

granite basin
#

I was debugging this issue ..we observed in dev env where we have different stripe test account is working fine no multiple call for auth ..and in QAT where we have different stripe test account have multiple api call during the auth request ..Interestingly ,QAT also was working fine with dev stripe test id .. Any suggestion on this

bleak breach
bleak breach
bleak breach
granite basin
#

Can I create some different account which can help .. because we have an existing account where everything is fine

#

in that env

bleak breach
#

You can create as many accounts as you like

granite basin
#

Try to understand if that would be helpful .

bleak breach
#

I doubt the account matters, there is something in your code which is making the request twice

mellow scroll
#

hi i want to ask how can i send payment link to customer

bleak breach
mellow scroll
#

where can i get the link haha

bleak breach
mellow scroll
#

so the link will be on time use or

bleak breach
#

Did you read the docs I sent? Payment Links can be used as many times as you want

mellow scroll
#

oh ok lot thanks ^^

brittle summit
toxic lily
#

Hey! Any IDE recommended for Python? :)

quartz crescent
#

I am looking for peer-to-peer transfer kind of feature. Is it possible using stripe?

bleak breach
bleak breach
bleak breach
toxic lily
toxic lily
#

The basic console it's so orthopedic 😆

bleak breach
toxic lily
#

Oof. That actually catches my attention!

brittle summit
bleak breach
#

Using Stripe subscriptions for that sounds like overkill, I'd just record that the user paid in my own database

languid tiger
#

Hi all; for a client I'm implementing Stripe Connect with Standard accounts on a platform which is mostly going to be used by private individuals; however the form the user is redirect to seems to be mostly targeted towards businesses. Is there any way to make it less daunting to fill in for private individuals?

sudden forge
bleak breach
# brittle summit is this solve my problem ? -https://support.stripe.com/questions/how-to-add-one-...

I don't think so, no. You want a subscription to continue indefinitely despite only paying the first invoice right? I still think it's overkill and something you should reconsider as it's quite inefficient, but if you really are adamant about it you could update the subscription after the first invoice is paid to mark future invoices as uncollectible: https://stripe.com/docs/billing/subscriptions/pause

bleak breach
bleak breach
languid tiger
#

@bleak breach thanks!

last jungle
#

Does anyone know the recommended way to add taxes via the payment intents API ? As someone coming from the charges API - yikes. Besides signing up to enter an invite only beta for stripe tax what are my options here exactly?

bleak breach
last jungle
#

for things beyond a simple use case, aren't there like, quite a bit of limitations if I use checkout?

bleak breach
#

Depends on what your use case is. If you want to use your own UI then Checkout isn't what you're after. If you just want to collect one-off payments with taxes though and are happy with Stripe handling the UI, then Checkout is great

last jungle
#

Basically I'm hitting economic nexus in a few regions so I need the ability to charge a few different countries in their local currency for one time purchases, with tax added for certain countries. Do you think checkout is a good fit for that @bleak breach ?

bleak breach
#

I do, Checkout will even optimize for local payment methods based on the country selected

#

e.g. if you are making a sale in the Netherlands and specify ideal when creating the session, Checkout will automatically reorder the payment methods to show the most relevant first

last jungle
#

that seems useful. I'm guessing pulling down reports via the Stripe UI would all fall into place as usual and I can dig up charges from one country or another

bleak breach
#

Yep, it also handles SCA for you out of the box

#

The caveat which some people don't like is that Checkout is hosted on a Stripe domain, so it's a full page redirect away from your site to complete the payment

#

Afterwards Checkout will redirect the user back to a URL of your choice though

last jungle
#

right, in my case I don't think thats an issue at all. Stripe is probably more known than most companies at this point on the web unless you are gigantic.

bleak breach
#

Also since you can create a Checkout Session on the server and redirect there, it means you don't need to add stripe.js to your page

last jungle
#

^ nifty. Cool thanks @bleak breach you've convinced me to give checkout a whirl 👍

bleak breach
#

You can always have a play in test mode to get a feel for it

versed bison
#

hi

#

can you support me information about bank account of japanese country when i want to payouts

cerulean pineBOT
#

:question: Have a question about your account @versed bison?
While we're sorry to disappoint, this Discord is intended for technical questions and developer chat—we're not able to help with account specific questions. For help with your account please reach out to Stripe support directly at https://support.stripe.com/contact

versed bison
#

thank u for anyway

zinc belfry
#

I have a question about the free trial, if my client canceled free trial, and with another email, same bank account, can he join again?

bleak breach
zinc belfry
#

how can I avoid this problem, it looks stripe do not allow us to save the bank account for client

bleak breach
#

You can't really avoid it, if a user is adamant on registering new accounts with you to get free trials they'll find a way. I'd suggest not offering a free trial anymore

long swan
#

phone number verification has worked well for me in the past

zinc belfry
#

is there anyway we could get client bank account saved in our CRM?

long swan
#

just make sure to properly blacklist VOIP numbers

long swan
#

you could probably find a way to read data out of elements and save it yourself but that's a really, really, really, really, really bad idea

bleak breach
meager hawk
steady harness
#

hi, the price of stripe connect is 2 euro per month recurring or per year? for active account.

meager hawk
#

@steady harness as far as I know the active account fee is charged monthly

steady harness
#

ok i supposted this

#

mh thank you

cedar prairie
#

Hello everybody
Do you know how I can create a subscription with end, which can be chosen by the donor with gravity form on wordpress ?

meager hawk
#

@cedar prairie hi! I think you'd need to read Gravity Form's docs for that. If you're calling the API directly you'd write some custom code to collect what the user entered and the pass it to https://stripe.com/docs/api/subscriptions/create#create_subscription-cancel_at when creating the subscription, but if you're using a plugin like that you'd need to work with their docs/support to see what's possible.

hidden ridge
#

Hi guys. We've Integrated stripe payment in our app using this https://stripe.com/docs/payments/accept-a-payment?platform=android. payment is working fine but the Android app is not redirecting back to app after completing a PaymentIntent. at the end of the payment the browser is not being closed. If we try to click "return to merchant" there is no response. Is there something that we are missing?

cedar prairie
#

@meager hawk Great ! thank you so much

alpine depot
#

I can't for the life of me figure it out

#

I don't even know what it looks like, to know if it would fulfil our needs?

meager hawk
#

@hidden ridge hey! Hmm. It should generally close itself, the SDK detects when the authentication is done and should close the webview

#

or do you manually redirect to the main web browser?

vocal wagon
#

Hello everyone ! Hope you are well. We're currently building a data analysis tool where we would assess certain KPIs for our client (let's say for example the MRR). Thus as a consequence, we need to gather some data from your API, but it's quite hard to build the tool without sample data sent by a "fake" API. I tried to check on the documentation but I haven't found this. Did I miss it? Thanks in advance !

meager hawk
#

@vocal wagon hi! We don't really have a way to give you an account that has some pre-existing test data no. The general idea is you would call our API in test mode (https://stripe.com/docs/testing#cards) to create various payments and so on and then you can analyse that in conjunction with what you read in https://stripe.com/docs/api .
Or you could ask your client to give you some access to their existing account so you can play around with their data a little , like maybe they could give you a read-only API key for you to use for development(https://stripe.com/docs/keys#limit-access)

hidden ridge
meager hawk
#

@hidden ridge I think I'd need to see your exact code, and details like the pi_xxx PaymentIntent you see the problem with and the exact version of stripe-android you use. My initial thought would be, if you use PaymentIntents directly like stripe.confirmPayment(..) , you might not have implemented onActivityResult ? but yeah it should be automatic really, I just tested it in a sample app I have and it's working

#

sure! if you have any keys maybe remove them(though it should only be public keys in your Android code), but feel free to upload the Activity and I can have a look if anything jumps out at me!

#

oh. Can you remove return_url from that PHP code and try again?

#

you shouldn't need it (as I said, the SDK manages this for you) and it's probably what causes the problem

vocal wagon
meager hawk
#

@vocal wagon you can create subscription in test mode as well : https://stripe.com/docs/billing/testing But yes, you probably won't have much historical data like 12 months of previous Invoices without waiting

#

so a combination of testing, creating mock data yourself, and maybe asking your client for access as I described, might be a good way to approach this

hidden ridge
meager hawk
#

can you share the frontend code of the Activity you're using(in text please like a file upload or pastebin link, not a screenshot)? and the ID of a PaymentIntent with the problem and the version of stripe-android you use?

hidden ridge
hidden ridge
meager hawk
#

looking! but it's quite hard to read code from a spreadsheet, I was expecting a .txt or .kt file really

hidden ridge
meager hawk
#

I'm a bit confused because I see no activity on the Stripe account involved with that PaymentIntent ever doing anything with our Android SDK, all your logs are just creating PaymentIntents in the backend

#

oh wait you did, just it was a few hours ago

#

anyway the code and so on all seems reasonable, I'm not sure why it wouldn't just work and close the webview.

#

I'd suggest writing to https://support.stripe.com/email with the details you shared with me and ideally a screenshot/screen recording of the flow you see and we can dig into it!

acoustic citrus
#

Hi, I am trying to setup a merchant centre using stripe connect, however, every time a seller creates an account stripe prompts them to fill in their business information and website - however the app is not meant for businesses. Is there a way users can become a seller without uploading their business info (i'm setting up accounts as individual / sole trader) - Meant for UK

meager hawk
#

@acoustic citrus well the UI will always refer to a business and that can't be changed. We're required to collect certain KYC information from merchant accounts including a description of their product they 'sell' and their reason for doing business.

I'd suggest prefilling the information for them based on your platform!

#

you can pre-fill a product description and an MCC for them instead based on your platform's business. For example a platform helping local florists to start accepting payments might set business_profile={'product_description'="Florist", 'mcc'="5992"} for them.
https://stripe.com/docs/connect/express-accounts#create-account
https://stripe.com/docs/api/accounts/create#create_account-business_profile-product_description
https://stripe.com/docs/api/accounts/create#create_account-business_profile-mcc

acoustic citrus
vocal wagon
#

Hi everyone! hope you are all well!
I was wondering if anyone is able to guide me in the right direction.
I've got X amount of users subscribed to a single product but with 4 different prices.
My goal is to lower the price for these current subscribed users.
I know i can simply create 4 new prices with adjusted costs for new subscriptions, but i can't seem to find anything on the portal to "migrate" the current users to the new price.
Can this only be achieved through the API or achieved at all?

meager hawk
#

@acoustic citrus well, anyone who needs to receive money needs to have a Stripe account of some description, and provide the required KYC/identity information for regulatory/anti-money-laundering reasons. You can prefill some of the information to streamline things but the user does have to go through the onboarding in the UI yes(if you're using Express accounts)

#

to be clear if you're not sending money to these people they don't need Stripe accounts or any of this, they're just end-customers

#

oh yeah ,for splitting bills you probably want to send money to the person who pays on behalf of the other people? Not sure of your business set up, but just flagging that as a rule of thumb in case there was confusion.

#

you'd do that for each subscription. You should also make sure to think about how/if you want the change to be prorated(controlled by passing proration_behavior on that update API call and test things out to make sure you understand it or ask here!

acoustic citrus
meager hawk
#

@acoustic citrus maybe use Express accounts instead of Standard.

#

Standard accounts are for merchants selling things

acoustic citrus
vocal wagon
#

@meager hawk i will look into that, thank you very much!

hidden ridge
meager hawk
#

@acoustic citrus well it would still have a similar UI and talk about business details but there's less of it. Also you can ask for only the transfers capability(https://stripe.com/docs/connect/account-capabilities#supported-capabilities) (since you don't need card_payments presumably since these people will never be charging end-customer's cards themselves) which significantly lowers how much information is needed to be collected

acoustic citrus
acoustic citrus
meager hawk
#

hmm

#

also is your platform account/business in the US? Because that will complicate things a lot since it becomes an international money transfer

acoustic citrus
#

No everything is setup within the UK, all customers will also be in the UK. I'll look into this, thanks for all your help!

#

Still asks for business details arghhh 😆

sour warren
#

please help

meager hawk
#

@acoustic citrus it won't ask for a website or industry if you prefill a product_description

sour warren
#

I have been locked out of my STRIPE account and cannot get anyone from Customer service to help. When I press "Forgot password" it says internal error

meager hawk
#

@acoustic citrus e.g passing business_profile={'product_description'="Florist", 'mcc'="5992"} when creating the account as I mentioned earlier, the description fulfills the requirement for a URL so we won't ask for that, and the mcc (https://stripe.com/docs/connect/setting-mcc) is the industry(you would just use one that makes sense for your platform)

#

@sour warren I can't help with this here unfortunately — I'd suggest emailing support@stripe.com directly. I tried https://dashboard.stripe.com/reset just now(the 'forgot password' link) and it didn't throw an error for me, so I'm not sure if something is different in your environment

sour warren
#

thanks

wet kelp
#

Good morning. I am attempting to update our Stripe account, but it keeps telling me that there is a code being sent to my phone number. I'm not getting a code. 😦

sour warren
#

@wet kelp SAME HERE

#

@wet kelp I have been trying to update all week and requested back up email and nothing is coming through. I think our acct has been hacked too.

wet kelp
#

EEP! Awful. I don't think that we've been hacked! I just think that something is wonky. 😛

meager hawk
#

@wet kelp I'm not aware of an ongoing issue, I'd suggest writing to support@stripe.com directly.

sour warren
#

no, I have had 3 customers this week call us panicking as their banks are saying WE charged them thousands of dollars which we haven't. I checked every payment gateway to verify all except one- STRIPE- which i cannot get into

wet kelp
sour warren
#

I have emailed. Pressed every contact button and am getting NOTHING in return. I have tried to login in from multiple desktops too

#

good luck

light nimbus
#

Hi!
I think i have a easy beginners question that i can'tseem to fix myself.
I have a simple checkout system where i have users pay for online courses and i create a stripe customer. I then store the customer id on my server so i can later verify that a user has paid for the course. So i'd like to select all the checkout sessions of a user. Is there a way to that? I tried the code below but it did not work.
// does not work
print_r( $stripe->checkout->sessions->all(
['customer' => 'cus_JlFosJ9DUtyJ6k']
));

sour warren
#

Is anyone else getting this error?

light nimbus
#

My dashboard works fine atm

upbeat grove
#

Do we need to use celery with stripe?

meager hawk
#

@upbeat grove I don't follow, what is 'celery' exactly?

upbeat grove
#

For example: handling background task such as Email

#

I wonder if working with third party apis take a lot of time and should be moved to celery. To increase performance in production

meager hawk
#

I don't think I have any specific advice for you on that.

upbeat grove
#

do we know how long normally it can take to get a response back from Stripe?

#

meaning all end points are sending response with 3s?

meager hawk
#

like, for an API response? We don't publish an SLA no, it highly depends what exact API call it is(retrieving a single Customer object is faster than processing a payment as former is a database lookup, the latter involves talking to an external bank, running fraud checks, etc)

upbeat grove
#

yes API response

meager hawk
#

it's as fast as it can be and one of our main priorities! Can't imagine you'd see many requests more than a couple of seconds.

upbeat grove
#

then I wouldn't need any task queue solutions.

#

thanks

muted fable
#

Hello, tell me how can I create a subscription with a start date retroactively ?
I am creating a subscription with a parameter backdate_start_date, but the start date is today.
Thank you !
My code (python):

    new_plan = handler.create_plan(
        client_id=client_id,
        amount=1001,
        currency='USD',
        interval='month',
        interval_count=12,
        name='TEST TEST TEST'
    )

    response = stripe.Subscription.create(
        **{
            'customer': client_stripe_id,
            'backdate_start_date': 1625130000,
            'items': [{'plan': new_plan.value['id']}],
            'expand': ['latest_invoice.payment_intent']
        }
    )
meager hawk
#

@muted fable hi! can you say more about "the start date is today" and what field/data you look at for that?
but yes if you use backdate_start_date , it calculates proration as if the subscription had started then, and it sets current_period_start on the Subscription to that date, but the start_date /created fields are still the time of the API request.

#

argh, sorry, other way around.

#

start_date is the backdated one, current_period_start is the time of the request.

muted fable
meager hawk
#

It depends on the use case, but yep, sounds like you would look at start_date

#

unfortunately this feature is very limited

#

I do agree that it really should change the current_period_start, but it doesn't, it's more intended just to allow you to have proration get automatically calculated.

muted fable
mellow scroll
#

Hi I want to ask is there any country cannot support

meager hawk
#

@muted fable you would make a call to Subscriptions.retrieve(invoice.subscription) for example and read the subscription data from there

#

@mellow scroll can you clarify? you can create an account in any country listed at https://stripe.com/global. Customers you charge can be mostly anywhere in the world

mellow scroll
#

I am wondering why there’s a macau customer can’t see there’s payment method by stripe when he is gonna check out from our website

#

Coz china?

#

Haha

meager hawk
#

there's not really enough information to go on there so you might want to write to https://support.stripe.com/email with a full description (how you integrate with the API, what the customer sees, their IP address, and so on)

mellow scroll
#

Thx 🙏🏼🙏🏼

vocal wagon
#

hello i need help

meager hawk
#

@vocal wagon hello! what's the problem?

vocal wagon
#

siteweb scam many people i need information

#

for close him account

meager hawk
vapid fossil
#

Hello , I have a question regarding stripe . Does stripe allow multiple currencies on shopify store ?

meager hawk
vapid fossil
#

so stripe allow multiple currency in checkout page ? Actually shopify payment allows multiple checkout currencies .

meager hawk
#

Stripe will charge the customer in whatever currency you tell us to in your API request, we don't have limitations in terms of processing a payment. But you don't call our API, you use Shopify, so what is possible on their checkout page isn't 100% related to what Stripe does or does not allow — you'd have to ask Shopify these questions.

alpine depot
#

Question is regards to Apple Pay: Do you have to use <ApplePayButton /> (RN)

untold sage
#

Hello, your service debited $ 6 from my card, although I did not buy anything from you, how can I get my money back?

sick talon
cerulean pineBOT
#

:question: Have a question about your account @untold sage?
While we're sorry to disappoint, this Discord is intended for technical questions and developer chat—we're not able to help with account specific questions. For help with your account please reach out to Stripe support directly at https://support.stripe.com/contact

untold sage
#

My money was stolen!

sick talon
# untold sage My money was stolen!

This is not the appropriate channel to get support for what you're asking. Please see the link above as we cannot assist with account issues here.

alpine depot
meager hawk
#

@untold sage you likely want to use https://support.stripe.com/charge-lookup — a merchant using Stripe is who would have charged you so you can find information on that charge there. You should contact them for a refund, and if they aren't responsive you have options like contacting your bank to file a dispute.

sick talon
alpine depot
sick talon
alpine depot
opaque jackal
#

Hello regarding my tax information & invoicing I have a question. I only have the necessary tax number in Germany (small business does not need a VAT number). But I can not change this or it is not displayed on the invoice of my customers, which must be but definitely for my accounting!

sick talon
cerulean pineBOT
#

:question: Have a question about your account @opaque jackal?
While we're sorry to disappoint, this Discord is intended for technical questions and developer chat—we're not able to help with account specific questions. For help with your account please reach out to Stripe support directly at https://support.stripe.com/contact

alpine depot
sick talon
alpine depot
echo trout
#

hi! just want to ask if stripe integration with live api key will work if deployed on localhost ?

sick talon
dusty osprey
#

Question: I believe 2 years ago we were trying to use Stripe Elements components in nw.js environment (Electron alternative), but we couldn't. The issue was in production, because Stripe was asking for an HTTPS environment. Because of that we had to use iframes which kinda made our implementation messy. Last week I tried integrating it again, and this time is working even in production ( live cards are getting charged ). I'm wondering what changed. And is it still safe?

echo trout
#

Thank you @sick talon

dusty osprey
#

I believe Stripe Elements create their own iframe as well, right?

sick talon
#

I can't speak to if it's "safe" as I've never worked with nw.js or Electron directly.

dusty osprey
#

The thing is I also tried charging a card through local environment (localhost) which use http, and it still went through ( Even though I was getting warnings that I have to use https when I was on dev )

#

Is that supposed to happen

sick talon
dusty osprey
#

@sick talon Give me a sec

#

@sick talon pi_1J8lt7HFzwE4pTgefP0SSsyA

sick talon
dusty osprey
#

Just to confirm

#

stripe doesn't process the payment

#

if there's no https request?

sick talon
dusty osprey
#

What is stripe looking to determine if the environment is http or https?
window.location.href?

sick talon
#

I assumed you mean a webhook endpoint or otherwise directing Stripe to connect to a localhost server from our side.

dusty osprey
#

It's not live mode. It's a location that we use to test our implementation with production cards

twin cairn
#

Hi Guys, I need help to set meta data within invoice object in Stripe::InvoiceItem

sick talon
twin cairn
#

to recieve during invoice.payment.succeded

dusty osprey
#

@sick talon Gotcha! So as for the implementation with nw.js, I'd have to dig deeper on their docs I guess

#

Thanks for your help

#

Much appreciated

#

@sick talon Is there any stripe doc that covers stripe integration with desktop environments like Electron or nw.js?

twin cairn
#

@sick talon Do I get this metadata during invoive.payment.successed webhook ?

#

cause when I check invoice object over Stripe dashboard I can't see any metadata set

fair smelt
#

@twin cairn are you using paymentintent?

sick talon
sick talon
dusty osprey
#

@sick talon I understand! Thanks for your help. Have a great day

twin cairn
#

@fair smelt actually we are using legacy buttons unfortunately, our app is very old

#

legacy buttons using Stripe js

fair smelt
twin cairn
#

our webhook endpoints listen invoice.payment.succeded

fair smelt
#

Is it allowed to send code here?

#

Because I have an issue with verifying webhook signatures in Node.js

twin cairn
#

okay wait

sick talon
fair smelt
#

My event is undefined, but bodyparser is deprecated

#

I tried using express.raw instead, but it didnt work

cobalt pendant
#

hello there, regarding stripe connect custom, we are collecting stripe required documents / infos during our platform signup flow. Web client creates tokens using SDK for account / persons / bank account, and pass those to the backend. The backend then creates account / persons / bank account using those tokens, and then the client uploads documents for validation.

The backend listens to account.updated hook in order to notify user by mail once verification is over and let him know if his account is ready to go or if the verification failed.

In case the verification failed, we provide the user a custom link for him to fill those missing infos according to the eventually_due array in the stripe account object. Here again, account and person tokens are created and passed to the backend for it to update infos using the API.

I am stuck at the bank account update, im not sure whats the proper way to act if verification failed

bold basalt
#

@cobalt pendant hello

cobalt pendant
#

hey there hmunoz 🙂

bold basalt
#

@cobalt pendant "I am stuck at the bank account update, im not sure whats the proper way to act if verification failed" -> this is the case where Payouts to the Connect account's external bank account failed and you need to collect a new bank account right?

cobalt pendant
#

hmm can the connected account be not valid due to the bank account provided infos ?

#

what i want is make sure the stripe connected account is ready to go with both cards_payments and transferts capabilities before the concerned user can start using our platform fully

bold basalt
#

@cobalt pendant yes I get that part, I just wasn't clear on this part "hmm can the connected account be not valid due to the bank account provided infos ?"
Like are you asking about after you've updated a bank account on the Connect account?

cobalt pendant
#

well during our sign up flow, we create account / persons / bank account. We pretty much collect everything ahead so once stripe validates everything the user can use our platform fully. If verification fails, could the reason come from the bank account ? cause if thats the case i need to do something about it on my backend. And thats what im trying to figure out. Sorry if im still not clear

bold basalt
#

@cobalt pendant ah gotcha, that helps

#

@cobalt pendant so my understanding is that bank accounts aren't verified like other identity details are but they are "verified" when eventually payouts are sent to that bank account. So if payouts fail, that is when the Connect account external account will need to be updated and you'll have to collect a new bank account for them.

cobalt pendant
#

ooh okok, so the eventually_due array from the account object wont show anything about the bank account if it has been provided ?

bold basalt
#

@cobalt pendant yes I believe so, it would show in currently_due at some point if Stripe is unable to deliver payouts to that account and hence needs a new bank account.

cobalt pendant
#

okok ty for enlightening that part. Now, whats the proper way to update a bank account if a payout fails to be delivered, using the API

bold basalt
#

@cobalt pendant just like you're bringing the account owner to your page to upload/enter new details, you'll collect their bank account details and create a bank account Token and then update the Connect account's "external account".

cobalt pendant
bold basalt
#

@cobalt pendant not that ... one sec

cobalt pendant
#

tyty, so that would update the default account automatically right ?

bold basalt
#

@cobalt pendant yep

cobalt pendant
#

tyty

#

oh wait, thats from the account itself, can i do that ? i thought i should use the bank account api. Can i do so by passing a token instead of plain infos ?

bold basalt
cobalt pendant
#

amazing

#

is that the same thing for account Creation, can i just pass that token to the account object during creation ?

bold basalt
#

@cobalt pendant yes works on account creation too

cobalt pendant
#

person too ?

#

cause atm during creation, i execute 3 stripe calls, 1 for account, 1 for bank account, one for person lol

bold basalt
#

@cobalt pendant Person might have to be its own call but Account creation can include external account creation as part of it

cobalt pendant
#

sounds good, gonna lighten my code a lot rn due to this chat haha tyvm

worn wren
#

I need help

bold basalt
#

@cobalt pendant not a problem, glad to help!

#

@worn wren hello, what is the issue you're running into? are you building an integration with Stripe?

worn wren
#

yes, i can't insert my the card information

bold basalt
#

@worn wren are you the developer building this integration?

bold basalt
#

@worn wren open your browser console and check what errors/warnings you see from Stripe.js

frosty coyote
#

If there's a bunch of subscriptions that are close together, will stripe group them into one invoice? Our QA has what looks like 6 subscriptions that span 3 days. However, they're all on the invoice for tomorrow, rather than being taken when they were created.

bold basalt
#

@frosty coyote hello, each Subscription has its own Invoices, they won't be bunched together. Maybe you're seeing something different or we're using different terminology for what constitutes an Invoice.

frosty coyote
#

It might be easier if I show you? Are customerId's unique? If I send one would you be able to see the scheduled invoices? It's a test account in test mode but its quite odd.

bold basalt
#

@frosty coyote you can share any Invoice or Sub ID's here (like inv_123 etc) and I can look them up and better understand. Can you send me Invoice IDs where you see them "grouped up" ?
and yes Customer IDs are unique.

frosty coyote
#

in_1J7jLzKjnjltSiTlTV5j5e0j this but it only seems to show one on that id, but the customer record shows

bold basalt
#

@worn wren try stepping through your code and adding logs to make sure you are setting up a CardElement and mounting it correctly. Also use the browser element inspector to make sure the div you're mounting on is there and has a width etc. There could be a few things, I can't say but I can help you debug it on your end to narrow down what it could be

#

@frosty coyote looking

frosty coyote
#

it's entirely probably that QA have done something weird, but it's hard to spot through the web UI.

bold basalt
#

@frosty coyote so what you see there is multiple different Invoices for the same Subscription. Not clear why they haven't finalized and gone from "draft" status to "open" or having payment attempted on them yet (still looking)

frosty coyote
bold basalt
#

@frosty coyote ah I think I know

raven shore
#

Hi everyone. in our app we're using stripe checkout by creating a payment intent on backend, and sending the user to the stripe checkout page. We have webhooks setup for all the events, i.e., payment success failed, processing and canceled event. However, only the success webhook is getting triggered in our case. Can somebody help on that

bold basalt
#

@frosty coyote the yellow section here: https://stripe.com/docs/billing/subscriptions/webhooks#understand
Basically yes this was changed to a daily Subscription. For every daily Invoice, Stripe sends you the invoice.created created webhook event. You have to respond to it correctly (and any Platforms that are connected to your account and listening for this event) for Stripe to finalize the Invoice automatically. In this case, ~3 Platform owned endpoints didn't respond to this webhook event so the Invoice is still in "draft" for ~72 hrs: https://dashboard.stripe.com/test/events/evt_1J85scKjnjltSiTlbejbC1Cy

frosty coyote
twin cairn
#

Hi Guys, I need another help with tax rates, I'm using Stripe::Checkout::Session for one time and subscription, My question is where do I pass tax_rate with the method?

bold basalt
#

@twin cairn hello, you pass TaxRates as an array of strings under each line_item entry: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items-tax_rates
There's a doc on this too (change the tab to "tax rates") https://stripe.com/docs/payments/checkout/taxes

viscid burrow
#

Are dynamic_tax_rates only available to customers on Stripe Billing?

mint shoal
#

Hi everyone!
I have created a checkout session and need to split the revenue with some Connect accounts
For this I have created some transfers to these Connect accounts after the checkout session
There is a problem ... if I don't have enough balance I can't make the transfers I want because the checkout session entries are not instantly available for transfers
Can I send money directly from the checkout session? I have seen that I can do this with a single connection account but I don't find how to do it with multiple accounts

viscid burrow
#

But tax_rates are available to all Stripe customers, even if they do not have Stripe Billing. Is that correct?

bold basalt
#

@mint shoal hello, "Can I send money directly from the checkout session? " -> yes with Destination Charges but no it doesn't work for multiple accounts, the flow you're using "Separate Charges and Transfers" is what you'd use for that.

viscid burrow
#

Stripe offers two ways to calculate tax on your Checkout Sessions: Stripe Tax and Tax Rates. So the "dynamic-tax-rates" is the hash we use for Stripe Tax? Is that correct? And if you are using Tax Rates you just pass in the line_item.tax_rate

twin cairn
#

Thansks a lot @bold basalt

bold basalt
#

@viscid burrow Stripe Tax is different from Dynamic Tax Rates and Fixed Tax Rates
i.e. Stripe Tax != Tax Rates

twin cairn
#

Can you also help me with --- If the Stripe Connect customer is using Stripe Tax and wants the tax rate to be dynamically populated based on the checkout.stripe.com Billing or Shipping address, how do we set that in the Session?

mint shoal
viscid burrow
#

Stripe Tax != Stripe Billing

#

Oh, I thought when you upgraded to Stripe Billing you get Stripe Tax, but it sounds like Stripe Tax is another separate product offered by Stripe and is not included in Stripe Billing.

#

Is there a pricing page for Stripe Tax? How much is the additional charge for that new product?

bold basalt
#

@viscid burrow TaxRates are where you define them up front yes, then pass them into the CheckoutSession line_item.
Stripe Tax is where you set a tax code and tax behavior on the Price/Product and then set automatic_tax[enabled]: true on the CheckoutSession. It does (and was always intended to) support Billing in a beta or something, let me check

viscid burrow
#

I am confused between automatic_tax[enabled]: true and line_item.dynamic_tax_rates? Seems like we need to pass in both on the Session?

bold basalt
#

How much is the additional charge for that new product?
that page mentions Stripe Tax is paid but Tax Rates are free (I don't know much beyond that about pricing)

#

@mint shoal yes

viscid burrow
#

OK, if an existing non-technical Stripe account owner has lots of Products and Prices and wants to add Stripe Tax, can s/he go into the Stripe Dashboard and update what is needed, or do the things that need to be updated to add Stripe Tax need to be updated via the Stripe API?

#

Here is where I am confused. What is the difference between "dynamic_tax_rates" where Stripe dynamically adds the correct tax rate based on the region and Stripe Tax? Is it that Stripe Tax has a big db of all the regions on the planet so the customer does not need to come up with a TaxRate collection on there own and create it?

bold basalt
#

@viscid burrow "go into the Stripe Dashboard and update what is needed" -> yes, doable from Dashboard or API
" Is it that Stripe Tax has a big db of all the regions on the planet so the customer does not need to come up with a TaxRate collection" -> yes.

viscid burrow
#

Where in the Stripe dashboard can I go in and update a Price and Product with the tax_code and whatever else is needed to use Stripe Tax? Or, does that require the Stripe API to update those prices and products?

bold basalt
#

@viscid burrow both API and Dashboard work as I mentioned earlier. In the Dashboard, go to "Products" in the left nav and there you can edit the Product and the Prices for it.

viscid burrow
#

In the dashboard, I just see editing a Price and nothing with tax_code, just Pricing model, ID, and description?

#

It doesn't appear that I can update in the dashboard.

#

*We just have to determine if we need to build a UI to allow our Stripe Connect customers to do this or if they can do it themselves in the dashboard.

bold basalt
#

@viscid burrow like I'm not a Dashboard expert but since I have Stripe Tax enabled on my account, I can add tax code and tax behavior to Product / Prices from the Dashboard, so I mean that functionality does exist, you're most likely not enabled for Stripe Tax due to invite only

viscid burrow
#

**OK, maybe i have to upgrade our account to test it.

bold basalt
#

@viscid burrow not upgrade technically, just request access to the feature. Are your Connect accounts going to all be Standard Connect accounts? Or Express/Custom?

viscid burrow
#

Standard Connect accounts

bold basalt
#

@viscid burrow gotcha yeah so right now it is a tricky place cause Stripe Tax is invite only so each Connect acct would have to request access to it in order to update from the Dashboard or even have your Platform integration update it on behalf of them. That should change soon, where Stripe Tax is generally available to accounts, though I don't have a timeline on that personally

viscid burrow
#

We need to Stripe Connect an account and have that "child" account upgraded. Is there any way you can take an inactive account we have an upgrade it to Billing and Stripe Tax so we can connect that account to the "parent" account associated with our account?

#

It is hard to try to develop for this feature without having a test account with the feature. 🙂

#

But we can do our best.

bold basalt
#

@viscid burrow Billing is activated by default on any Standard Connect accounts. Stripe Tax is in that interim place where it requires invite only for each Standard Connect acct. From what I know (and could be wrong) it should be generally available in some months from now so that "invite only" won't be an issue either and you'd be unblocked to build an integration on any Standard acct.

#

@viscid burrow you can register a second Standard acct, connect it to your Platform account and request Stripe Tax access for it so you can try out your integration (that way both your Platform and Standard Connect acct have Tax enabled)

burnt needle
#

What's the easiest way to get the line items for a charge completed through a checkout session when looping through charges on a customer?

#

Right now I'm using the checkout completion webhook to query the line items and saving the pi_ and the items to a db, then on the charge list I'm querying my db to find the items for that intent

#

But there has to be a better way

mighty hill
burnt needle
#

So that would be 1 request to list sessions, then 1 to actually grab the line items?

mighty hill
#

@burnt needle I thought you could expand line_items when listing, but let me confirm...

burnt needle
#

doesn't show anything as expandable on that docs page at least

#

Would be nice if there was a way to expand it directly on the charge

mighty hill
#

@burnt needle Yeah, you can expand when listing. I just tried this and it worked as expected:

$sessions = $stripe->checkout->sessions->all([
    'limit' => 10,
    'expand' => [
        'data.line_items'
    ],
]);
burnt needle
#

Hmmm nice

mighty hill
#

@burnt needle Anything you can expand when retrieving a single object should also be expandable when listing.

burnt needle
#

That is very helpful to know

#

What would be the easiest way to add a payment method from a checkout session to the customer for future potential purchases?

mighty hill
burnt needle
#

Perfect, thanks for everything

mighty hill
#

Happy to help!

burnt needle
#

One more question, how long are checkout sessions valid for?

mighty hill
#

@burnt needle I believe they last about 24 hours right now, but let me find confirmation of that...

burnt needle
#

Is there any way to extend that?

#

Would be nice to give people 48-72 hours or so

#

My thoughts are to send an email if they don't complete within a certain amount of time with a link to continue later

#

With only 24 hours I'm worried they might not even check their email in time

mighty hill
burnt needle
#

Yeah nah, I need sessions for making sure I can tie the charge to data collected earlier

mighty hill
#

@burnt needle For the email scenario you should send them to a page on your site that generates a Checkout Session and immediately redirects them to it.

#

@burnt needle Checkout Session URLs should not be shared directly in an email.

burnt needle
#

That's what I do when they submit the initial info, but I'm not sure how I could save that info and generate a new session to tie to it by visiting a new link

#

I'd rather not cookie and such

mighty hill
#

@burnt needle You could do something like this in the email:

https://example.com/checkout?customer=cus_123

Then on your server create a Checkout Session for that Customer.

burnt needle
#

Yeah I suppose I could do that, is there a webhook for when a session expires?

mighty hill
#

@burnt needle No, I don't believe so. But really your integration should not be built in a way that makes Checkout Session expiration an issue. You should generate and redirect to Checkout Sessions as needed and avoid situations where they would need to be long-lived.

burnt needle
#

Yeah just thinking of quick and easy ways of doing things, webhook would be a great trigger to send an email rather than my own whole system of keeping track of who hasn't paid in x amount of time

vague lava
#

I have a problem with Webhooks, I would like to know how to recover if a purchase made is a monthly or annual subscription, or a single monthly or annual payment? Thanks in advance 😉

mighty hill
#

@vague lava Hello! Can you provide more details? What do you mean by "recover" exactly? Recover from what?

vague lava
#

With the charge.succedded, I managed to recover this:

#

And I would like to put in my database the end date of the subscription

mighty hill
#

@vague lava Sorry, what is load.succeeded?

vague lava
#

charge.succedded sorry

cyan knoll
#

Hello! Is there a limit to the amount of consecutive charges I can make through stripe ACH?

mighty hill
#

@vague lava You probably want to listen to another event. charge.succeeded shows Charge details and does not include Subscription details. Maybe invoice.paid would be better for your use case, and then you can look at the subscription property on the Invoice from there?

#

@cyan knoll Hello! The only thing I know about ACH limits is this support article: https://support.stripe.com/questions/exceeded-ach-payment-limit-error-when-creating-an-ach-charge

#

@cyan knoll I recommend reaching out to support using the link there for more information.

vague lava
#

With invoice.paid, can I recover the email, the amount, the currency, and the name ?

#

also ..

mighty hill
cyan knoll
#

@mighty hill Thank you. I was more referring to frequency of charges. Like if I were to fire off 100 charges in a minute.

mighty hill
#

@cyan knoll Yeah, I don't know about that. Support should be able to answer that though!

cyan knoll
#

@mighty hill Cool, thanks.

#

Seems to be 100 per second

vague lava
mighty hill
#

@cyan knoll That's for API calls in general, not ACH specifically.

cyan knoll
#

Ah okay.

mighty hill
pliant heart
#

Hey team, wondering if you can give me some info about ACH and invoice auto-advancing. I have a local subscription with an unverified ACH payment method. I've generated an invoice, which remains in draft for 1 hour. After the hour passes, it seems to me like Stripe does not attempt to charge it.

Following this, from the screen shot below it looks like, after the draft invoice is finalized, it will keep it in Scheduled for 3 days, after which time it will try to charge?

mighty hill
#

@pliant heart Hello! That indicates a webhook endpoint didn't respond with success to the invoice.created event. We won't move an Invoice forward until all the webhook endpoints we send that event to respond with success until 3 days have passed.

#

@pliant heart If you can provide the invoice.created event ID I can provide more details.

pliant heart
#

@mighty hill ok that makes sense to me (the invoice.created ID is evt_1J8q7TDAWTp2PXOw6mQEWht0 and I can see that it did fail to send one of the webhooks)

So then my question is, if all the webhook endpoints did respond, would it attempt to charge the invoice when finalized, and fail with an "unverified" error?

mighty hill
#

@pliant heart I believe it would, but I'm not 100% sure. I recommend resolving the webhook delivery issues and testing to verify the exact expected outcome.

pliant heart
#

Thanks @mighty hill , I'll try again with working webhooks

vague lava
#

@mighty hill .. I don't see the event in Webhook attempts after a payement with invoice.paid

mighty hill
#

@vague lava To clarify, is that Charge for a Subscription payment?

vague lava
#

Yes ...

mighty hill
#

@vague lava Can you give me the Charge ID so I can take a look?

near onyx
#

Hello! A few days ago I've asked here how to test connecting standard accounts. I was told there was no test environment for that, so that I would need to use "real" accounts, and that I should create another account, that would work on test mode even if signup details were not fulfilled. I'm now trying to figure out how my app should check if user has connected the account successfuly. Docs says I need to listen to account.updated webhook or call the accounts API and check for details_submitted, but that won't happen, as I was directed to testing it with accounts in which details were not submitted. Is there a way to know if an account has been connected in the test environment?

mighty hill
#

@vague lava Inside the charge.succeeded event you should see an ID that starts with ch_

sick talon
#

Functionally speaking, the end result is the same.

vague lava
#

With charge.succeded it worked fine, but with invoice.paid I don't see the event in Webhook attempts

mighty hill
#

@vague lava Right, the next step is for me to look at the Charge ID to confirm it's associated with an Invoice/Subscription in Stripe.

#

@vague lava It sounds like the Charge may be standalone and not associated with a Subscription in Stripe, but to confirm that I need the Charge ID.

vague lava
#

ch_3J8sUaKDrHeNIeI91nGusmVN I think

mighty hill
#

@vague lava That looks like it! Let me take a look, hang on...

vague lava
#

Ok

near onyx
mighty hill
#

@vague lava It looks like that Charge came from a client-only Checkout session and is not associated with a Subscription, so there aren't going to be any Subscription or Invoice events related to it.

vague lava
#

What ??

sick talon
mighty hill
near onyx
patent turtle
#

Congrats to the Stripe team for collaborating with Expo to create @stripe/stripe-react-native. I'll be using it asap. 🎉

vague lava
#

@mighty hill, I have 4 prices, if a price it's not a subscription, then it means, that there will be no invoice.payload right?

mighty hill
#

@vague lava Yeah, if you're using a non-recurring Price with Checkout there is no Subscription or Invoice.

sick talon
vague lava
#

In my code, can I have a another case 'charge.succeded' for one payement non-recurring ?

sick talon
near onyx
#

It appears I cannot "Custom accounts are currently in private beta in your country (BR); contact sales+BR@stripe.com if you'd like to be notified when this is available.

#

@sick talon *

sick talon
near onyx
#

That's with express parameter

mighty hill
#

@vague lava Let's back up... what are you trying to do exactly? What's the goal?

sick talon
# near onyx That's with express parameter

Ah OK, yeah that's a caveat for Brazil currently. There really isn't a great way to test what you're looking for because you can't create accounts that will be active in only test mode.

vague lava
#

Finally, that

sick talon
#

or rather, skipping the form

mighty hill
#

@vague lava Have you tried listening for checkout.session.completed ? I think that has a lot of the info you're looking for.

near onyx
near onyx
#

You should have magic username/password just for standard account connection testing tho

vague lava
mighty hill
#

@vague lava Okay, let's address one question at a time. First, are you familiar with the checkout.session.completed event and what it contains? It would contain the Checkout Session object with all of the properties listed here: https://stripe.com/docs/api/checkout/sessions/object

#

@vague lava It looks like most of what you want is there, but I'm not sure what "end date" means regarding this particular scenario as you're asking about a one-time payment. Can you explain what "end date" is?

vague lava
#

4 prices

#

Renouvellement automatique = subscription

mighty hill
#

@vague lava I can't read that. Did you build that?

vague lava
#

1 month 1 year

#

Automatic renewal

mighty hill
#

@vague lava Okay, but did you build that, or is that something you're using that someone else built?

mighty hill
#

@vague lava Okay, so why are you using a non-recurring Price if you want a Subscription?

vague lava
#

I have 4 prices that work normally:
3€ per month => Subscription
3€ 1 month => non-recurring
25€ per year => Subscription
25€ 1 year => non-recurring
And to get the end date I'm struggling ...

mighty hill
#

@vague lava Okay, so what do you mean by "end date" for the non-recurring Prices? A non-recurring Price represents a one-time payment with no timeframe associated with it.

vague lava
#

If the payment is one-time I would like to know if the amount is 25€ (which corresponds to one year) or 3€ (which corresponds to one month).

#

From there I could put an end date

mighty hill
#

@vague lava Okay, so that would be something you do on your end, in your own code. Stripe has no concept of 3€ indicating a single month.

vague lava
#

If the payment is recurring, I would like to get an end date too

mighty hill
#

@vague lava For recurring payments you'll get the invoice.paid event we talked about earlier.

vague lava
#

In the Webhooks, How to differentiate which event we are in, i.e. if the payment is unique I don't want it to be confused with a recurring payment and vice versa

#

And what is the event for a single payment?

mighty hill
#

@vague lava Honestly I would listen for checkout.session.completed and then look at the properties there to determine what happened.

#

@vague lava For example, you can look at the Checkout Session's mode to see if it was subscription or payment

#

@vague lava Then look at amount_total and customer_details and whatnot.

mighty hill
#

@vague lava Or look at and fetch the subscription for details about the end date.

vocal wagon
#

Hello; so im making a stripe discord bot, everything works well but, why do I have to do 2500 for the amount to be 25, in the embed it comes out at 2,500 instead of 25 but the invoice does 25.. anyway to make it 25.00 and have it function well?

vague lava
#

I'll try to work on that 🙂
Thanks in any case for helping me!
It's really nice @mighty hill 😉

mighty hill
#

@vague lava Happy to help!

near onyx
#

@sick talon I'm setting details_submitted on my side manually, faking it as if a webhook hit my server. This will work for seeing the "Account connected" button in my UI, but seems like I'll just have to trust my code works without testing it, until it reaches production env.... This should really be descbried in your docs, and I guess a way to test the integration is really necessary (at all for Brazil, or in a better way than changing code for testing purposes, where it's not in beta, that's not really a good testing practice)

#

@sick talon thanks again for the quick help tho!

crimson needle
#

@vocal wagon All our amounts params in the API expect the smallest currency unit. So for USD it's the cent, so to charge $25.00 you pass 2500 cents or amount: 2500

vocal wagon
#

ah okay thank you 🙂

mortal tinsel
#

Hi everybody,

I'm trying to get set up to be able to make payments out to our vendors. Am I correct in assuming I need to get set up with some kind of connected account first?

#

In order to make payouts, can we add fund to stripe connected account by bank transfer in stripe account? How long does that take?

crimson needle
mortal tinsel
#

I am looking here - any starter tips would be appreciated

crimson needle
#

and yes that doc is great and what you want to start with

manic harbor
#

Please some one can help me please ??

#

Someone can help me please I do not understand anything, stripe made me a check 4 days ago asking me to provide invoice, social network page etc I provided everything they answered me that everything was validated that he was going to unblock my transfers and subsequently I could not make a manual transfer the cat asked me to switch to automatic transfer what I did my transfers have therefore been postponed again by 3 days and now I receive this email telling me that I am taking too much risk while my account does not involve any risk I am limited perfect seller someone can help me unlock my funds please I cannot afford to wait so long time ?! I can pay the person who will help me please

crimson needle
#

@manic harbor I already explained in the other channel that we can not help you here, please talk to support

manic harbor
#

There no one have the same probleme in the past ? Can tell me how i can unlock it ?