#deepumi_api
1 messages ¡ Page 1 of 1 (latest)
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.
- deepumi_connect-refund, 1 hour ago, 40 messages
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1253499161131614300
đ Have more to share? Add details, code, screenshots, videos, etc. below.
Hi, we document how fees work with Connet, https://docs.stripe.com/connect/direct-charges-fee-payer-behavior.
Understand how to configure the billing behavior for new connected accounts.
This is the json I post to Stripe using PaymentIntent API.
{
"expand": [
"latest_charge"
],
"description": "Re-Elect Chito Vela",
"metadata": {
"donationType": "OneTimeCharge",
"donorId": "194625",
"x-dwy-id": "cc15b5fe-e6d7-44fc-9025-32939dc3d529"
},
"application_fee_amount": "53",
"transfer_data": {
"destination": "acct_1OK4gCJgmkdYjuX9"
},
"currency": "usd",
"off_session": "true",
"payment_method_data": {
"type": "card",
"card": {
"token": "tok_1PTsVwIcWSSPnlgrZMECsRVv"
}
},
"confirm": "true",
"amount": "2500",
"payment_method_types": [
"card"
]
}
Are there any specific json parameter I am missing, Sorry to say that, we lost almost $4000.00 due to this, and platform account is having negative amount...
It looks like the connected account is a Standard Connected account. If you want these connected accounts to pay fees, you might want to use Direct Charges, https://docs.stripe.com/connect/direct-charges.
Using PaymentIntent API can I do the direct charges?
Yes, you'd want to follow the above document and use the Stripe Account Header
I went through this document intially while implementing the payment API - https://docs.stripe.com/api/payment_intents/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I am sending destination account as shown in the JSON above.
"transfer_data": {
"destination": "acct_1OK4gCJgmkdYjuX9"
},
Yes, that is what the document I shared uses.
but how to say which parameter to Split the fees
Your current flow is called a Destination Charge, and the payments belong to the Platform Account.
If you use Direct Charges, those would belong to your Connected Account and the fees will be deducted from those accounts.
Do you have a sample JSON how it might look on your side? or what changes to make it from the above JSON to make it happen?
We share some examples here: https://docs.stripe.com/connect/direct-charges?platform=web&ui=elements
const paymentIntent = await stripe.paymentIntents.create(
{
amount: 1000,
currency: 'usd',
automatic_payment_methods: {
enabled: true,
},
application_fee_amount: 123,
},
{
stripeAccount: '{{CONNECTED_ACCOUNT_ID}}',
}
);
I see that the CURL code.
curl https://api.stripe.com/v1/checkout/sessions
-u "sk_test_u7EPXn2YDSrs1gUI29kaC67Z:"
-H "Stripe-Account: {{CONNECTED_ACCOUNT_ID}}"
-d "line_items[0][price_data][currency]"=usd
-d "line_items[0][price_data][product_data][name]"=T-shirt
-d "line_items[0][price_data][unit_amount]"=1000
-d "line_items[0][quantity]"=1
-d "payment_intent_data[application_fee_amount]"=123
-d mode=payment
--data-urlencode success_url="https://example.com/success?session_id={CHECKOUT_SESSION_ID}"
With Direct Charges, you can take an application fee.
That is the example for Checkout
Would this work then?
curl https://api.stripe.com/v1/payment_intents
-u "sk_test_u7EPXn2YDSrs1gUI29kaC67Z:"
-H "Stripe-Account: {{CONNECTED_ACCOUNT_ID}}"
-d amount=1000
-d currency=usd
-d "automatic_payment_methods[enabled]"=true
-d application_fee_amount=123
Yes!
Could you please confirm weather the equivalent of full fees including application_fee + stripe fee taking from Connected account correct?
okay I will make the code change to do the above.
thank you so much.
just to confirm
You can take an application fee on these payments, https://docs.stripe.com/connect/direct-charges#collect-fees. The fees will be deducted from the Connected Accounts.
the token capturing request is all good right for ex; the request id for capturing token is "
req_FOKeFuRH57ZAiW"
Please test these in test mode and confirm that is what you want.
yes, this is wat we used to do from many years, it was my mistake that I have not checked after pushing this code a month or so
thank you so much..
One last question, sorry
No, you would need to create that token on your connect account: https://docs.stripe.com/connect/authentication
where is the card token passing in this payment_intent_api
Or else, you would see an error whna attenpting to use it
customer already linked their account with the platform, so what other token we are talking about?
could you explain please..
Also, you would want to use Stripe Elements on the client side to collect payment method details
On req_FOKeFuRH57ZAiW"
we don't use the Stripe Element or Stripe UI to collect payment.
we use our own form and back end code use the STripe API to process the transaction
yea, its almost 9 year or so, everything was good, after I switched recently to use the new Payment Intent API and I screwed up
we prefer custom flow
Do you know when we use the custom flow, we will create the card token as the first step.
And the second request to the payment API
Card token API looks good to me, But the Payment API, I want to know how I can pass the card token
You can clone payment methods, https://docs.stripe.com/payments/payment-methods/connect#cloning-payment-methods that you've already collected on your Platform Account.
So you can use these on your Connected Account
So I need to use PaymentMethods API instead of PaymentIntent API is that correct?
No!
You would want to use them together
I recommend you review the above documents carefully and test the flow first
okay, let me go over the flow first.. thank you
Sure!
Thank you so much