#shanedjrogers-checkout-card-support

1 messages ยท Page 1 of 1 (latest)

finite night
#

Hello ๐Ÿ‘‹
Let me take a look

vernal kindle
#

Ok thanks!

finite night
#

I'm not seeing any updates on this so far

#

๐Ÿ˜ฆ

vernal kindle
#

Ok, Ill just assume its card only for now

finite night
#

moving the context here

Can I also ask, why is there no price / product id included on a payment intent? Its only amount and currency and the associated charge object also has not product price id

I cant for example do a customer.payments.map(:product)

#

I can only do that if the payment is a subscription
pi_3KhicLANVVVLTo162TrUqKpc

#

How can I tell what product and price is associated with a payment intent? I can tell what product / price is associated with a subscription payment but not a payment intent

#

Taking a look at your payment intent

vernal kindle
#

Ok thanks

finite night
#

Ah okay so the product and the price are associated to the checkout session and not the Payment Intent directly.
So if you retrieve the session again, you'd be able to see the product and the prices associated.

vernal kindle
#

Yes but what about non checkout session created payment intents?

#

The only way I can seem to see how to do it is to use a headless browser to render the receipt url, parse out the line items and do a string match on product name and formatted price amount

#

If an account connects to my platform account, and that account has not been using stripe checkout, I cant figure out what their product / price sales history is

finite night
#

you can also use metadata and store product/price in it?

vernal kindle
#

Yep could but my assumption is that these purchases have already occurred

#

How does Stripe know internally what payment intent maps to each product / price?

#

I can only see amounts and currency but theres no metadata to work with

finite night
#

AFAIK In order to use products and prices you'd have to use Checkout Sessions, Payment Links, Quotes, Subscriptions, or Invoices.
These will create the underlying Payment Intent. So really, the products and prices will be associated with one the above objects directly and not with a Payment Intent.

vernal kindle
#

Yeah ok makes sense

#

Was wondering if there was a way for me to find the info but I guess there isnt

#

Except for the hacky render and parse the receipt page

finite night
#

I mean instead of relying on the Payment Intents you can rely on the objects that are creating those Payment Intents right? That'd also give you direct access to the product/prices

vernal kindle
#

But what about for old transactions? How would that work? I haven't been able to figure that out yet

finite night
#

when you say old transactions, how old specifically?
If you have an example I'm happy to walk you through the process ๐Ÿ™‚

vernal kindle
#

Ah sorry by old I mean any time in the past where my platform doesnt initiate the charge

#

So I cant put a product / price id in the payment_intent.metadata for retrieval later etc

#

Example is
Company A has sales via Stripe.
These sales use one time prices.
They have not been using Stripe checkout and they don't have any product / price metadata attached to the payment intent metadata
They then connect to my platform using Stripe Connect
My platform can pull a list of their account payments but cant tell what products / prices are associated with these payments

finite night
#

Okay so your platform will have access to all objects on the connected account
However, since PaymentIntent doesn't have any relation to product/prices you'd not be able to find the connection here.

#

If the connected account used not checkout but Payment Links, Quotes, Subscriptions, or Invoices, you can retrieve those objects and associate it with a payment intent and product/price

vernal kindle
#

Yeah ok so same page

#

thanks for clarificaion

#

How does stripe associate these things when standard payment intents have been used?

#

Will it be exposed via the api in the future via the search api?

finite night
#

I think I'd recommend seeing Payment Intent as a secondary object and not the primary when to comes to associating it with a product/price.

Standard Payment Intents with just the amount may or may not have a price/product associated with them. Hence, we don't link them directly to a price/product.

vernal kindle
#

Is there a primary object for a payment intent when not originating from Checkout / Payment Links / Quotes / Subscriptions / Invoices?

finite night
#

If not using these things, it'd be created using the API correct?

vernal kindle
#

Yep

finite night
#

So it'd just be a PaymentIntent object
but you can't pass a price ID or a product ID when using the API

vernal kindle
#

Yeah

#

Ok great thanks for the info

#

How does Stripe discern between which products and prices have been used when users just create payments via the API?

finite night
vernal kindle
#

๐Ÿ‘

#

Ok thanks

#

Ill explore the headless parse option to try and figure it out

finite night
#

No worries ๐Ÿ™‚ Good Luck

vernal kindle
#

Ah seems like if the payment description is ambiguous then Im stuck too

#

Oh well

#

Thanks again