#vish26
1 messages · Page 1 of 1 (latest)
Sure you can add in a shipping rate https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-shipping_options-shipping_rate_data
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Give me a minute
Thanks btw
It seems your API has changed since I last used it
I am using this API in node js:
await stripe.checkout.sessions.create(checkoutData, accountStripeData)
And checkout data looks like this:
let checkoutData = {
line_items: stripePrices.map((stripePrice) => {
return {
price: stripePrice.id,
quantity: stripePrice.quantity,
};
}),
mode: "payment",
success_url: successUrl,
cancel_url: cancelUrl,
payment_intent_data: {
capture_method: "automatic",
application_fee_amount: applicationFee,
metadata: {
sportsType: sportsType.substring(0, 450),
teamId: teamId.substring(0, 450),
organizationId: organizationId.substring(0, 450),
paymentType: "OTHERS",
shippable: shippable ? "true" : "false",
shippingWeight: shippingWeight.toString(),
},
},
metadata: {
sportsType: sportsType.substring(0, 450),
teamId: teamId.substring(0, 450),
organizationId: organizationId.substring(0, 450),
paymentType: "OTHERS",
shippable: shippable ? "true" : "false",
shippingWeight: shippingWeight.toString(),
},
automatic_tax: {
enabled: true,
},
expires_at: getDateTimeForNextHour(),
expand: ["line_items"],
};
Are you referring to this API only?
Hi! Can you share the request ID (req_xxx)? Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
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.
I believe its this: cs_live_b1BQNbffXEwr4rMATXoazkpHqC5HqSQ75yQAOCszz5NpxltLGgXxCEZ3uy
Wait wait
this is for my account
Let me check of a connect account
https://stripe.com/docs/upgrades#2022-08-01
The shipping_rates parameter has been removed from create Checkout Session. You can use the shipping_options parameter instead.
The Stripe API doc will always shows the API params of the latest API version.
You can still use shipping_rates since you are using the older version of Stripe API
How can I see an older version of the api doc?
btw this is the right id: cs_live_a1U9tblVrCYmAiAM8I2GSUCpLTCS3tWHspIqzPa52qmh7EjQ36pu7fqEIS
Ok so it seems I can still use shipping rates as you said. So iahev some questions about shipping rate
Who gets this fixed amount: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-shipping_options-shipping_rate_data-fixed_amount
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Does it go to us(the same entity that gets the application fee) or to our customers(connect accounts)?
No I don't see you set shipping_rates in https://dashboard.stripe.com/logs/req_ZRhft0fVOvzvye
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I have not set it yet, I want to implement it now
You are using Direct Charge, so the charged amount (including shipping fee) will goes to the connected account
Is there a way it can come to us(same entity as the application fee)?
Hmm, so you are handling the shipping? Do you also handle disputes?
Yes we handle shipping. Disputes are handled by our connect accounts
Ok. Then you might want charge a larger application fee, and later refund the difference