#shreyas-mulay_api

1 messages ¡ Page 1 of 1 (latest)

keen tuskBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1371998942086168680

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

soft belfry
#

Hi! That Payment Method ID belongs to a different Stripe Account.

feral gazelle
#

Meaning ?

#

can you please explain ?

soft belfry
#

Did you get a mapping file after the migration?

feral gazelle
#

yes

soft belfry
#

Oh

#

Did you create the Payment Method on the old account?

#

Or was it supposed to be migrated with it?

feral gazelle
#

yes we had to, and yes it was supposed to get migrated along

soft belfry
#

I suspect your Publishable Key in your frontend code is still from the old account (or, at least, it's from a different account).

keen tuskBOT
feral gazelle
#

one min let me check

#

I changed that

#

100%

#

but still checkng it

keen tuskBOT
feral gazelle
#

ohh yeah got it

#

I think I missed that wait the build got no trigger automatically

feral gazelle
#

Hi

#

I manage to trigger the build

#

but still getting the issue -- req_msYJ0zxfcgSad8

#

can you check what is that I am missing

#

Req id: req_4zrh9cwNEwDPwY

Error while upgrading or downgrading tier This property cannot be expanded because it doesn't exist: payment_intent.

feral gazelle
#

Didnt get you

#

there are changes is it ?

#

ok lets forget that for now, we have a feature where user can upgrade or downgrade their tiers

feral gazelle
#

can you tell how to enable test mode ?

fervent lichen
#

pm_1ROSwAFa8DSgVf3HwttXEKzJ is still belongs to another different account

#

acct_1HH5lxFa8DSgVf3H

feral gazelle
#

ok ok

fervent lichen
#

While req_msYJ0zxfcgSad8 is on acct_1RNsv6I061oVD8E5

feral gazelle
#

gotcha maybe user did before I did anything

#

Can you tell me

#

how to enable test mode ?

fervent lichen
#

It became Sandbox these day. You can just create a Sandbox account based on your Livemode account

feral gazelle
#

ok ok

feral gazelle
#

so actually I am doiugn liek this

                    customer: customer.id,
                    items: [{
                        price: <price_id>
                    }],
                    expand: ['latest_invoice.payment_intent']
                });```
do you have a way to get the payment_intent from the subscriptions create API ?
#

@fervent lichen

feral gazelle
#

expand: ['confirmation_secret'] ?

#

when creating the subscription, I want payment_intent

#

can you help me please

#

it is bit urgent

fervent lichen
#

Can you try to expand latest_invoice.payments instead? What do you see on there?

#

Sorry

feral gazelle
#

doing it

#

I get payment object and inside it I get payments as the list and on 0th index i get the payment intent

fervent lichen
#

Yep let's use it!

feral gazelle
#

I actually want the client_secret on the payment_intent

#

to enale 3ds card

#

Hello you there ?

fervent lichen
#

Ah okie, that would be confirmation_secret like the Doc mentioned

feral gazelle
#

so it would be latest_invoice.confirmation_secret ?

fervent lichen
#

invoice.confirmation_secret.client_secret

feral gazelle
#

not the latest is it ?

fervent lichen
#

For Payment Element integrations, especially Subscription integrations, that previously relied on expanding invoice.payment_intent.client_secret or latest_invoice.payment_intent.client_secret, you can now use the new invoice.confirmation_secret.client_secret field on the Invoice object by expanding confirmation_secret:

#

should be latest_invoice.confirmation_secret.client_secret

#

Please try

feral gazelle
#

actualy I am checking the payment intent status object to have requires_action or requires_payment_method

#

so for that purpose I want the payment intent object

fervent lichen
#

I see, so you want both them

feral gazelle
#

yes sir

feral gazelle
#

we are close now

#

can you please try again bro

fervent lichen
feral gazelle
#

no status nothing

fervent lichen
#

is payments an array of string?

#

or it's an object which has data?

feral gazelle
#

object which has data

fervent lichen
#

okie can you expand latest_invoice.payments.data

#

expand: ['latest_invoice.confirmation_secret.client_secret', 'latest_invoice.payments.data']

feral gazelle
#

this i used to get before only

#

without expanding data

fervent lichen
#

This is the call to List Invoice Payments. You are expanding the Subscription, which is a different API

feral gazelle
#

ok

#

THat somehow I fixed

#

now getting this error

This PaymentIntent is configured to accept payment methods enabled in your Dashboard. Because some of these payment methods might redirect your customer off of your page, you must provide a return_url. If you don't want to accept redirect-based payment methods, set automatic_payment_methods[enabled] to true and automatic_payment_methods[allow_redirects] to never when creating Setup Intents and Payment Intents.

#

This is coming when creating payment intent

#
            amount: price.unit_amount,
            currency: price.currency,
            customer: customerId,
            payment_method: paymentMethodId,
            confirm: true,
        });```
#

like this

#

is this for the 3ds secured card again ?