#ASittingDuck
1 messages ยท Page 1 of 1 (latest)
This needs to be a specific payment method id (or compatible object) such as pm_1234
OH shoot, I am using the wrong type
for example in test mode you can use pm_card_visa or our other test PM ids
I am using react api, please disregard
That snippet looks like a node server-side snippet
Are you trying to confirm server side or in your react app client side?
I am confirming on the react app client side, because I will be sending the needed information to woocommerce and manually setting the order to confirmed once done.
How does woocommerce fit in here?
Generally for your own integration, you'd want to look at this stage of the payment guide for eg confirming with the Payment Element using confirmPayment:
https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements&client=react#web-submit-payment
Thanks, yeah woocommerce is just want I am connecting to the application
OK ONE last thing. I have gotten that method to work. I just need to get the following information if I can
-customer_id
-source_id
-stripe_fee
-transaction_id
I am not seeing that on any of the returned objects
Which returned object, specifically?
The paymentIntent object is the last one returned
If you provided a customer for the payment intent, that should be reflected on the payment intent object
Is that the same as providing billing information?
What are the other bits of data you're looking for? Most likely you want to look at the latest_charge and expand the balance transaction for such details:
https://stripe.com/docs/api/payment_intents/object#payment_intent_object-latest_charge
https://stripe.com/docs/api/charges/object#charge_object-balance_transaction
https://stripe.com/docs/api/balance_transactions/object
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I am looking for the transaction ID for when the card was charged so that refunds can be made if needed, and the customer ID
I am passing the billing information and I see that in the data, but it isn't creating a customer there
What transaction ID? You can use the Payment Intent ID (or charge id) to create a refund:
https://stripe.com/docs/api/refunds/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
What transaction ID are you referring to?
OK cool thank you!
I have an example. one second
Stripe charge complete (Charge ID: ch_3MbTcpIlmlJhoaqY1idqtYzN)
Sure, that's the charge object ID, its on the payment intent as the latest_charge linked to above
That isn't on the returned object
Can you share that request ID? or copy the payment intent ID here
Is this a client-side confirmation?
Yes it is, and request ID, as in the PI-ID?
pi_3MbVZWIlmlJhoaqY2kVYz0SN
there is the payment intent ID
OK it looks like you're not getting that in the client confirm response, but you do get it in the payment_intent.succeeded webhook event, eg: https://dashboard.stripe.com/test/events/evt_3MbVZWIlmlJhoaqY2HZyw9wt
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Yeah I am seeing that, So does that mean I just need to make a request to retrieve the PI and then I will get that information?
Yes, that's correct
That literally got me the same thing
stripe.confirmPayment({
elements,
confirmParams: {
payment_method_data: {
billing_details: {
name: `${customer.firstName} ${customer.lastName}`,
address: {
city: customer.city,
line1: customer.address,
postal_code: customer.zip,
state: customer.state,
},
email: customer.email,
phone: customer.phone,
}
}
},
redirect: "if_required",
}).then((transaction) => {
parentSetProgress(80);
console.log('Payment Sent', transaction);
stripe.retrievePaymentIntent(transaction.paymentIntent.client_secret).then((paymentIntent) => {
console.log('Payment Intent Retrieved', paymentIntent);
});
Let me confirm I see the same thing
Thanks
This is the biggest thing I need right now, the freaking customer ID
message
:
"Subscription payment method could not be set to stripe with error message: A "Stripe Customer ID" value is required."
Hi there ๐ taking over, as my colleague needs to step away
Give me a few minutes to get caught up.
Ok
So where are you adding a Customer and where are you looking for one?
I believe I am adding a customer when I am confirming the payment intent
and I am looking for the returned customer ID on the intentconfirmation return object
I didn't think billing_details created a Customer.
hmmmm so I have to explicitly do that
Yeah, you'd need to create a Customer separately
using stripe.js where is the doc for that?
There's only a server-side method for that: https://stripe.com/docs/api/customers/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I think I got that part already, I will continue to research on how to attach the customer, along with their payment method
If I am using a PaymentElement on my system, and I want to take that data and use it to create a payment method, I need to get the card from that PaymentElement. I tried using elements.getElement(CardElement) and elements.getElement(CardNumberElement) but both those are returning null.
A Payment Method is created as a result of confirming the Payment Intent, so you should already have one when the payment flow is complete
I am using the payment method with a customer so it needs to be saved beforehand, (because this is going to be used with a subscription)