#shoryyy-payment
1 messages · Page 1 of 1 (latest)
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.
Or is it this: pi_3LVgh4KFgccy97wu0qgHis9g
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?
Yes I expected cad
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?
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?
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?
I used stripe listen --forward-to localhost:4242/webhook.php and stripe trigger payment_intent.succeeded
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.
If you want to use the CLI to make API requests where you can adjust the parameters, then you'll want to look at the stripe get, stripe post, and stripe delete commands:
https://stripe.com/docs/cli/resources
So just to clarify what is the point of using Stripe CLI?
For testing
Also, in my events there is a new SetupIntent seti. What does that mean?
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?
Yeah and how would have it been created in my Events?
SetupIntents are objects that are used to save payment method info without taking a payment
What event are you triggering?
So this wouldn't be created by Stripe CLI it would be created by my code?
It could be created by either. Can you tell me more about what you are doing here?
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
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
Setting my own custom prices using a Stripe CLI command?
No, via your code
Ohh ok
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
Ok
Also just to clarify the payment created by the Stripe CLI has nothing to do with my API or code?
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
So the CLI is only used for testing and you don't need it when the website goes live?
Correct
Ok
So if I wanted to use it to test the webhooks but not have it create its own payment how would that work?
You would use the stripe listen command https://stripe.com/docs/cli/listen
Oh so does that mean I only use the listen commands and not the trigger commands?
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
Ohh ok. That makes more sense, thank you!
Of course, glad I could help clarify!
What type of result should I be getting in my events to know that my payment went through?
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?
Custom Page and one-time payment
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?
That event is for a setup intent being created
There is no payment involved there yet
So would that be because there is an issue with my paymentintent function I created or my html code?
SetupIntents are a completely different thing, a setup intent wouldn't be created by you trying to make a payment intent