#DeepITM
1 messages · Page 1 of 1 (latest)
Yes, the address is attached to the PaymentMethod object, not PaymentIntent, you should retrieve the associated PaymentMethod object from PaymentIntent to get the address
I see the address from the PaymentMethod object and I can retrieve it. But looks like that’s the billing address not the shipping address
I am testing on desktop with ‘Link’ actually. Not the real Apple Pay
Can you share with me the PaymentIntent ID?
pm_1Nl3FrDUXg0Gc8ZHRN6Rp9I6
In test mode
O that’s the payment method I’d
*id
Intent id: pi_3Nl3FcDUXg0Gc8ZH39QH0BsJ
https://stripe.com/docs/js/payment_request/create#stripe_payment_request-options-requestShipping did you set requestShipping to true?
Yes. Otherwise it won’t be collected. I input shipping separately when paying with Link
Can you share with me the code your wrote for payment request?
const paymentRequest = stripe.paymentRequest({
country: 'US',
currency: 'usd',
total: {
label: 'Total',
amount: finalTotalPrice,
},
requestPayerName: true,
requestPayerEmail: true,
requestShipping: true,
// shippingOptions is optional at this point:
shippingOptions: [
// The first shipping option in this list appears as the default
// option in the browser payment interface.
{
id: shippingFeeToCharge ? 'shipping-fee' : 'free-shipping',
label: shippingFeeToCharge ? 'Shipping Fee' : 'Free shipping',
detail: 'Arrives in 5 to 7 days',
amount: shippingFeeToCharge ? 1000 : 0,
},
],
});
That’s what I see when the link payment page shows up. The shipping address is a separate input
Just to clarify, are you using Apple Pay or Link?
Link right now for testing
OK.
Haven’t used the actual apply pay test yet
https://stripe.com/docs/js/appendix/payment_response#payment_response_object-shippingAddress you should listen to the paymentmethod event and get the shippingAddress form the event object
Ok so from frontend?
Yes you are right