Stripe RetrievePaymentIntent Intent Property

What could be the expected value for Intent property in Server Connect’s Retrieve Payment Intent Stripe Component?

image

According to Stripe docs only the client_secret is required.

When the Payment Intent is created, the client_secret is also created. This is the client_secret that can be used when retrieving the payment Intent.

That’s exactly what I am trying to do @ben:

I want to retrieve an earlier created Payment Intent by it’s client_secret. However, the “Intent” field is required according to Wappler and I can’t figure out which value to put in there.

Tthe Payment Intent is retrieved when the Payment Intent’s id is put in the “Intent” field: Then the payment intent is retrieved successfully.

However, retrieving the same Payment Intent with the client_secret doesn’t work: The “Intent” field is required and putting in the id there whith the client_secret field also set throws an error.

There are a couple of ways to get the client_secret if you need it

  1. capture the client_secret using Webhooks and storing it in the database - NOT RECOMMENDED!
  2. Get a list of Payment Intents, where you will see the client_secret.

Having said that, if all you need is the relevant Payment Intent, why not use the second method where no client_secret is required. You can filter the list to your heart’s content.

https://stripe.com/docs/api/payment_intents/list

Thanks again @Ben.

Summarizing:

  • I already had the client_secret stored
  • I wanted to retrieve the payment intent using the client_secret, which didn’t work (may be a bug @Teodor?)
  • Retrieving the payment intent with the payment intent’s id does work though.
  • So I stored the payment intent’s id as well now and retrieve the payment intent later using that
1 Like

I always use Postman to test my APIs first to make sure my syntax is correct. Stripe also has a set of pre-made apis so that you can easily test. FYI

https://www.postman.com/stripedev/workspace/stripe-developers/overview

1 Like