#Kyle U

1 messages ยท Page 1 of 1 (latest)

junior horizonBOT
candid lotus
livid glen
#

req_Lh4IdnP63jChFA

#

How we operate: Charities add their bank accounts, and donors send them money. We don't need to hold the funds as a platform and operate in the same way as GoFundMe.

#

There can be different charities at checkout which is why we also need to transfer accordingly

#

Use Case:
A donor chooses to send $15 to Charity A & $10 to Charity B for a checkout total of $25. When the payment is processed, we need to send $15 to Charity A and $10 to Charity B.

#

The issue -> only Charities within Canada are receiving transfers because on_behalf_of isn't configured correctly

candid lotus
livid glen
#

const charge = await stripe.paymentIntents.create({
amount: amt,
currency: currency,
on_behalf_of: val.stripeAccountId,
receipt_email: email,
transfer_group: "{ORDER10}",
});

livid glen
#

We don't want to keep the funds at all. For example GB Donors will be sending money to GB Charities directly to their banks they hooked up using Express. We don't need the money sent to us in Canada at all

candid lotus
#

The request id that you've shared with me is a transfers API call.

livid glen
#

I need help implementing on_behalf_of to allow our foreign charities to receive payments directly from our donors

candid lotus
livid glen
#

I tried to implement it by doing this:

#

const charge = await stripe.paymentIntents.create({
amount: amt,
currency: currency,
on_behalf_of: val.stripeAccountId,
receipt_email: email,
transfer_group: "{ORDER10}",
});

#

And then:

                            await stripe.transfers.create({
                              amount: finalValue,
                              currency: defaultCurrency,
                              destination: val.stripeAccountId,
                              transfer_group: "{ORDER10}",
                            });
heady lantern
#

๐Ÿ‘‹ Taking over this thread, catching up now

#

As mentioned by pgskc, cross border payout, i.e. platform process the payment for connected accounts from different countries is only supported by US platform account. With your platform in Canada, you can't transfer the funds to other countries other than Canada even with on_behalf_of on the payments

livid glen
#

I don't want any of the funds to come to my account at all. I want the funds to be sent directly to the charity's bank account in that country. It will only ever be domestic transfers, for example a US donor will only send funds to US charities, and our platform doesn't need to hold the money at all

#

So I don't need cross border payouts

#

Users aren't sending money to other countries, we just operate in other countries and all payouts will be domestic in that country. GB to GB, US to US, AU to AU, etc

#

And since the users don't send us the funds to send to the other countries, we should be able to make it work as nothing would be cross border.

#

Since they are sending directly to the charity, within their own country and not to us

heady lantern
#

Thanks for sharing! Let me double check and get back to you

livid glen
#

Thanks. I think our configuration is using transfers but I'm not sure that's what we're trying to accomplish. We don't want the funds to come through Canada at all

heady lantern
#

With Separate Charges and Transfer (the one that you're now), it's not possible to do cross border payout even with on_behalf_of.

Since your platform account isn't in US, there will be two possible ways.

  1. Direct Charges on Standard account which the payment is made directly on the connected account, not on the platform account.
  1. Destination Charges with on_behalf_of on Express or Custom accounts.
livid glen
#

This is what I'm asking for help with, #2

#

I integrated it but still received the error

heady lantern
#

Could you share the request ID that threw the error? The above request ID you shared used Separate Charges and Transfer, not Destination Charges

#

The request for Destination Charges with on_behalf_of should look like this and no separate Transfers request required since Destination Charges includes payment and transfer in one single request:

const paymentIntent = await stripe.paymentIntents.create({
  amount: 1000,
  currency: 'gbp',
  transfer_data: {
    destination: '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
  },
  on_behalf_of: '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
});
livid glen
#

Ok so I don't need transfers.create?

heady lantern
#

Yup! Please ensure you include transfer_data.destination and on_behalf_of in Payment Intent request for Destination Charges

livid glen
#

So that chunk of code you provided handles the entire request? And the transfers will happen

#

I'm just wondering since there may be multiple charities under one transaction where the funds will need to be sent to different accounts

heady lantern
#

Destination Charges only allows one payment to one connected account

#

Only Separate Charges and Transfers allows multiple connected account transfer. However, cross-border payout to multiple connected accounts is not supported in non-US platform

livid glen
#

So could we configure using separate charges? Is this the same as direct charge?

#

I guess more importantly, how do we distribute the funds to multiple accounts from the transaction

heady lantern
#

Your CA platform can't payout to non-CA connected accounts with Separate Charges and Transfers. Transfers request doesn't support transferring funds to non-CA countries even with on_behalf_of.

In your case (CA platform), it's only possible to transfer funds to non-CA connected accounts with either Destination Charges on Express/Custom accounts or Direct Charges on Standard account. Both Destination Charges and Direct Charges is one payment to one connected account.

#

If you wish to transfer funds to multiple accounts that are in different countries from your platform account's, it can only be done with platform account in US

#

If you wish to still use CA platform, then you can only do one payment to one connected account with Destination Charges

livid glen
#

So if a GB donor sends $30 to 3 seperate GB Charities, we can't split the funds up and send $10 to each charity, we can only have all $30 go to 1 GB charity

heady lantern
#

Yup! Or you can make 3 different payment requests with Destination Charges to each charity ($10, $10, $10)

livid glen
#

Hmm, I like this option. Is there example code of a scenario like this? We wouldn't know how many destination charges we would have until checkout. The donor could choose as many charities to split as they prefer

heady lantern
#

We don't have the example code for this. One way I can think of is:

  1. Collect and save doner's payment method: https://stripe.com/docs/payments/save-and-reuse
  2. Doner set the split amount in your system
  3. Charges to doner using Destination Charges with on_behalf_of in each split using the saved payment method in Step 1: https://stripe.com/docs/connect/destination-charges#settlement-merchant

You can set following parameters additional in Payment Intent request:

livid glen
#

Here is the use case: Charities post items they need, donors send the funds to purchase the items. So a donor might add a Ball, Hat, and Blanket to their cart, then checkout. These items could belong to 3 different charities, or 2, or 1, there's no way to predict for each transaction. So when the transaction is complete, send the funds to each charity accordingly. Transaction total is $45, $10 Bats (Charity A), $15 Hats (Charity B), $20 Blankets (Charity C). We need to distribute the funds accordingly. Is it possible using seperate destination charges? Or is there any other possible way to accomplish this with linked express accounts for the charities in foreign countries?

heady lantern
#

Yup! This can be done with the steps I shared earlier by collecting and saving doner's payment method upfront without charging to the doner. When the doner checkout, your system would already know the amount and connected account. You can then charge the doner with the saved payment method using Destination Charges for each connected connect

livid glen
#

Why do we need to collect and save the doner's payment method?

heady lantern
livid glen
#

Here is a mockup of what a transaction would look like

#

Lets say the Donor and the Charities are all in GB

#

How do I configure Stripe so that $17.54 is sent to Charity A & $86.93 is sent to Charity B from the transaction total of $104.77 paid by the GB Donor

heady lantern
#

You can use above doc to save payment method using the same UI. After doner enters the card information and saves to Stripe system, you can then charge separately at your server

livid glen
#

So instead of processing the transaction and transferring when the user pressed "Pay Now", we tell them the payment was successful and because we have their card details we can process on the back end

heady lantern
#

When to show successful payment is up to your business logic. You can also display successful message after all the backend charges are successful

livid glen
#

Is there any starter code for the backend charges where we charge separately?

heady lantern
#

Nope! You'd have to manage in your system with Payment Intent requests on each connected account

livid glen
#

Ok, thanks. What is required to open a US account?

heady lantern
livid glen
#

thanks

heady lantern
#

No problem ๐Ÿ˜„