#donalson-buy-btn-livemode

1 messages · Page 1 of 1 (latest)

ripe breachBOT
iron hornet
#

What do you mean by subscription link exactly?

hidden vine
#

Hello how are you ?

iron hornet
#

I'm doing well, thanks for asking

hidden vine
#

i have a code in my own platform for my clients to make subscriptions

#

the code is working well.

#

but. I'm using a test link to do that

#

look

#

I have a checkout button

iron hornet
#

are you referring to payment link/buy button?

hidden vine
#

but i don't know where can i find or create a link for production mode. to test it

iron hornet
hidden vine
iron hornet
#

if you toggle the test mode button off then you'd be in live mode

ripe breachBOT
#

donalson-buy-btn-livemode

hidden vine
#

Ok thz, but..

#

Here i need to choose a productHere i need to choose a product

iron hornet
#

you'll need to create the product in live mode

hidden vine
#

And in my case i'm sending to stripe the information of the subscription.

  • product
#

metadata too

iron hornet
#

sorry are you saying you're creating the PaymentLinks using the API?

hidden vine
#

Sorry if i'm a little confused

#

I send to Stripe de prod_P5ZUtZvBK8MGo3 and meta data

iron hornet
#

how exactly are you sending it?

hidden vine
#

Ok I will check the link that you sent me

hidden vine
iron hornet
#

In that case, all you need is to switch your test mode API key with your live mode API key

hidden vine
iron hornet
#

in your code

hidden vine
#

yes

iron hornet
#

but again, you'd need to create the products/prices in live mode first

hidden vine
#

It is working very well on test mode.
but I need the link for my button for production mode.

#

And i don´t know hoy to create it

iron hornet
#

Sorry, I don't think I grasp your usecase or the flow you're building.

You are saying you "need a link" for your button (which is what the buy button is)
https://stripe.com/docs/payment-links/buy-button

Then you said you're using Stripe Checkout and shared code that creates a checkout session

hidden vine
#

The link is the final route to send the user after they press the button

#

Ok

iron hornet
#

The link is generated after your app calls the Stripe API and in the response you'd receive a URL

hidden vine
#

maybe i used a wrong word (link)

#

I will explaint it again. give me 1 minut

#

I found information in the stripe documentation
to create a :

  • portal session
  • checkout session
#

checkout session :

#

portal session:

iron hornet
#

okay, so you're using Checkout Sessions API in test mode

#

STRIPE_SECRET in your code is your test mode API key

hidden vine
#

when my client press the checkout button in my platform

#

i redirect him to that route

#

this route use sessionId information

#

that i have

#

but that route does not work on production

#

I don´t remember where i found this information (route) on stripe documentation

#

the checkout session API respond me with the sessionId

iron hornet
hidden vine
#

mmm ok i thik that i found the problem

#

stripe.checkout.sessions.create

hast a response with the url

#

i need to use that link

iron hornet
#

👍