#fazil-payment-reconciliation
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- fazilhussain015, 1 hour ago, 83 messages
- fazilhussain015, 2 hours ago, 5 messages
- fazilhussain015, 1 day ago, 21 messages
- fazilhussain015, 1 day ago, 20 messages
- fazilhussain015, 1 day ago, 8 messages
- fazilhussain015, 5 days ago, 24 messages
Because those layout options should be passed into the Payment Element create call, not the Elements group create call
https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-layout
elements.create('payment', ...)
with this
const paymentElement = elements.create('payment', {
paymentMethodOrder: ['apple_pay', 'google_pay', 'card', 'klarna']
});
?
thanks
NP!
i have another question could you please assiste me wit this
Sure, what's that?
im sharing a response with you which is sent by stripe to webhook on the event payment.success
please makre sure read it asap so i can delete it
Don't share private info here, if it has anything sensitive redact it
Because even if deleted the message is public and might be recorded
{
"id": "evt_3OMYGILYxS9gopqX0ZRtHQN6",
"object": "event",
"api_version": "2023-08-16",
"created": 1702396370,
"data": {
"object": {
"id": "pi_3OMYGILYxS9gopqX0WLpfhh4",
"object": "payment_intent",
"amount": 525,
"amount_capturable": 0,
"amount_details": {
"tip": {
}
},
"amount_received": 525,
"application": null,
"application_fee_amount": null,
"automatic_payment_methods": {
"allow_redirects": "always",
"enabled": true
},
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"client_secret": "pi_3OMYGILYxS9gopqX0WLpfhh4_secret_GDjh1qKAwNu83C7lITxdni4ME",
"confirmation_method": "automatic",
"created": 1702396366,
"currency": "usd",
"customer": null,
"description": null,
"invoice": null,
"last_payment_error": null,
"latest_charge": "ch_3OMYGILYxS9gopqX0dwkaUmD",
"livemode": false,
"metadata": {
"campaign_slug": "lets-bless-nicole-and-give-thousands-an-education",
"company_tip": "0.25",
"is_display": "1",
"donation_amount": "5"
},
"next_action": null,
"on_behalf_of": null,
"payment_method": "pm_1OMYGLLYxS9gopqXbseONOBs",
"payment_method_configuration_details": {
"id": "pmc_1OAVobLYxS9gopqXkqUmbKDl",
"parent": null
},
"payment_method_options": {
"acss_debit": {
"verification_method": "automatic"
},
"afterpay_clearpay": {
"reference": null
},
"alipay": {
},
"card": {
"installments": null,
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
},
"cashapp": {
},
"klarna": {
"preferred_locale": null
},
"link": {
"persistent_token": null
},
"us_bank_account": {
"financial_connections": {
"permissions": [
"payment_method"
],
"prefetch": [
]
},
"verification_method": "automatic"
},
"wechat_pay": {
"app_id": null,
"client": null
}
},
"payment_method_types": [
"card",
"acss_debit",
"afterpay_clearpay",
"alipay",
"klarna",
"link",
"us_bank_account",
"wechat_pay",
"cashapp"
],
"processing": null,
"receipt_email": null,
"review": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"statement_descriptor": null,
"statement_descriptor_suffix": null,
"status": "succeeded",
"transfer_data": null,
"transfer_group": null
}
},
"livemode": false,
"pending_webhooks": 1,
"request": {
"id": "req_C7kOPJKZAj6PiF",
"idempotency_key": "456b1d1f-5ae2-47e4-a2c2-758ceb513fad"
},
"type": "payment_intent.succeeded"
}
ops i have shared
okay you can see the details now
ill delete it it
I don't see anything individual except perhaps the campaign name in your metadata
okay thats also not any major thing
Sure but what is your question?
this is response send by stripe to webhook.
i want to get the customer details who made this payment such as last 4 digits of bank. name and billing address
hi @koopajah
payment method or payment intent ?
Wait why would you do that @quiet flower ?
as we allowed multiple payment methods
Isn't the right approach to look at the Charge's payment_method_details?
fazil-payment-reconciliation
i have allowed multiple payment methods
@ancient crow when a PaymentIntent is paid successfully you can look at its underlying Charge ch_123 and it will have the payment_method_details property that has details about the PaymentMethod being used like the type (card, us_bank_account, etc.) and for the relevant one information like last4 or bank and such
Ah right, that works too, retrieving the charge instead of the PM
but as i shared complete response with you
im unable to see that details in the response
yeah i can se all these details in the stripe dashboard
im stuck in this part and its wasting my time please give me complete guide how i can do this
You dumped a payment_intent.succeeded Event. That is not the Charge object. It's the PaymentIntent object. That has latest_charge: 'ch_3OMYGILYxS9gopqX0dwkaUmD' and you can use that id to call https://stripe.com/docs/api/charges/retrieve
okay you means i need to get
latest_charge key first
yes
after doing this ill call this api
like this
$stripe->charges->retrieve(latest_charge , [])
than it will provide me the all details of customer
?
than how ill get the customer details?
the name and address
Pause and try please
okay thanks
finally i get what i actully want
now i can see the details thanks
i have another question almost related to this section
i want to get the email which is missin in billing address
It's missing because you didn't collect it
okay how i can get the email also
you have to collect it yourself in your own UI and then you can pass it when you call confirmPayment()
okay
here is the code
const {
error
} = await stripe.confirmPayment({
elements,
clientSecret,
confirmParams: {
return_url: retur_url,
},
});
Please read the docs and try first.
where i need to pass the email
okay give me the link for this section
Come on
I'm sorry but you're really pushy and not even trying for 2 minutes. Can you look at the docs yourself first and try to figure it out?
yeah because I've been working with Stripe for last 6 hours and now even I do not waste my 1 second
well thanks for your time
and now even I do not waste my 1 second
I mean I'm sorry but it's on you to read our docs and ask clear questions. We're happy to help and we have multiple times in this thread but we can't just give you every answer without you looking.
So please try to look at the confirmPayment() docs first and if you're stuck ask a question about it and I'll help you