#rocky_webhooks
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/1268723675587411968
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- rocky_api, 17 hours ago, 15 messages
- rocky_api, 1 day ago, 18 messages
- rocky_api, 2 days ago, 31 messages
- rocky_code, 3 days ago, 49 messages
hello jack ๐
Hi there, so you want to send an email to your customer once the payment is successful?
Just so you know, there's a setting to let Stripe send out the successful payment email automatically in live mode
yep exactly, I have the webhook handler already set up to get the payment_intent.succeeded event and I'm wondering how I should go about getting the data for the email (I've sent emails using libraries before so I'm sure I can figure that out)
oh that's really helpful, will that work with stripe connect?
like is that for all stripe payments or?
nice that's really helpful, well I still have to process the items in the cart and fulfill them, so is there any way to attach the cart to the payment_intent so the webhook can send the items when the payment goes through from the user?
and is the payment actually going through the payment_intent.succeeded?
Sure, you can attach your custom data through metadata https://docs.stripe.com/api/payment_intents/object?lang=ruby#payment_intent_object-metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
like is that the event that fires when the payment actually processes and stripe has recieved payment from the bank or is it just when the request is being sent to the bank?
nice, that's very very helpful, I will look into it, thank you Jack!
And yes payment_intent.succeeded is the event that you should listen to for getting notified about successful payments
ok, so it fires when stripe has actually sent a request to the processor/bank, and the processing service/bank has received that request and cleared the funds from that customer? (sorry I have a very rudimentary understanding of how payment processing is done, I'm sorry if my terminology is confusing or wrong)
and is the metadata like an object like:
[
0: { id: 1, productName: "Something" },
1: { id: 2, productName: "Something else" }
]
```?
I'm sure I can just try it out, it can be updated like any other property on the payment intent?
You don't need to worry about the complexity of payments, when your webhook receives a payment_intent.succeeded, you should be confident that the payment is completed successfully
And yes you can update the metadata. More details in https://docs.stripe.com/api/metadata
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
bet, that's perfect thank you so much!
also, another quick question, should I open another thread or just ask here?
Sure we can continue here.
bet, basically how do I pay out people using connect? I understand creating a stripe account I understand it has all the valid information (which I will get around to setting up at some point), but for the time being I just have a stripe account id associated with each user that is created and making products, how do I tell the payment intent how much is for who and where it's going? I see in the docs there's this snippet of code when creating a payment intent:
customer: customer.id, //(??? what is this)
//...
application_fee_amount: 123, //(is this the amount being paid to the destination?
transfer_data: {
destination: '{{CONNECTED_ACCOUNT_ID}}', //I assume the id of the account
//being paid?
},
and if that is how connect works, is there any way to pay out multiple sellers with different application fees? or is the application fee a set amount then sellers get percents or is there a way to do that?
https://docs.stripe.com/connect/accounts is you connected account of type standard or express?
is there a way to check? I think standard but I'm kinda unsure?
no it's standard, my code doesn't specify express so if that's the only difference I'm using standard atm
if it was something to do with when I actually set up my account I'm unsure
Do you have your connected account ID?
I do, but it's not set up to recieve transfers, I still have to setup the onboarding process for those getting pay outs, I figured out I can use the transfers API to actually get the funds to people, but I still have to set up the ability for people to add their payout locations
so I think I have a pretty decent idea on where to go, would you recommend using the stripe hosted onboarding page or is there any benefit at all to creating my own onboarding page?
acct_1Ph55NPO8rCCw9UO is the connected account id
OK, since platform is responsible for fees, you should use destination charges https://stripe.com/docs/connect/destination-charges
Yes i'd recommend stripe onboarding, unless you have a strong reason to build it by yourself.
and yes you specify the acocunt ID in transfer_data: {destination: '{{CONNECTED_ACCOUNT_ID}}'},, this tells Stripe which account the funds should be transferred to
sounds good, I appreciate it, can destination be an array of account ids or for that to work would it have to be done through the transfer api?
Just one account ID, and no you don't need to use transfer API to move the funds, Stripe will create a transfer automatically
alright sounds good, that makes sense, the issue is that multiple products can be bought at the same time and those products could be created by different sellers, meaning a single transfer I don't think would work for all of them, the refunds seem very nice with destination charges where you can refund the charge and the platform and the seller are liable for it, but if it's only a single transfer that can be attached to the payment intent then I have to handle it in some other way so that multiple people can receive payouts on one purchase
thank you for all the help, I appreciate the tips and you pointing me in the right direction, the metadata was incredibly helpful to learn about and although destination charges probably won't work directly for what I'm working on, the refunds api is great to know about and I can make something similar to the destination charges once I get the ability for users to enter their bank/transfer information setup
thank you, it was very helpful and you provided alot of insight, thank you Jack, I appreciate it