#haluk1195_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1220039825164472481
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello! To clarify, are you trying to do this via the API or the Dashboard? Are you a developer?
this was the email i had received
I am a developer, but i want to be able to do this in the UI as well
We can't help much with the Dashboard here, but Stripe support can: https://support.stripe.com/contact/email
ok can you help with the developer story then?
We're focused on building integrations, the API, webhooks, things like that here.
Yeah, what's your question?
How do i generate a refund that will create that email for a customer via API
You would need to make sure the setting on your account to send refund emails is enabled and use the create Refund API: https://docs.stripe.com/api/refunds/create
Note that a lot of emails aren't sent in test mode.
so that 750 was sent in test mode
and that refund api only allows refunds on charges, not on payouts
Not sure what you mean by refunding a payout. What's the ID of the payout you're trying to refund?
i meant refunding a user's "Invoice credit balance"
the customer id for which i was able to create the Refund for credit balance was:
cus_PaWOFqov8LuOdR
(in test mode)
Do you have the ID of the Refund you created?
i think it was more of a fund_cash_balance + balance_transactions flow
(Even though in the email it does say "Complete refund")
Ah, okay, so it would be this API: https://docs.stripe.com/api/customer_balance_transactions
Although I'm not sure if the refund functionality is available in the API...
I'm still not seeing the refund you're talking about. How much did you refund?
its in the event data
i think this is what i'm looking for:
https://docs.stripe.com/api/cash_balance_transactions/fund_cash_balance
but why TestHelpers...? how would i make this request out in prod
That's a test helper because that's something the Customer/bank would initiate on their end. The test helper allows you to test that happening in test mode. In live mode you would need to go through the bank to make that happen.
wait why
Why what?
why would the Customer or bank transfer my money to a customer's account to then send them an email for a "Payout (Refund as stripe likes to call it)"
Let's back up. What are you doing in the Dashboard to make this happen exactly?
i can't remember :/
was a month ago
but basically what i'm trying to do is payout user's for their service (something like uber)
You need to use Connect for that: https://docs.stripe.com/connect
ugh thats not what i did last time and it was simpler than that
The APIs/features you're using aren't appropriate to pay out money to service providers. You need to use Connect for a use case like that.
i think i was using something like:
https://docs.stripe.com/payments/customer-balance/refunding
so anything wrong with just doing:
stripe.Refund.create(
amount=250099,
currency="usd",
customer='cus_NPX8jZD9Rhzhoj',
instructions_email="foo@gmail.com",
origin="customer_balance",
)
To clarify, this "refund" is actually a payout for services rendered?
You need to use Connect.
While this will probably technically work, it's likely against our terms of service and may even be illegal. I strongly recommend you don't do this.
Not sure I understand your question... it funds the cash balance. Can you ask a more specific question?
ok why is it only available in testmode and not in production?
Because funding the cash balance in live mode like this would involve an incoming bank transfer.
yes but if i already have money on my stripe account can't the account get funded through my stripe account
No, not to their cash balance.
Read the second paragraph here: https://docs.stripe.com/payments/customer-balance#cash
ok then, when would it be appropriate to use "Fund cash balance" in prod?
ah okay first paragraph
ty
Again, you need to use Connect, not this.