#Sanskar

1 messages · Page 1 of 1 (latest)

eager geyserBOT
umbral ridge
finite ivy
#

here is the request id : req_Nw4mMpTxZsyieB

umbral ridge
#

This request is succeeded, share with me ID of request that failed

finite ivy
#

this particular req id giving me an error 400 bad request

#

there is the response

umbral ridge
#

No, that's not the ID.

finite ivy
#

so what id you are talking about

umbral ridge
#

The ID of request that failed

finite ivy
#

This is what I am getting in last reposne if the id request req_cTBAOQNkfXXyoo

#

var customer = await stripe.customers.create();
console.log("request id ",customer.lastResponse.requestId);

umbral ridge
finite ivy
#

req_UbLCDHBjJZQY78

#

there is the request id what i found from a Dashboard that are failed giving me an error no such price {{price_id}}

umbral ridge
#

OK, I can see the error code.

finite ivy
#

ok

umbral ridge
#

It failed because the request was made in the connected account, but the price object was created in platform. Therefore it complains about resource_missing

#

You should create a price in the connected account, and use the newly created price to create a payment link

finite ivy
#

This is the way i am creating a price const price = await stripe.prices.create({
product: product.id,
unit_amount: product_price,
currency: currency,
// recurring: {interval: 'month'},
});

#

can you please look that its correct or more thing i need to mention for creating a price

#

without created a platform price

umbral ridge
#

You should specify a stripe_account in the request.

By specifying a stripe_account, you are telling Stripe that you want to make an API call on behalf of a connected account. You can refer to this doc to learn more about making API request for connected account (https://stripe.com/docs/connect/authentication)

Learn how to add the right information to your API calls so you can make calls for your connected accounts.

finite ivy
#

const paymentLink = await stripe.paymentLinks.create({
line_items: [
{
price: price.id,
quantity: 1,
},
],
}, {
stripeAccount: account_number,
})

#

I did the same thing as u said i mentioned earlier in payment link stripped_account

umbral ridge
#

You also need to set a stripe_account header when you create a price.

finite ivy
#

You means to say that I need to mention the account number while creating the price

umbral ridge
#

Yes, you need to set a stripe_account header when create a price

finite ivy
#

But how? that gonna happen. In documentation there is no where that can we mention the stripped account while creating the price

umbral ridge
#

You are creating a payment link on a connected account, am I right?