#Koja-Connect
1 messages · Page 1 of 1 (latest)
When you say dealers are registered as Stripe users, do you mean Customer?
I believe you should use Connect. Each dealer should be a Connected Account, and buyer should be a customer.
However for the inter-countries part, you would need to satisfy some conditions. For example cross-border payout when you want to pay your dealers
Dealers are connected accounts
But when I create Session for payment
how should I ask for shipping info and how to add taxes
Shipping can be collected by specifying shipping_address_collection https://stripe.com/docs/payments/checkout/shipping#create-checkout-session-with-options
Choosing Java you will see the sample code
.setShippingAddressCollection(
SessionCreateParams.ShippingAddressCollection.builder()
.addAllowedCountry(SessionCreateParams.ShippingAddressCollection.AllowedCountry.CA) .addAllowedCountry(SessionCreateParams.ShippingAddressCollection.AllowedCountry.US)
.build())
And for collecting Taxes: https://stripe.com/docs/payments/checkout/taxes?tax-calculation=stripe-tax
There are Stripe Tax (automatic) or Tax Rates(manual)
@sullen gull make sure you're using the lastest version of the stripe-dotnet Nuget package
ah sorry, this is Java
then yeah, make sure you are using the latest version of stripe-java.
like edit your pom.xml and bump the version of the stripe-java dependency.
https://github.com/stripe/stripe-java/blob/master/CHANGELOG.md#20880---2021-11-16 is the minimum version you need (20.88.0).
what version are you using?
also make sure you're using the right namespace, there are two things called "Session" in our library
like try explicitly using com.stripe.param.checkout.SessionCreateParams instead of just SessionCreateParams
i..e import com.stripe.param.checkout.SessionCreateParams; etc
I have imported that one
mind sharing the complete code then? (in text, not just screenshots)
but yeah I think the docs at https://stripe.com/docs/payments/checkout/shipping#create-checkout-session-with-options are wrong unfortunately
give me a sec to make it work
yep, that's it(I was going through the example code to change it to that to show you the full example, but yep, that is it)
I'll get those docs fixed
You can not pass automatic_tax when not using prices. and last part
im facing this issue now
yes, you can't do this part :
SessionCreateParams.LineItem.builder()
.setName(chargeInformations.getChargeName())
.setAmount(chargeInformations.getAmount())
.setCurrency("eur")
.setQuantity(chargeInformations.getQuantity())
.build())
i.e. creating an ad-hoc line item
you have to create a Price object(https://stripe.com/docs/billing/prices-guide) first, and then pass the ID of that Price object to
SessionCreateParams.LineItem.builder().setPrice("price_xxxx") instead