#alanx4654
1 messages ยท Page 1 of 1 (latest)
Have you created any?
Ok, so you're setting that via the Dashboard?
Then I think you can just omit the configuration parameter when you create a session
And it uses the default, which is that one set in Dashboard
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So I can only get it by calling API?
Yes
Fine, thx
Hello, another question
How can I get customer Id when user use paymentlink to pay?
I use payment_link with client_reference_id, but I didn't create any customer.
Can you share the plink_xxx ID?
Checking
What do you mean by 'didn't create any customer'? When are you expecting that to happen?
I just show the payment_link , and my client's click it , I will add client_reference_id as url params, so I can get client_reference_id at webhook when customer paid
but I'm not sure if there exists customer id in the webhook response together
Sure, sounds reasonable. The same checkout.session.completed event that fires when your customer completes payment should include a customer field
Please share an example if that's not the case!
It's that case, thank you, I got customer ID now
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
yep, another question, how can I get the product info from webhook data?
Now I know who bought my product, but I don't know what product the customer bought
I can't find any field related with product
And If the subscription got updated, for example the user changed the plan, or change quantity what should I do to detect these things
Those are set on the line_items field on the object, which isn't included in the webhook payload by default. You need to make an API request for them: https://stripe.com/docs/api/checkout/sessions/line_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.