#one-love_pm-expansion
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1218232021067890759
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- one_webhook-secret, 16 hours ago, 12 messages
- one-love_api, 1 day ago, 53 messages
- one-love_api, 2 days ago, 4 messages
- one_checkout-shipping, 3 days ago, 86 messages
- one-love_checkout-address-collection, 3 days ago, 5 messages
- one-love_webhooks, 4 days ago, 60 messages
and 1 more
If you want to last 4 digits of the credit card used, you need to be expanding the appropriate parameters since it's not included i the webhook event by default.
From the checkout.session.completed event you can retrieve the Payment Intent using the ID found at payment_intent and expand payment_method. If you need more information on expansion you can read more at https://stripe.com/docs/expand
I didn't see the credit card number in the payment intent object either. What exactly do I have to expand to retrieve the credit card number?
Did you read the doc on expansion I sent you? You need to retrieve the Payment Intent AND expand payment_method
Sorry, which object hold the credit card number. Which object do I have to expand?
The Payment Method object includes the credit card number - that's why I mentioned you have to expand payment_method when you retrieve the Payment Intent
I asked because I didnt see the card number in the payment intent object that was returned. Just making sure I don't waste time learning how to expand the wrong object.
It should be pretty quick to just try it and see how it works (and it's something that referenced/used often in our APIs)
Okay thanks.
one-love_pm-expansion
Do I have to replace {{SESSION_ID}} with something?
Do I have to replace {{SESSION_ID}} with something?
Yes, you'd need to swap that oult for the areally checkout session ID - {{SESSION_ID}} is just a placeholder
Do I keep the brackets?
Nope
@hollow maple Were you able to get it working?