#shoryyy-payment

1 messages · Page 1 of 1 (latest)

stable canopy
#

Hi there 👋 could you share the IDs related to the objects that you're looking at?

I'm not exactly sure how you're integrated, but if you're using Payment Intents then that ID would be helpful (pi_XXX) and the ID of the Event that you're referring to.

hollow vector
#

Or is it this: pi_3LVgh4KFgccy97wu0qgHis9g

stable canopy
#

The first one is for a Payment Method, the latter is for the Payment Intent.

Looking at that intent, I'm seeing that the request to create it specified the currency should be usd. Is that different from what you were expecting or are seeing?

hollow vector
#

Yes I expected cad

stable canopy
#

Oh, I just noticed that the Payment Intent that you provided was created by the Stripe CLI rather than being created directly by your code, are we looking at the right intent?

hollow vector
#

So on the website to test the API it says to install the Stripe CLI which I did. So is the Stripe CLI suppose to create a payment then or my code is?

stable canopy
#

You can use the CLI for testing, but it should not be part the final flow that you're designing/building. Can you share the command that you used when interacting with the CLI?

hollow vector
#

I used stripe listen --forward-to localhost:4242/webhook.php and stripe trigger payment_intent.succeeded

stable canopy
#

Gotcha, so stripe trigger is going to do the bare minimum necessary to trigger the event that you specified and does not support accepting custom inputs so you won't be able to control the values used when the CLI creates those objects.

hollow vector
#

So just to clarify what is the point of using Stripe CLI?

stable canopy
#

For testing

hollow vector
#

Also, in my events there is a new SetupIntent seti. What does that mean?

pulsar sphinx
#

Hello, toby had to step out. I am catching up and can help in a bit

#

Can you clarify your last question a bit? Are you asking what SetupIntents do overall?

hollow vector
#

Yeah and how would have it been created in my Events?

pulsar sphinx
#

SetupIntents are objects that are used to save payment method info without taking a payment

#

What event are you triggering?

hollow vector
#

So this wouldn't be created by Stripe CLI it would be created by my code?

pulsar sphinx
#

It could be created by either. Can you tell me more about what you are doing here?

hollow vector
#

So I'm trying to test out my API and I'm not sure if it's working or not. I have some succeed payments in my payment page, but it seems like they were created by Stripe CLI. So I'm not sure how to fix that and make sure the payments are coming from my code

pulsar sphinx
#

They would only be created by specific CLI commands

#

If you run your code again and don't run a stripe trigger command to create a payment, you can be sure that it is from your code

#

Or you can make sure to set your own custom price and whatnot

hollow vector
#

Setting my own custom prices using a Stripe CLI command?

pulsar sphinx
#

No, via your code

hollow vector
#

Ohh ok

pulsar sphinx
#

I mean you can do either, there isn't really an answer I can give here honestly. You just need to make sure that you are passing in data that you can identify when looking at your payments page

hollow vector
#

Ok

#

Also just to clarify the payment created by the Stripe CLI has nothing to do with my API or code?

pulsar sphinx
#

Depends on what you mean by that. The CLI also uses the API can creates test objects on your account. It is often used to test your API integration's reaction to webhooks and such. But yes, they are also separate things, your code doesn't need it

hollow vector
#

So the CLI is only used for testing and you don't need it when the website goes live?

pulsar sphinx
#

Correct

hollow vector
#

Ok

#

So if I wanted to use it to test the webhooks but not have it create its own payment how would that work?

pulsar sphinx
hollow vector
#

Oh so does that mean I only use the listen commands and not the trigger commands?

pulsar sphinx
#

If you want to test webhook events on your local machine, without pointing some URL to it, yes

#

Listen is for enabling your machine to send events to some localhost endpoint, trigger is for sending a specific event without you having to make the event happen yourself

hollow vector
#

Ohh ok. That makes more sense, thank you!

pulsar sphinx
#

Of course, glad I could help clarify!

hollow vector
#

What type of result should I be getting in my events to know that my payment went through?

pulsar sphinx
#

There are a couple answers to that depending on what you are doing. Can you tell me more about which Stripe products you are using to take these payments?

#

Like is this the Stripe-hosted checkout page or a custom page of yours?

#

Also one-time payments or subscriptions?

hollow vector
#

Custom Page and one-time payment

pulsar sphinx
#

So for that, you will receive a payment_intent.succeeded event on your server

hollow vector
#

Could I send you my payment intent ID I received and could you tell me if there is an issue with the payment or not?

pulsar sphinx
#

Sure, sounds good

#

Are you unsure if something is an error of some kind?

hollow vector
#

Yes

#

ID: evt_1LVzarKFgccy97wuNXTWnZ1S

pulsar sphinx
#

That event is for a setup intent being created

#

There is no payment involved there yet

hollow vector
#

So would that be because there is an issue with my paymentintent function I created or my html code?

pulsar sphinx
#

SetupIntents are a completely different thing, a setup intent wouldn't be created by you trying to make a payment intent