#yukirivero

1 messages · Page 1 of 1 (latest)

quiet fableBOT
blissful pebble
#

We're not familiar with Wordpress's integration, so you'd have to ask them

#

The CLI is meant to just be run on your personal machine for testing though

craggy valve
#

are CLI's not meant for websites?

#

how do I upgarde a customer's sbuscription from a website?

blissful pebble
#

No. CLI stands for command line interface. It's for testing on your local machine. You'd use API's on a website. Really you need to reach out to Wordpress about this though. We just help developers with their custom API integrations in here

craggy valve
blissful pebble
#

What are you trying to do exactly? Adding api.stripe.com doesn't make sense

#

Are you trying to install out client library in PHP?

craggy valve
#

Im trying a way to upgrade a subscription of a customer from a website, from for example. Basic to Premium.

blissful pebble
#

So yeah that needs to be done server-side (ideally with one of our client side libraries)

#

But you're using wordpress it looks like, so I'm sure this is managed by plugins

#

However, we don't know about them specifically as that would be a third party integration

craggy valve
#

can you show me a sample?

#

even on a native PHP code

#

is that possible, a PHP website upgrading a customer subscription from Basic to Premium?

potent grove
#

👋 stepping in

craggy valve
#

How can I start using that URL to add codes and such?

potent grove
#

Are you a developer?

#

Do you have control of your Server or are you using a plugin?

craggy valve
#

Im using a plugin, and that plugin can add customers, add products to Stripe itself

#

but no options to upgrade a customer's subscription to a new product inside Stripe

#

so Im trying to find a way via code to do that automatically

#

I do have control on the server

#

I assume webhook endpoint is only for listening from STRIPE but not sending instructions to STRIPE? but this can create customers and products into Stripe so I assume it can upgrade customer subscriptions as well

potent grove
#

Okay gotcha. So yeah you would want to add the Webhook code to your server at the endpoint that corresponds with your URL and then you add the Webhook endpoint in your Dashboard to instruct Stripe to send you Events to that endpoint. I can't walk you through step by step how to do that but if you have a specific question or are blocked with an error then I can help with that.

#

Correct the Webhook only receives Events from Stripe.

#

Then you write code to make API requests based on those Events

craggy valve
#

but how is it able to create products into stripe?

#

I see

potent grove
#

The plugin you are using has code that creates those products

craggy valve
#

those API requests can change subscriptions in Stripe right?

potent grove
#

Yep

craggy valve
#

Ok thank you