#sree

1 messages · Page 1 of 1 (latest)

keen thicketBOT
static olive
#

👋 happy to help

carmine shard
#

Hi tarzan

#

here is my issue

#

I am having questions regarding express connect integration and webhooks.

  1. I use version 20.111.0(java) before. Then I had "Deserialization failed, probably due to an API version mismatch" for webhook events. Then I changed to 21.0.0 the issue is solved. Webhook worked perfectly.

  2. When I integrated express connect, account creation, and account link creation both worked perfectly. But when I tried to implement payouts for connected accounts through the stripe checkout, I was having an issue with price_data. The issue is the price/amount is dynamic( not fixed product or price). setAmount(), setName() etc parameters are not working with current version( 21.0.0).
    So my question is :

  3. Do we need to product and price for each payment in this version?

  4. How to set dynamic amount and name with version 21.0.0

Thanks in advance.

static olive
#

this would take a moment please bear with me

carmine shard
#

sure

static olive
#
  1. I use version 20.111.0(java) before. Then I had "Deserialization failed, probably due to an API version mismatch" for webhook events. Then I changed to 21.0.0 the issue is solved. Webhook worked perfectly.
    yes because the Java SDK are bound to a specific API version
carmine shard
#

ok

static olive
#
  1. When I integrated express connect, account creation, and account link creation both worked perfectly. But when I tried to implement payouts for connected accounts through the stripe checkout, I was having an issue with price_data. The issue is the price/amount is dynamic( not fixed product or price). setAmount(), setName() etc parameters are not working with current version( 21.0.0).
    So my question is :
  2. Do we need to product and price for each payment in this version?
  3. How to set dynamic amount and name with version 21.0.0
    let me check that for you give me a moment please
carmine shard
#

ok sure, hope you understood the scenerio

static olive
#

yes just working on it

carmine shard
#

The following parameters have been removed from create Checkout Session:
line_items[amount]
line_items[currency]
line_items[name]
line_items[description]
line_items[images]
You can use the price and price_data parameters instead.

#

we can't use just amount, instead need to create price data right ?

static olive
#

exactly

carmine shard
#

that means for every payment there should be a product->price right /

static olive
#
          .addLineItem(LineItem.builder()
              .setPriceData(
                  PriceData
                      .builder()
                      .setUnitAmount(100L)
                      .setProductData(
                        ProductData.builder().setName("").build()
                      )
                      .build())
              .build())
          .build();```
#

this is one way of making both the Price and Product be dynamic

carmine shard
#

but this will create price and product in stripe dashboard right ?

static olive
#

no Price/Product data wouldn't create prices/products in Stripe's Dashboard

carmine shard
#

oh ok, let me check this

#

thats perfect. worked perfectly. Thanks