#ctodan

1 messages · Page 1 of 1 (latest)

oak plankBOT
hot vale
#

hello! it should be under items.data[0].price

where data is an array of hashes

mighty condor
#

evt_1NXXQjJmq474uon8noHtzWIj

#

what about that "plan" field?

hot vale
#

Plan is the older field and Price is backward compatible with Plan so you'll see the same info in both, look in your event, you'll see it

mighty condor
#

gotcha yea i see it

#

but felt wierd that it was in an array

#

subscription.items[0].amount

#

is it guarenteed to be there?

oak plankBOT
hot vale
#

but felt wierd that it was in an array
you can have multiple SubscriptionItems on a Subscription so expected to be an array.

Each item in the array being the Price, its quantity and amount.

#

is it guarenteed to be there?
can you elaborate?

mighty condor
#

aka there will always be soemthing in items?

hot vale
#

yes, a Subscription will need items to be created so will be there

mighty condor
#

Whats the difference between price and plan?

#

and which should i reference?

hot vale
#

you should reference Prices, ignore Plans, they're deprecated/old

#

what Stripe docs/guide are you following?

#

every current one should point you to Prices

mighty condor
#

i was just looking at the actual event payload

graceful rivet
#

Ah gotcha