#abhishek06879
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
would you mind sharing the request ID?
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
let me check
I don't have access to my client's Stripe dashboard So I can't able to send you the request ID
My client only given me the Secret keys to integrate
I'm creating checkout session in Stripe
in the headers of the response you can see the request ID as well
I'm not using the Stripe API directly I'm just using a npm library for Stripe in NestJS
I got the request ID - req_oy5UZb158tL0Yg
ok so you're creating a Checkout Session while also using
application_fee_amount: "..",
},```
but you're creating it on your own account
so what application_fee_amount are you trying to set?
I'm trying to set application_fee_amount: 50
I want to do Direct charge
In the test mode it's not complaining me about the Direct or Destination charge
but in live it's happening
if you don't use the Stripe-Account header with the connected account ID then it won't be a Direct Charge anymore
So what parameter am I missing to create a direct charge?
I'm sending these paramter on creating a checkout session {
cancel_url: 'http://localhost:4200/account/cart',
success_url: 'http://localhost:4200/account/shows?session_id={CHECKOUT_SESSION_ID}',
mode: 'payment',
customer_email: 'user@company.com',
payment_intent_data: { application_fee_amount: 50, receipt_email: 'user@company.com' },
payment_method_types: [ 'card' ],
line_items: [
{ quantity: 1, price_data: [Object] },
{ quantity: 1, price_data: [Object] },
{ quantity: 1, price_data: [Object] },
{ quantity: 1, price_data: [Object] }
]
}
I'm also sending the same parameters then why it is saying 400 Bad Request
please share the exact backend code you are using to call the API, and the req_xxx request ID from the failed API request.
I suggest you add logs and confirm that producer.stripeAccountID is not null or undefined.
I suggest making sure the file has been saved and the changes deployed/running on your server.
if you're having trouble, share the req_xxx request ID from the failed API request so I can see what you're trying to do.
Yeah this is request ID - req_ZVysx0b8mMCn9C
Yeah the same code has been deployed and running on production as well
the ID you're passing is wrong.
you're passing the ID of your platform account acct_1LAbxlR2tXILb02y. You should be passing the ID of the connected account that you are processing the Direct Charge with and taking the fee from. Please check the docs in detail.
alternatively, you are using the secret key of the connected account to initialise the stripe object. Either way, that's wrong.
The way Direct Charges work is you use the secret key of your platform account, and pass Stripe-Account as the ID of a specific connected account.