#golan.shay
1 messages · Page 1 of 1 (latest)
Hi there,
Could you please share the related PaymentInntent Id?
pi_3Llwo3ImMU37dR1u0ffaqWyC
thanks for sharing. Are you using direct charges?
that means your connected accounts are accepting payments and responsible for fess, refunds and so one,
In other word are following this integration ?
https://stripe.com/docs/connect/direct-charges
Is this your platform Id: acct_14uRqtImMU37dR1u ?
yes
I create a checkout session and using the URL in the response to launch your webpage
OK, let me check something
While analyzing how you are creating the checkout Session, you are using destination charges between your Platform account and your connected Account:
https://stripe.com/docs/connect/destination-charges
You are collecting the fees using application_fees_amount so in application_fees_amount you need to take into account Stripe Fees, because your platform account will pay for it once the fees come to your platform account:
here is more details about that:
https://stripe.com/docs/connect/destination-charges#flow-of-funds-app-fee:~:text=Then%2C Stripe fees (%240.59) are subtracted from the application_fee_amount and the remaining funds (%240.64) are added to your platform account’s balance.
Is there a better way of doing that?
Actually there are two ways to do this. The first like you are doing actually.
The second is using transfer_data[amount]
You subtract your platform’s fees (including Stripe fees) from the charge amount, then pass the result of this calculation as the transfer_data[amount]
Here is more details about that:
https://stripe.com/docs/connect/destination-charges#transfer-amount:~:text=You subtract your platform’s fees from the charge amount%2C then pass the result of this calculation as the transfer_data[amount]
In both ways I need to know in advance what are the Stripe fees, this doesn't make sense
What are you thinking about ?
I was expecting Stripe to take the charges from the connect account, not for me to calculate that and add that to "my" charges
You can do so, if you are using direct charges, then the Stripe fees will be charged for the connected account
https://stripe.com/docs/connect/direct-charges#flow-of-funds-with-fees
And how do I create a URL to launch the payment page?
Same as you are doing with your platform account, by here your connected accounts need to do so
again if you think that direct charges is a valid option for you
meanwhile you need to keep destination charges
PaymentIntentData: &stripe.CheckoutSessionPaymentIntentDataParams{
Params: stripe.Params{
StripeAccount: nil,
},
ApplicationFeeAmount: stripe.Int64(applicationFeesInPence),
CaptureMethod: nil,
Description: stripe.String(in.Reason),
Metadata: map[string]string{
"reason": in.Reason,
"reference": in.Reference,
},
OnBehalfOf: stripe.String(in.CustomersAccountId),
ReceiptEmail: stripe.String("plime-receipts@plime.co"),
StatementDescriptor: stripe.String(statementDescriptor),
StatementDescriptorSuffix: stripe.String(statementDescriptorSuffix),
TransferData: &stripe.CheckoutSessionPaymentIntentDataTransferDataParams{
Amount: nil,
Destination: stripe.String(in.CustomersAccountId),
},
TransferGroup: nil,
},
This is how I create the payment intent, what you're suggesting is to use the Connect account in here:
Params: stripe.Params{
StripeAccount: nil,
},
instead of here:
TransferData: &stripe.CheckoutSessionPaymentIntentDataTransferDataParams{
Amount: nil,
Destination: stripe.String(in.CustomersAccountId),
},
?
Or should I use the TransferData.Amount field?
Hi! I'm taking over this thread. Give me a few minutes to catchup.
You have two options when creating charges with connect:
- Direct Charges, where the payment happens on the connected account. In this case the connected account will pays the Stripe fees https://stripe.com/docs/connect/direct-charges
- Destination Charges, when the payment happens on the platform account. In this case the platform account pays the Stripe fee https://stripe.com/docs/connect/destination-charges
I recommend you to read the two links I shared above to understand all the difference between the two approach, and pick the one that works best for your business