#Donnadieu - payment intents vs charges
1 messages · Page 1 of 1 (latest)
The payment intents API is newer and it is what we recommend using if you are starting your integration now.
There are quite a few differences but a big one conceptually is that a Charge is a single attempt to take payment from a customer and a PaymentIntent manages Charge objects as you attempt to take payment from a user
In a legacy section of our app we are using charges
Are you trying to figure out how to do something in that portion of your app?
We still support Charges, they are totally fine to use
No, we are seeing discrepancies in reporting data
When using the Payment Intents api some fields are missing
Customer ID; Customer Email; Customer Name; Invoice ID; Subscription ID
Do you have IDs of a Payment Intent and Charge that you are seeing this discrepancy for? Apologies for dropping off of this thread for a bit, was bouncing between threads too much.
Not a problem
One sec
This is one of the PaymentIntents pi_3KYb4DGhGYHlMhY20IcyuQTd
It looks like you are setting the email as metadata on the payment intent
If you want a customer ID and customer email, you will want to create a Customer with this email and provide that Customer IDs in the customer parameter when creating the payment intent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ok so we would have to make sure we create the customer first.
Thank you so much. Any ideas on the invoice_id and subscription_id
What about those, exactly?
When using the /charges API those populate automatically
When using the /payment_intentsAPI they do not
Just to clarify I'm taking about reporting.
When we export the CSV file those are the discrepancies
The payment intent example you shared is not related to an invoice/subscription, so I wouldnt expect to see any invoice value set
You created a one-time payment here: https://dashboard.stripe.com/logs/req_UEwnnn6DVDrLMV
Mmm any idea why this is different when using the charges API?
It's not, as far as I know, but it make depend on the details of the "report" approach you're using. If it's Stripe's reporting tools, I'd suggest reaching out to our support team with some example to have them help investigate: https://support.stripe.com/contact
If it's your own tool, you may have different data set in your integration in the legacy API
Ok thank you, we are using stripe's reporting tools
If the payment intent was related to an invoice, i would expect that to be populated the same way, on the invoice property: https://stripe.com/docs/api/payment_intents/object#payment_intent_object-invoice
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.