#paly
1 messages · Page 1 of 1 (latest)
Hi. Could you please share the Request ID req_xxx? https://support.stripe.com/questions/finding-the-id-for-an-api-request
req_N3zxWALLX2xNXo?t=1692620440
Your Price exists on the Connected account, but the PaymentIntent is created on the Platform. You need to use a Price that exists on the Platform too.
platform too? didn't understand I have created a product for connect account
Yes, if you do only Destination Charges, you only need Prices on your Platform.
what about the direct charges?
I gound this
curl https://api.stripe.com/v1/payment_intents
-u "sk_test_51LWfCbEKi7TmDGM93Jsvjz7H1VrtmZl95zJQm9xmyxpOAywbp1eek5Erl5Ml2fHIvcGP5jL05KesSxWmpmuMNvnl00yXMyNgdW:"
-H "Stripe-Account: {{CONNECTED_ACCOUNT_ID}}"
-d amount=1000
-d currency=usd
-d "automatic_payment_methods[enabled]"=true
-d application_fee_amount=123
idea is to create a checkout session
Then you need a Price on the Connected Account.
The principle is:
- Direct charge is created directly on the Connected account, so all objects exist on the Connected account: Prices, Subscriptions, Customers, Charges, etc.
- Destination charge is created on the Platform account, and then it transfers just the funds to the Connected account. All objects exist on the Platform account: Prices, Subscriptions, Customers, Charges, Transfers etc.
Oh I would like to go with the 1st option..want to do everything on connected account. So what should I do here?
Use the -H "Stripe-Account: {{CONNECTED_ACCOUNT_ID}}"
It allows your Platform to directly control your Connected account, create the Checkout Session, etc.
just wondering while using "stripe-account" in header I won't be need of -d "payment_intent_data[transferdata][destination]=acct" \
Yes, you don't need this. The payment is already on the Connected Account, you don't need to transfer it anywhere.
strange, When I ran this
curl https://api.stripe.com/v1/checkout/sessions \ -u sk_test_51LWfCbEKi7TmDGM93Jsvjz7H1VrtmZl95zJQm9xmyxpOAywbp1eek5Erl5Ml2fHIvcGP5jL05KesSxWmpmuMNvnl00yXMyNgdW: \
-H
"Stripe-Account: acct_1NdvZzBzcSw7JdYb" \ -d "payment_method_types[0]=ideal" \ -d "payment_method_types[1]=card" \ -d "line_items[0][price][currency]=eur" \ -d "line_items[0][price]"=price_1NhWtZBzcSw7JdYbEdfd69QK \ -d "line_items[0][quantity]=1" \ -d "payment_intent_data[application_fee_amount]=100" \ -d "mode=payment" \ -d "success_url=https://example.com/success" \ -d "cancel_url=https://example.com/cancel"
I am getting multiple checkout session link
What do you mean by this?
I ran the above CURL and I got a big response which has list of data onject and each object has one checkout session url .
"data": [{
"id": "cs_test_a1t3S2YVeLy2CESm79hanF7kdY7C9mNC05XjbBfnKCCBtVrscRwT6Go4pG"
}.{
"id": "cs_test_a1umjW3sBFMml3DVD4cvqQB0aayVuyH6MJ20Bgg2LsxTKd1TEhN6vgVNh6"}]
basically I am getting multiple
"url": "https://checkout.stripe.com...
Oh, you ran a GET method, not POST. You basically listed the existing Sessions
but this is a post request?
curl https://api.stripe.com/v1/checkout/sessions \ -u sk_test_51LWfCbEKi7TmDGM93Jsvjz7H1VrtmZl95zJQm9xmyxpOAywbp1eek5Erl5Ml2fHIvcGP5jL05KesSxWmpmuMNvnl00yXMyNgdW:
-H
"Stripe-Account: acct_1NdvZzBzcSw7JdYb" \ -d "payment_method_types[0]=ideal" \ -d "payment_method_types[1]=card" \ -d "line_items[0][price][currency]=eur" \ -d "line_items[0][price]"=price_1NhWtZBzcSw7JdYbEdfd69QK \ -d "line_items[0][quantity]=1" \ -d "payment_intent_data[application_fee_amount]=100" \ -d "mode=payment" \ -d "success_url=https://example.com/success" \ -d "cancel_url=https://example.com/cancel"
Try specifying the -X POST