#one-love_pm-expansion

1 messages ยท Page 1 of 1 (latest)

clever kestrelBOT
#

๐Ÿ‘‹ 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.

ornate prawnBOT
#

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.

civic sable
#

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

Learn how to reduce the number of requests you make to the Stripe API by expanding objects in responses.

hollow maple
#

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?

civic sable
#

Did you read the doc on expansion I sent you? You need to retrieve the Payment Intent AND expand payment_method

hollow maple
#

Sorry, which object hold the credit card number. Which object do I have to expand?

civic sable
#

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

hollow maple
#

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.

civic sable
#

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)

hollow maple
#

Okay thanks.

clever kestrelBOT
#

one-love_pm-expansion

hollow maple
#

Do I have to replace {{SESSION_ID}} with something?

#

Do I have to replace {{SESSION_ID}} with something?

civic sable
#

Yes, you'd need to swap that oult for the areally checkout session ID - {{SESSION_ID}} is just a placeholder

hollow maple
#

Do I keep the brackets?

civic sable
#

Nope

civic sable
#

@hollow maple Were you able to get it working?