#carlos-fontana_api

1 messages · Page 1 of 1 (latest)

lament ventureBOT
#

👋 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/1339165018847182870

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

inner panther
#

Hello

lapis zinc
#

Hi, how can I help you? Are you running into any issues while following the documentation?

inner panther
#

Hello, good morning. We are looking to implement Direct Charges. I am working with Vasily (he is in this chat too). We are both on the same team, and we want to implement it using cURLs.
I would like you to validate whether this implementation is correct. The issue is that we cannot see the customer and payment information on the client’s dashboard.
We need to see that information in the client’s Dashboard because the client says they can only see the transaction but not the details of who made the payment.

lapis zinc
#

implement it using cURLs
What do you mean by this?

#

only see the transaction
Could you please share an example PaymentIntent ID?

glacial coral
#

Hello,

I’m a colleague of Carlos, and we are trying to set up direct charges so that our platform only collects a fee while the payment goes directly to the merchant/connected account. Additionally, the connected account should be able to see the original customer who made the payment.

As a start, we were able to achieve something similar using these cURL commands. However, in this setup, the main account (the one that collects the fee) receives the full amount first and then forwards the remainder to the destination merchant. As a result, the merchant only sees our account rather than the original customer.

I hope I explained this clearly. Here’s our cURL request—we’re not sure what we’re doing wrong.

#

--- CREATE PAYMENT INTENT WITH ON BEHALF
curl https://api.stripe.com/v1/payment_intents
-u sk_xxxxx:
-d amount=4000
-d currency=gbp
-d "payment_method_types[]=card"
-d capture_method=automatic
-d "application_fee_amount=400"
-d "transfer_data[destination]=acct_xxxxx"
-d "on_behalf_of=acct_xxxxx"
-d "description=Donation to Green Oak Institute"
-d "metadata[order_id]=12345"
---- CREATE PAYMENT METHOD
curl https://api.stripe.com/v1/payment_methods
-u sk_xxxxx:
-d type=card
-d "card[token]=tok_visa"
---- APPEND THE PAYMENT METHOD TO THE INTENT
curl https://api.stripe.com/v1/payment_intents/pi_xxxxxxx
-u sk_xxxxx:
-X POST
-d "payment_method=pm_xxxxxxz"
--- EXECUTE/CONFIRM THE INTENT
curl https://api.stripe.com/v1/payment_intents/pi_xxxxxxx/confirm
-u sk_xxxxx:
-X POST

#

This is our last tested payment intent = pi_3QrbdYEsYIHxK4oE0VWLt7te

lapis zinc
glacial coral
#

Exactly! Our goal is for us just to collect the fee, and the buyer information goes directly to the connected merchant

inner panther
#

Exactly

lapis zinc
#

This must depend on your business model, rather just where do the Customer objects live. You can always build your own dashboard where you can show your users the customer information from the Platform account.

inner panther
glacial coral
#

I see, so for example on our current approach we are adding the merchant account from our main account with this cURL.

curl https://api.stripe.com/v1/accounts
-u sk_test_wa3GO8JsCvhGbs7Uso5eVuM6:
-d type=custom
-d country=GB
-d email="greenoakuk@mailinator.com"
-d business_type=company
-d "company[name]"="Green Oak Institute"
-d "capabilities[card_payments][requested]=true"
-d "capabilities[transfers][requested]=true"

And then we send them a URL to complete their information, is that considered a Standard Account elegible for direct charges?

lapis zinc
lapis zinc
glacial coral
#

We can remove that which is not needed 😄 . This is our initial approach to try to figure out how to do it, so we might have errors.

#

Our goal is to have control to do it from js/node, collecting first the payment method from the FE, and then confirming the process on the BE side, we are using the cURLS as an initial approach to check the dashboard until we get the expected result, that is the direct charge. So for now we might need to find a cURL way to test direct charges, that would be awesome. Once confirmed on both our platform and a connected merchant, we will proceed to replicate the process on with the js library from react and a node server.

lapis zinc
lapis zinc
glacial coral
#

Perfect, I will read the docs and try the cURL in the direct charges page, I let you know if I got all working

#

Thank you 😄

lapis zinc
#

Happy to help.