#vish26

1 messages · Page 1 of 1 (latest)

urban nexusBOT
spare flame
keen pollen
#

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?

spare flame
keen pollen
#

I believe its this: cs_live_b1BQNbffXEwr4rMATXoazkpHqC5HqSQ75yQAOCszz5NpxltLGgXxCEZ3uy

#

Wait wait

#

this is for my account

#

Let me check of a connect account

spare flame
#

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

keen pollen
#

How can I see an older version of the api doc?

keen pollen
#

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

#

Does it go to us(the same entity that gets the application fee) or to our customers(connect accounts)?

spare flame
keen pollen
#

I have not set it yet, I want to implement it now

spare flame
#

You are using Direct Charge, so the charged amount (including shipping fee) will goes to the connected account

keen pollen
#

Is there a way it can come to us(same entity as the application fee)?

spare flame
#

Hmm, so you are handling the shipping? Do you also handle disputes?

keen pollen
#

Yes we handle shipping. Disputes are handled by our connect accounts

spare flame
#

Ok. Then you might want charge a larger application fee, and later refund the difference