#rocky_webhooks

1 messages ยท Page 1 of 1 (latest)

bright fiberBOT
#

๐Ÿ‘‹ 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.

steel lightBOT
#

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.

wooden dragon
#

hello jack ๐Ÿ‘‹

low ivy
#

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

wooden dragon
#

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?

low ivy
#

Yes

wooden dragon
#

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?

low ivy
wooden dragon
#

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!

low ivy
#

And yes payment_intent.succeeded is the event that you should listen to for getting notified about successful payments

wooden dragon
#

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?

low ivy
#

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

wooden dragon
#

bet, that's perfect thank you so much!

#

also, another quick question, should I open another thread or just ask here?

low ivy
#

Sure we can continue here.

wooden dragon
#

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?

low ivy
wooden dragon
#

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

low ivy
#

Do you have your connected account ID?

wooden dragon
#

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

low ivy
#

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

wooden dragon
#

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?

low ivy
#

Just one account ID, and no you don't need to use transfer API to move the funds, Stripe will create a transfer automatically

wooden dragon
#

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