#iamshubhamaratha
1 messages · Page 1 of 1 (latest)
hi! do you have an example of the kind of "payment id" that you have?
sub_1LHhuWSEgxQcUzfK7VtZrbHd
pi_3LHiJxSEgxQcUzfK1Nsb5Txw
these two types
well the first is a Subscription, so the Customer ID is that you retrieve the Subscription object from the API and look at the customer field. https://stripe.com/docs/api/subscriptions/object#subscription_object-customer
Similar idea for the other ID which is a PaymentIntent. https://stripe.com/docs/api/payment_intents/object#payment_intent_object-customer
https://stripe.com/docs/api/payment_intents/object#payment_intent_object-customer
in this object, customer is getting null
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
then that PaymentIntent was not associated with a Stripe Customer object.
I looked though and it is.
you're probably doing this wrong and looking at the PaymentIntent too early.
you should be looking at this after the Checkout is complete and are handling the checkout.session.completed event, that's when you can inspect this sort of information and the PaymentIntent will have a customer.
see we are not saving customer ID in our application but for some reason now we are required the customer Id but we are only saving payment Id of these two types so we need to extract the customer ID using payment id
and the second API URL which you have shared I have to open it and found in the sample object customer is getting null
fount in sample object customer is getting null
sure but why does that matter?
that's a sample. In your actual PaymentIntents, the value is not null.
okay, is there a way in which I can check any online tool
you can call the API
I don't know what you mean by "online tool", you simply call the Stripe API using your API keys and code, the same way you always do when working with Stripe (there's an example .NET snippet of the code to do that, right in the screenshot you posted).
okay
Hi is there any URL which we need to used while creating session for customer portal
what do you mean exactly?
like when we create a checkout session it will use
https://checkout.stripe.com/c/pay/cs_test_c1Ab
for customer portal is there any specific URL
yes, it's the url returned from the API when you call it to create the session object. I don't follow your question.
https://stripe.com/docs/api/customer_portal/session#portal_session_object-url