#AndroidSword-custom receipts

1 messages · Page 1 of 1 (latest)

queen echo
#

hey, just to make sure I fully understand your case. You're using terminal with a NodeJS server?

woven elk
#

Yes

#

Terminal Android/iOS SDK

#

NodeJS Server

queen echo
#

do you have any example of Payment Intent Id pi_xxx

woven elk
#

Sure

#

Here you go: pi_3Ko2JyFytK0j9FCQ1Z6yorCC

#

It's a fresh paymentId I just generated

queen echo
#

so when you say the fields are null what fields are you talking about?

#

because I can see that the payment_method_details.card_present.receipt is not null

woven elk
#

How did you check the payment_method_details.card_present.receipt?

queen echo
#

it's directly on the payment intent object

#

that you sent me

woven elk
#

No I meant, when I get the payment intent object using this code:
const intent = await stripe.paymentIntents.capture(
req.body.payment_intent_id,
// {
// amount_to_capture: 10800
// }
);

It does not have this payment_method_details object

#

Is what I am referring to a different intent object?

queen echo
#

my bad this is on the Charge object

#

so what you need to do is either retrieve the Payment Intent and expand on the Charge object or get the Charge Id from the Payment Intent and retrieve the charge

#

scratch that. the Charge is already expanded on the Payment Intent, so you can access intent.charges.data[0].payment_method_details.card_present.receipt

woven elk
#

Umm let me check it out

#

It worked! Thanks a lot