#food-connect-refund

1 messages · Page 1 of 1 (latest)

agile pierBOT
#

Hello! We'll be with you shortly. 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.

hazy hare
#

@hardy pebble not sure I understand what that means exactly. Can you try and give a concrete example like a $100 where connected account A gets $20 and B gets $70, etc. and tell who pays what back?

hardy pebble
#

customer pays 100$ and 30$ goes to driver connect account and 70$ goes to Restaurant connect account.

but when a customer is not happy about the food Restaurant has a option to refund x amount of money to the customer. but the money should be taken from Restaurant connect account.

hazy hare
#

Perfect, thanks for clarifying. So you use "Separate Charges and Transfers" right?

#

food-connect-refund

hardy pebble
#

i don't know, you tell me, just want to refund money to the customer let say 40$ from restaurant account

hazy hare
#

i don't know, you tell me
you're the developer here, you wrote the integration/code/etc. I can't tell you what you did. Once you tell me what you did I can guide you though!

hardy pebble
#

i have this so far: refund = stripe.Refund.create(
amount=amount,
charge="ch_3Ok7KiFmAcnSnAaB0lP5zsaX",
)

hazy hare
#

sorry you nee to take a step back and explain how you accpt funds in general, how charge creation happens, etc.

hardy pebble
#

okay when customer want to pay i make a : paymentIntent = stripe.PaymentIntent.create(
amount=int(request.amount.totalCent),
currency=request.currency,
customer=customer_id,
)

When customer pay successfully, and the food will be delivered after 30 min, when driver set the status to delivered and when i transfer the money to restaurant and driver like this: # Create the Restaurant transfer
stripe.Transfer.create(
amount=int(transfer_amount_cents),
currency="DKK",
destination=_restaurant.resturantStripeId,
source_transaction=payment_intent.latest_charge,
)

                    # Create the driver transfer
                    stripe.Transfer.create(
                        amount=delivery_price_cents,
                        currency="DKK",
                        destination=_driver.resturantStripeId,
                        source_transaction=payment_intent.latest_charge,
                    )
hazy hare
agile pierBOT
hardy pebble
#

yes

hazy hare
#

And so right now you only sent $70 to that restaurant so you can not pull back $100, that's not possible

hardy pebble
#

yeah but i want to refund 70$ or less

hazy hare
#

What you need to do is something like this

  1. Refund the Customer (from your balance)
  2. Separately reverse the first Transfer (the one to the restaurant) for its full amount ($70)
  3. Use https://stripe.com/docs/connect/account-debits to pull the rest
#

ah so you only refund the restaurant, not the full $100?

hazy hare
#

ah then sure it works

  1. Refund (pulls from your balance)
  2. Reverse the Transfer to the restaurant separately to pull the money back from them
hardy pebble
#

can i do:

1: Transfer the money from restaurant to me
2: make the Refund

devout nymph
#

Hi @hardy pebble I'm taking over this thread

#

Give me a sec to go through the coversation history

hardy pebble
#

ok

devout nymph
#

Sure, you can do a reverse transfer to pull the funds from the connected account, and refund the customer,

hardy pebble
#

will the Transfer by default sent it to my platform?

devout nymph
hardy pebble
#

but i don't have the transfer id, i only have what i get from payment_intent, latest_charge

devout nymph
#

It's the the ID of transfer that you created earlier to move the funds from your account to the connected account

hardy pebble
#

yeah, so i need to save it somewhere?

devout nymph
#

Yes you are right

hardy pebble
#

okay thanks for the help, i will right you again if its not working 😆