#Donnadieu - payment intents vs charges

1 messages · Page 1 of 1 (latest)

dry roost
#

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

tropic eagle
#

In a legacy section of our app we are using charges

dry roost
#

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

tropic eagle
#

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

dry roost
#

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.

tropic eagle
#

Not a problem

#

One sec

#

This is one of the PaymentIntents pi_3KYb4DGhGYHlMhY20IcyuQTd

dry roost
#

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

tropic eagle
#

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

cosmic geyser
#

What about those, exactly?

tropic eagle
#

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

cosmic geyser
#

The payment intent example you shared is not related to an invoice/subscription, so I wouldnt expect to see any invoice value set

tropic eagle
#

Mmm any idea why this is different when using the charges API?

cosmic geyser
#

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

tropic eagle
#

Ok thank you, we are using stripe's reporting tools

cosmic geyser